-
Notifications
You must be signed in to change notification settings - Fork 18
5. How to Use BMode.m
Crystal Coolbaugh edited this page Jan 3, 2017
·
5 revisions
BMode.m is a standalone version of the automated edge detection code used in FloWave.US. It is designed to be used if vessel diameter is the primary measurement outcome. We recommend using BMode.m to acquire a mean vessel diameter measurement for high-resolution brightness mode video recordings; however, the code will function on images acquired in Duplex mode.
- Open Matlab.
- Add the FloWave.US Source Code folder to the Matlab path.
- Type
BMode
in the command prompt and press enter.
- Follow the instructions displayed in the command prompt window.
- Choose the folder directory that contains the video that you would like to analyze.
- Browse to the folder and click Open when at the appropriate folder path. A list of the folder contents will be displayed in the command prompt for reference.
- Type the filename and extension (e.g. Resting1.mov) of the video into the command prompt and press enter.
- A figure will display the first image of the video. Enlarge the figure to improve the view of the distance scale.
- When you move the mouse, you will see a red cursor.
- Define an ROI around the distance scale. Click on the upper left corner and lower right corners of the desired ROI. The ROI should include as much of the scale as possible.
- A figure of the distance scale will be displayed. Define the distance pixel scaling factor.
- When you move the mouse, you will see a red cursor. Align the cursor with a scale marking and click the left mouse button. Repeat this step to select a scale marking at the opposite side of the scale.
- Note: Click on scale positions that are far apart. Choosing extreme positions will increase the number of pixels used in the calculation of the scaling factor.
- A menu will appear on the left corner of the screen asking for the direction of the scale ("Vertical" or "Horizontal"). Click on the appropriate option and minimize the figure.
- Type the scaling factor into the command prompt and press enter.
- Note: The scaling factor is the value between the selected scale markings. For example, if you selected distance positions of 1 and 2 cm, the scaling factor is 1. Enter only the integer value; units are not needed.
- You can repeat the calibration if needed (e.g. an incorrect scaling factor was entered). Type 'y' or 'n' into the command prompt to either repeat the calibrations or advance to the next step in the code, respectively.
- Enlarge the image of the vessel.
- Use the mouse cursor to click on two points to define the vessel ROI in the image. The first click defines the upper-left corner of the ROI. The second click defines the lower-right corner of the ROI.
- Note: The ROI should include a portion of the vessel where the vessel walls are bright and visible and the lumen of the vessel is dark. If possible, the ROI should be in close proximity, but not include the Doppler cursor gates.
- Note: ROI size affects the processing time. Choose a small ROI for faster results.
- Note: The X/Y coordinates of the selected cursor positions will be displayed in a yellow box in the upper left corner of the figure. You can use these coordinates as a reference for the selected ROI position.
- A series of figures with the vessel ROI rotated 90 degrees will appear. Enlarge the figure.
- Figure 1: Click on the center of the vessel lumen.
- Figure 2: Click on two points on the vessel wall to define the wall angle. The vessel wall angle is used to calculate the perpendicular distance between pixels.
- Type 'y' or 'n' in the command window prompt to choose to repeat the point selection for the ROI or to advance to the next portion of the code.
- A figure of the measured vessel diameter versus time will be displayed. Inspect the data to assess the quality of the vessel diameter measurement.
- The distance scaling factor (DistCon) and mean vessel diameter for the B-mode video (MeanDiam) will be displayed in the command prompt. Save these values for future reference.
- Note: The units of the measurement for the vessel diameter depend on the scaling factor used in the ultrasound manufacturer's scale. If the scale's units are centimeters, the vessel diameter will be in centimeters.