Hi all, new here, but I have a very specific problem.
I capture video from an ultrasound device at work. The ultrasound measures a wave form that is displayed across the screen, this is then put through some software that measures the size / area of the waveform.
The problem. Our old ultrasound displayed the wave form sweeping from furthest right on the screen so that the newest signal was always on the furthest right of the screen and everything to the left was previous signals. This was fine as it allows us to set a region on the right for the software to measure the wave.
Our new machine sweeps the waveform across the screen, thus new waveforms can appear anywhere on the screen, this makes it impossible to set a region for the software to measure. Im hoping this makes sense, but in a simple sense, the old machiine 'streamed' measures in from the right, the new machines loops measures across the screen.
What I would like to do is to re-edit or re-capture (Im not sure what the technical name would be) by setting a area say 300px by 100px and then have it capture in one place on the screen for one frame, then capture X pixels to the left in the next frame, then again X pixels to the left in the 3rd frame and so on. In my simplistic mind I 'think' this will result in a small box of video where new waves will always appear. I also have to preserve frame no. as the wave measures have to match up with other measures of the video.
I keep swapping between thinking this is incredibly difficult and actually sounds quite simple... famous last words!
If anyone has any ideas it would be very much appreciated! I have no experience in programming capture software, but I can work most things out if given a starting point and some instructions.
Thanks for reading
Nick
+ Reply to Thread
Results 1 to 10 of 10
-
-
as your (bad) luck would have it i recently went back to school to be a medical assistant and as part of the course (i think in an attempt to upsell us to the more expensive ultrasound program) they gave us an introductory course in ultrasound.
here's the part you're not going to like, if the included software can't set a specific region for the software to measure you're not going to be able to hack something together, especially if as you say you have no experience in programming capture software.
second, the algorithm you laid out for how you think you should do it will never work because in order for it to work you would have to know where the wave starts in the first place, but as you say it's indeterminate, by your own admission the new waveforms can appear anywhere on the screen, thus you have no way of know where to set the initial capture box.
this leads back to the problem you're having now, there is concept in logic called "reduction to the absurd" where you take a theory you have and see what happens to it at the absolute extremes, if it fails then you know that your theory has flaws.
if we apply the same principle to your plan, we realize that if it would work with a region of as you say 300px by 100px then it should work with a region that's one quarter the screen size, which would mean that the waveforms were coming in a deterministic fashion thus negating the need for your plan.
as it stands now i think your only option is to capture the whole screen and manually step through the results frame by frame to see where the new waveform materializes.
btw, what ultrasound machine do you guys have now and what did it replace? just curious. -
Thanks for the reply, even if its not quite what I wanted to hear!
Our old machine was a HDI3000 which despite being old was a great vascular machine, the new one is a vivid 7 and I been through the config and there is no way I can find to change how the Doppler flow is generated on the screen.
The frustrating thing is it has a 1 sec sweep rate and most people have a resting HR of near 60, so it turns up in very similar (but not identical places) every time. Very frustrating to say the least. I might speak to GE and see if there is hidden setting that can be tweaked.
Thanks again feel free to shout if you have any other ideas! -
Do you have a sample video for the 1st and 2nd type ? or can you find one on youtube ? It might help to clarify things and generate some ideas
Is there perhaps updated software available that takes the 2nd type of waveform into account ? Maybe check with the manufacturer, and/or other radiology clinics
If the 2nd waveform appears in a "random" position (I'm going to say x coordinate, but that's a guess) , what is on the left and right of the waveform at the point in time? Is it "black" ? Maybe an approach would be to auto crop to the region of interest ? (In video editing, there are filters that can automatically crop black areas, but they might have to be slightly modified to suit your needs) -
Thanks, the software makers have a fix which is 3K for their software, but a) There is no money till next year! and b) another lab I know have the fix and they think it missess as much as it hits.
If you look at this video
http://www.youtube.com/watch?v=iyL1I5nP7GE
and go 1:45 and look at the flow at the bottom of the screen, you'll see its not random the front of the doppler trace sweeps across the screen, so I could set a start position and then move where the image is grabbed x pixels sideways as the gap at the front of the trace would be the start position in frame 1, so it may still be possible? -
I think see the problem, the 2nd type of tracing isn't aligned (to either left or right side), so the measuring region of interest will have to be moved each time you take a measurement . Does the old software allow you to do
that, or was that the reason for this question (you want to avoid tedious work as much as possible) ?
This will be extremely difficult to do in an automatic video editing sense after it's recorded - because the width of the each individual tracing will likely be slightly different for different patients , different arterial measurements , different conditions (maybe HR goes slightly up or down within a session), etc...so the space between each individual trace might differ. Also each time you pick up the probe, it will need to be reset (the offset value will no longer apply)
As for adjusting the actual recording, how is the recording actually done ? What hardware ? is it separate or is it part of the machine ? -
You are right that was the reason for the question.
i was thinking more if it was possible to time align my smaller capture box with the front of the line that sweeps across the screen, and then make the box sweep at the same rate as the signal does. The result being that the 'rolling' signal would become one that appeared from the same side of the (albeit much smaller) box. This is what the software is designed to accept. The pixels I suggested aren't definite. I could make the box wider to make sure all of the wave was captured. The software can cope with multiple pulses, it just needs them in a certain order.
All the same, Im guessing that this is going to me a lot harder than anticipated! But thanks for all you input so far.
As for the recording, the machine gernerates the image (pretty much as in the video above). We have some control over gain (so we can make the pulses look bigger or smaller) and some control over sweep rate so we can have the pulses spread out or crunched up. These are fixed controls, i.e. we have 4 set sweep rates of x mm/s. There is a sVHS output that we capture via basic USB capture device (pinnacle HD) and we capture in RAW (huge file size) and then convert to divX at 12 fps to reduce the no of frames to be analysed (we usu have around 10 mins). The idea I started with was some kind of software that would 'read' rectangles off the DIVx files according to some values that I could set (e.g. size of rectangle and how far to move sideways in each frame).
Is there something in this that may make it easier? -
But I thought one problem was alignment - the start of the a pulse might sometimes be "cut off" depending on where the last one at the end of a line finishes ? or a gap before the start of a pulse ? or does the software account for that ?
If only the order is important and it can handle multiple pulses, what about flipping the capture horizontally? This is easy to do in any video editing software. This will make it go right to left. This assumes you only need to measure x,y dimensions to get the area measurement (other things like shape characteristics aren't important at this point). I have a feeling I'm misunderstanding something, because if this were true, then you could set up the measuring region on the left instead of the right
Can you find an example of the old style tracing ? That might help clarify things too
As for the recording, the machine gernerates the image (pretty much as in the video above). We have some control over gain (so we can make the pulses look bigger or smaller) and some control over sweep rate so we can have the pulses spread out or crunched up. These are fixed controls, i.e. we have 4 set sweep rates of x mm/s. There is a sVHS output that we capture via basic USB capture device (pinnacle HD) and we capture in RAW (huge file size) and then convert to divX at 12 fps to reduce the no of frames to be analysed (we usu have around 10 mins). The idea I started with was some kind of software that would 'read' rectangles off the DIVx files according to some values that I could set (e.g. size of rectangle and how far to move sideways in each frame).
Is there something in this that may make it easier?Last edited by poisondeathray; 2nd Jul 2013 at 13:20.
-
Hi took a bit of looking but this
http://www.youtube.com/watch?v=SUKsHwk4j20
is how the software is expecting the data (with apologies for the audio!) In this there is only the flow trace, but you can see that it appears from the left of the screen and everything else is the historical flow data. You can see that if you could time align with the leading edge of the sweep in my version, then you would get something like this video
thanks again for your time -
Anything like this is possible to do in software. The question is whether or not you're willing to spend the money.
I suspect what you want can even be done with an AviSynth script.