Segmenting Images Using Contours and Masks: Using contours to segment a VOI

From MIPAV
Revision as of 20:36, 10 February 2012 by Angelfish100 (Talk)

(diff) <previousrevision> | Latest revision (diff) | <nextrevision> (diff)
Jump to: navigation, search

Using contours to segment a VOI

A VOI can consist of a single contour or several contoured structures that are assigned to a group. You can automatically, manually, or interactively draw contours on any image that is shown in the default view. You can modify the shape and size of a contour and trim anchor points.

Once contours are drawn and modified, you can copy them to other slices in the dataset or save them to a separate file for future use. The three overall tasks involved in using contours to segment a VOI are:

Drawing contours ([MIPAV_Segmentation.html#998348 "Drawing contours" on page 259])
Modifying contours ([MIPAV_Segmentation.html#1613292 "Modifying contours" on page 268])
Grouping and ordering contours ([MIPAV_Segmentation.html#1023231 "Grouping and ordering contours" on page 273])

Drawing contours

You can draw contours using three different methods: manual, interactive, or automatic. With the manual method, you use the mouse to draw a contour. This method provides the greatest amount of freedom: you can choose one of MIPAV's predefined shapes or create a freehand shape. However, the manual method can be time consuming, particularly if the structure to be contoured is intricate. With the interactive method, you must also manually contour the structure. However, in this case the manually drawn contour need not be precise because you then apply an algorithm that generates a new contour based on both the manually drawn contour and the structure. With the automatic method, MIPAV generates contours as you move the mouse over different structures. The automatic method is generally accurate and quick; however, it does not provide the freedom of the manual method.
Recommendation. If you are unsure about which contour method to use, it is recommended that you try the automatic method first.

Contouring structures automatically

In this method, you move the mouse pointer over a structure. MIPAV first analyzes the intensity values and then contours what it perceives to the contour boundary.

Complete the following steps:

1 Select VOI > New VOI > Levelset in the MIPAV window.
2 Move the mouse pointer to the image.
The pointer changes to the cross-hair shape. As you move the pointer, MIPAV determines the level of intensity of the pixel under the cross-hair pointer and uses the results from the Levelset algorithm to determine the probable boundary of the structure. Having determined the probable boundary, MIPAV generates a contour ([MIPAV_Segmentation.html#1010095 Figure 170]). Continue to move the pointer until the structure you wish to outline is contoured.
3 Click the contour to apply it to the structure. See [MIPAV_Segmentation.html#1010095 Figure 170].

{| align="center"

ExampleLevelSetVOI.jpg



|

Figure 170. Automatically generated contour.
You can now do the following:
Draw an additional contour
Modify the contour
Reassign an existing contour to a different group
Order the contours
Delete the contour

|}


Contouring structures manually

You can contour structures in images by selecting one of MIPAV's predefined shapes, such as a point, straight line, 2D or 3D rectangle, 2D ellipse, interslice VOI, etc. Alternatively, you can use the polygon and polyline tools to draw freehand shapes. For more information about VOIs available in MIPAV, refer to [MIPAV_Segmentation.html#1615758 Figure 171].
Figure 171. VOIs available in MIPAVÂ

PointVOI.jpg - Point VOI
Â

{| align="center"

PointVOI.jpg



Â

|

InterSlicePolilineIco.jpg - Interslice Polyline
Â

{| align="center"

| IntersliceVOI.jpg

|}

|- |


{| align="center"

| LineVOI.jpg

|}
LineVOIIco.jpg - Line VOI

|


{| align="center"

| ProtractorTool.jpg

|}
ProtractorToolIco.jpg - Protractor tool

|- |


{| align="center"

| RectVOI.jpg

|}
RectangleVOIIco.jpg - Rectangular VOI

|


{| align="center"

| ElliptVOI.jpg

|}
EllipticalVOIIco.jpg - Ellipse VOI

|- |


{| align="center"

| POlygonVOI.jpg

|}
PolylineVOI.jpg - Polygon/Polyline VOI

|


{| align="center"

| LevelSetVOI.jpg

|}
LevelsetVOIIco.jpg - Levelset VOI

|- |


{| align="center"

| LIveWireVOI.jpg

|}
LifeWireVOIIco.jpg - Live wire VOI

|


{| align="center"

| 3DRectVOI.jpg

|}
3DrectangularVOIIco.jpg - 3D rectangular VOI

|}


This section explains how to draw the following:

Point VOIs
VOIs with a straight line
2D rectangular VOIs
3D rectangular VOIs
Ellipsoidal VOIs
Polyline (segmented line) and closed polygon VOIs
Tip: Before you begin, decide whether you want to draw more than one of the same contour in succession. If you do, hold down the Shift key as you select the contour button and draw the contours.
To draw point VOIs
PointVOI.jpg - Draw Point VOI
1 Click the Draw Point VOI button, in the MIPAV window.
2 Move the pointer to the image.
3 Click the area where you want the point to appear. A numbered point appears on the image.
Note: For some algorithms, the sequence in which you draw the points is important (refer to Volume 2 of the User's Guide).
To create VOIs with a straight line
LineVOIIco.jpg - Draw Line VOI
1 Click the Draw line VOI icon.
2 Click the area on the image where you want the line to begin.
3 Drag the pointer to the place where you want the line to end. As you drag the pointer, the line lengthens.
4 Release the mouse button. The line VOI appears on the image in red.

To create 2D rectangular VOIs
RectangleVOIIco.jpg - Draw Rectangular VOI
1 Click the Draw Rectangle VOI icon.
2 Click the area on the image where you want a corner of the rectangle to appear.
3 Drag the pointer. As you drag the pointer, the rectangle changes in size.
4 Release the mouse button when the rectangle is the desired size.
Note: When you create a 2D rectangular VOI, the rectangles appear on only one slice in the dataset.
To create 3D rectangular VOIs
3DrectangularVOIIco.jpg - Draw 3D Rectangular VOI
1 Click the 3D rectangular VOI icon.
2 Click the area on the image where you want a corner of the rectangle to appear.
3 Drag the pointer. As you drag the pointer, the rectangle changes in size.
4 Release the mouse button when the rectangle is the desired size.
Note: Unlike 2D rectangular VOIs, 3D rectangular VOIs appear on all slices in the dataset.

To create ellipsoidal VOIs
EllipticalVOIIco.jpg - Draw Ellipsoid VOI
1 Click the Draw Ellipse VOI icon.
2 Click the area of the image where you want an edge of the ellipse to appear.
3 Drag the pointer. As you drag the pointer, the ellipse changes in size.
4 Release the mouse button when the ellipse is the desired size ([MIPAV_Segmentation.html#1615758 Figure 171]).

To create polyline (segmented line) VOIs or closed polygon VOIs
PolylineVOI.jpg - Draw Polygon/Polyline VOI
1 Click the Draw Polygon/Polyline VOI icon.
2 Click the area of the image where the polyline VOI should begin.
3 Decide whether to draw either a straight or freehand line segment. Do one of the following:
To draw a straight line segment
Make sure that you have released the mouse button. Move the pointer to the place where you want the segment to end. A straight line, which extends from the starting place to your pointer tip, appears. Click the mouse button to anchor the line segment.
To draw a freehand line segment
Drag the mouse button and move the pointer to the place on the image where you want the segment to end. A line, which matches your mouse movements, extends from the starting place to your pointer tip. Click the mouse button to anchor the line segment.
4 Repeat drawing straight line segments or freehand lines until you finish drawing all of the segments needed to contour the structure.
5 Decide whether to create a polyline VOI or a closed polygon VOI:
Polyline VOI: Go to the next step.
Closed polygon VOI: Click the first anchor point to connect the last line segment to the first, thus forming a closed polygon. Then go to the next step.
6 Click the Default icon, to return the pointer to the default mode.
7 Double-click the mouse button to complete the polyline VOI.
Tip: Depending on which is more comfortable, you can switch between drawing straight line segments or drawing freehand lines at any time.
Tip: To draw multiple VOI, hold Shift while pressing the corresponding VOI icon.

Contouring structures interactively

In the interactive method, you first manually draw a contour that provides a general indication of the location and shape of the structure. You then select an algorithm that analyzes the manually drawn contour and generates a new one that more closely outlines the structure.
To use the interactive method to contour structures, complete the following steps:
1 Draw a contour using one of the manual methods detailed in [MIPAV_Segmentation.html#998415 "Contouring structures manually" on page 260]. The contour need not be precise, but it should indicate the general location and shape of the structure you want to delineate.
2 Select the contour. White anchor points appear on the contour outline.
3 Select one of the following in the MIPAV window:
VOI > Evolve Boundary 2D > Active Contour. This algorithm determines the structure's boundary more quickly than the 2D Spline Active Contour algorithm. It is also more sensitive to noise present in the image. MIPAV applies a gradient magnitude filter to determine the structure's boundary. When complete, the MIPAV-generated contour appears around the structure.
VOI > Evolve Boundary 2D > Active GVF. The Evolve Boundary dialog box uses a special type of active contours, or snakes to find the object boundaries. GVF or the gradient vector flow snake, which is used to calculate VOI boundaries, begins with the calculation of a GVF field of forces by applying generalized diffusion equations to both components of the gradient of an image edge map. Here, GVF fields, are dense vector fields derived from images by minimizing a certain energy functional in a variational framework. The minimization is achieved by solving a pair of decoupled linear partial differential equations that diffuses the gradient vectors of a gray-level or binary edge map computed from the image. See also [MIPAV_Segmentation.html#1617792 Figure 172].
VOI > Evolve Boundary 2D > Spline active contour. This algorithm determines the structure's boundary less quickly than the Active Contour algorithm, however it is less sensitive to noise. This algorithm fits a spline to the data. When complete, the MIPAV-generated contour appears around the structure.
VOI > Evolve Boundary 2D > Spline GVF. This is the combination of the GVF force with the B-spline snake. B-spline snakes have several characteristics which make them well suitable for describing VOI boundary as well as snake evolution: the B-spline implicitly incorporates contour smoothness and avoids the ad hoc tension and rigidity parameters of the traditional GVF snake and also fewer sample points are required to implement contour evolution for the B-spline.
Figure 172. An initial VOI (A) and VOI after applying the Evolve Boundary > Active Contour algorithm with the default parameters (B)


{| align="center"

EvolveBoundaryGVFBefore.jpg



A

|


{| align="center"

| EvolveBoundaryGVFAfter.jpg

|}

B

|}