Difference between revisions of "Modifying Contours"

From MIPAV
Jump to: navigation, search
(Retracing a VOI contour)
(Trimming VOI anchor points)
Line 46: Line 46:
 
==== Trimming VOI anchor points ====
 
==== Trimming VOI anchor points ====
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> MIPAV can automatically trim anchor points from the contour. In the trimming process, unnecessary anchor points are pruned. For example, if three anchor points are on the same line, the middle anchor point is deleted. Since only two anchor points are needed to indicate a line, the middle anchor point is extraneous. The trim parameter defines what is meant by the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">same line</font>''</span>. Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour. <br /></font></div><div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> To trim anchor points<br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Select the contour you want to trim.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Select VOI &gt; Trim Parameter in the MIPAV window. The VOI Trim Parameter dialog box ([MIPAV_Segmentation.html#1011435 Figure 176]) opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Move the slider to the desired number.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
+
<div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> MIPAV can automatically trim anchor points from the contour. In the trimming process, unnecessary anchor points are pruned. For example, if three anchor points are on the same line, the middle anchor point is deleted. Since only two anchor points are needed to indicate a line, the middle anchor point is extraneous. The trim parameter defines what is meant by the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">same line</font>''</span>. Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour. <br /></font></div><div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> To trim anchor points<br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Select the contour you want to trim.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Select VOI &gt; Trim Parameter in the MIPAV window. The VOI Trim Parameter dialog box (Figure 7) opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Move the slider to the desired number.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 176. VOI trim parameter dialog box<br /></font>'''</div>
+
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 7. VOI trim parameter dialog box<br /></font>'''</div>
 
|-
 
|-
 
|
 
|
Line 56: Line 56:
 
<div class="CellBody">Specifies the number of anchor points you want the software to trim from the contour. </div> <div class="CellBody">Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour.</div>
 
<div class="CellBody">Specifies the number of anchor points you want the software to trim from the contour. </div> <div class="CellBody">Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour.</div>
 
| rowspan="2" colspan="1" |
 
| rowspan="2" colspan="1" |
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
|
 
 
[[Image:TrimVOI.jpg]]
 
[[Image:TrimVOI.jpg]]
|}<br clear="all" /><br /></font></div>
 
 
|-
 
|-
 
|
 
|

Revision as of 20:38, 13 February 2012

Modifying contours

Once contours are drawn, you can reposition, resize, or reshape them. You can also trim anchor points.

Repositioning contours

You can reposition a single contour or a group of contours. Follow the instructions below.
To reposition a single contour
Select the contour and drag it to the new location.
To reposition a group of contours
1 Hold down the Shift key as you click one of the contours in the group. All of the other contours in the group are also selected.
2 Continue to hold down the Shift key as you drag the contour group to the new location.

Resizing contours

You cannot collectively resize a group that consists of multiple contours; each contour must be resized individually. Except for point VOIs, you can resize any contour shape. For lines, only the length can be changed; the width cannot. To resize lines, go to "To resize contours".

Before you can resize them, all contour shapes except lines must be surrounded by a bounding box. See also the following section "To turn the bounding box on".
To turn the bounding box on
1 Do either of the following:
Select the contour and then select VOI > Properties in the MIPAV window.
Right-click the contour. A menu appears. Select Properties.
The VOI Statistics dialog box opens. See also Figure 27 .
2 Select Show contour bounding box.



3 Change, if you want, any of the other information in the dialog box.
4 Click Apply.
5 Click Cancel to close the dialog box.
To turn the bounding box off
1 Do one of the following:
Right-click the contour. Select Properties from the pop-up menu.
Left-click the contour. Select Properties from the VOI menu in the MIPAV window.
The VOI Statistics dialog box appears. See also Figure 5.
2 Clear Show Contour Bounding Box.
3 Click Apply.
4 Click Cancel to close the window.
To resize contours
1 Select the contour. The bounding box appears (Figure 5) around the shape. (For rectangle contours, the bounding box and rectangle legs may overlap.)
2 Click Cancel to close the window.

Figure 5. A VOI bounding box and the VOI Properties dialog box

ZeroBased VOIResizeVOIProperties1.jpg


3 Do one of the following:
To resize lines: Click an edge or corner of the shape. Drag until the shape is the desired size.
To size other shapes: Click one of the bounding box handles. Drag the handle until the shape is the desired size.

4 Choose whether to continue showing the bounding box.
Note: If you want to reposition or add an anchor point, turn the bounding box option off.

Reshaping a contour

You reshape the contour by adding or repositioning anchor points. Instructions for adding and repositioning anchor points follow.
To add anchor points
1 Click the contour to select it. The anchor points become visible.
2 Click the place where you want to add the new anchor point. The new anchor point appears.
To reposition anchor points

You can reposition a single anchor point at a time. If you need to redraw a portion of the contour, MIPAV allows you to reposition several contiguous anchor points with one motion of the mouse.

1 Select the contour. The anchor points become visible.
2 Position the pointer over the anchor point or points that you want to reposition. The pointer changes to the shape of a hand with the index finger extended.
3 Do either of the following:
To reposition a single anchor point: Drag the anchor point to the new location.
To reposition several anchor points: Hold down the Alt key as you drag the anchor points in the counterclockwise direction to their new locations.

Retracing a VOI contour

To retrace a VOI contour do the following (see Figure 6):
1 Select an existing VOI;
2 Hold the ALT key and use the mouse to pick up a point on the VOI;
3 While holding both the ALT key and left mouse button, move the mouse clockwise to redraw the VOI;
4 Stop moving when you reach the last point which you would like to redraw.
Figure 6. Retracing a VOI contour

RetracingVOI.jpg


Trimming VOI anchor points

MIPAV can automatically trim anchor points from the contour. In the trimming process, unnecessary anchor points are pruned. For example, if three anchor points are on the same line, the middle anchor point is deleted. Since only two anchor points are needed to indicate a line, the middle anchor point is extraneous. The trim parameter defines what is meant by the same line. Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour.
To trim anchor points
1 Select the contour you want to trim.
2 Select VOI > Trim Parameter in the MIPAV window. The VOI Trim Parameter dialog box (Figure 7) opens.
3 Move the slider to the desired number.
Figure 7. VOI trim parameter dialog box

Trim parameter
Specifies the number of anchor points you want the software to trim from the contour.
Setting this value to zero causes only unnecessary anchor points on a straight 180-degree line to be pruned. Setting a higher value prunes all but the sharpest corners of the contour.

TrimVOI.jpg

Trim adjacent points
Trims points that are adjacent.
Apply
Applies the parameters that you specified.
Close
Disregards any changes that you made in this dialog box and closes the dialog box.
Help
Displays online help for this dialog box.

4 Click Apply. The software removes all unnecessary anchor points.
5 Click Close to close the dialog box.

Grouping and ordering contours

By default, when you draw multiple VOIs they appear grouped in a single group, and therefore all colored in the same color. To ungroup VOIs, select one VOI from the group, and then call VOI>VOI Grouping>Group VOIs. This will ungroup VOIs and they appear in the image in different colors. To group VOIs, select the VOIs which you would like to group (use Ctrl Shift right mouse combination of keys for multiple selection), and then call VOI>VOI Grouping>Group VOIs. This will group selected VOIs and they all appear in the image colored in the same color.

Grouping contours

A group may consist of one or more contours. A contour is assigned to only one group. When a contour is initially drawn or generated, MIPAV assigns it to a default group. MIPAV also assigns default group properties, such as color and name. Each contour inherits the properties of its assigned group. At any time, you can change the properties of a group or its members (contours).
To change the group with which a contour is affiliated
1 Right-click the contour you wish to modify.
2 Select Properties. The VOI Statistics dialog box opens. See [MIPAV_QuickStart.html#2759314 Figure 33].
The name of the VOI appears in the Name of VOI text box. A colored box appears beside the text box.
To change group properties
1 Select the colored box on the VOI Statistics dialog box. The Pick VOI Color dialog box opens.
2 Click OK to apply the color to the grid/border. The Pick VOI color dialog box closes.
3 Click OK.
To change the name of the VOI, modify the name in the text box next to the Name of VOI colored box.
To adjust the opacity, move the slider in the Opacity panel. The number in the center indicates the current value; 0 is transparent and 1 is opaque.

Splitting VOI contours

A VOI can be divided into two or more contours using the Split VOI Contour icon. Any contour that is initially drawn or generated can be spitted into two contours using that tool. For result VOIs, MIPAV assigns default VOI properties, such as color and name. By default, the result VOIs have the following names: firstVOI and secondVOI.

Each result contour inherits the properties of its parent VOI. However, at any time, you can change the properties of result contours using the standard MIPAV tools (see [MIPAV_Segmentation.html#998415 "Contouring structures manually" ]).

To split a VOI
1 Select the VOI.
2 Click the Split VOI Contour icon on the VOI toolbar, the mouse cursor changes to " ".
3 In the image, use the mouse to draw the line splitting the VOI into two.
4 In the Split VOI dialog box that appears, specify if you want to split the VOI in all slices or only in the active slice. Press Split.

The result VOIs appears in the image, see [MIPAV_Segmentation.html#1656774 Figure 177].

Figure 177. Splitting a VOI: (a) the initial VOI and (b) the two result contours


{| align="center"

SplitVOI.jpg



|}


Ordering contours

If two or more contours overlap, MIPAV organizes them so that they appear one on top of the other, much like a stack of papers on a desk. This is often not readily apparent because, by default, when contours are drawn, they are transparent and only the outlines are visible. Thus, if two contours overlap, all parts of each contour, except the areas where the outlines overlap, can be seen.
To fill contours
1 Right-click the contour.
2 Select Properties. The VOI Statistics dialog box opens. See also [MIPAV_Analysis.html#1362684 Figure 196 on page 311].
3 Clear the Boundary or Blended check box to remove the check mark, then click Apply.
4 Close the VOI Statistics dialog box. The contour is filled with the default paint color. To change the paint color, refer to [MIPAV_Segmentation.html#1348003 "Manually creating a mask using paint" on page 282].
To arrange contours
1 Click the contour to be reordered. See [MIPAV_Segmentation.html#1631684 Figure 178].
2 Select the Contour Order context menu. Then select one of the following commands:
Bring to Front: Moves the contour in front of all of the other contours.
Send to Back: Moves the contour behind all other contours.
Bring Forward: Moves the contour forward one position. For example, if you select this command and the contour is the third contour in a stack of five contours, the contour is moved to the second position in the stack.
Send Backward: Moves the contour backward one position. For example, if the contour is the third contour in a stack of five contours, the contour is moved to the fourth position in the stack.
The software reorders the contours according to the command.
Figure 178. Arranging the VOIs


{| align="center"

ZeroBased VOIContours.jpg



|}


Smooth VOI

To smooth a VOI, select it first, and then call VOI > Smooth VOI. The Smooth VOI dialog box opens. This dialog sets the parameters and then calls the algorithm for smoothing the VOI. In the dialog box, you can specify the following:

Whether or not to remove the original selected VOI;
Whether or not to apply trimming to remove nearly collinear points;
A number of interpolation points.

In 2D images all selected curves of a selected VOI are smoothed. In 3D images all selected curves in all slices of a selected VOI are smoothed. The original Z-slice information is only used so that the default number of interpolated points comes from a contour in a Z-slice.

If the original VOI was not removed, the new VOI has a new color. If the original VOI was removed, the new VOI has the same color as the original VOI had.


Figure 179. Smooth VOI dialog box

Replace Original Contour
If selected, this option allows a new smoothed VOI to replace the original VOI.

{| align="center"

SmoothVOI.jpg



|- |

Trim Collinear Points

|

If selected, it allows to trim points that are adjacent.

|- |

Number of Interpolation Points

|

Enter the number of interpolation points that will used to calculate a new smoothed VOI.

|- |

OK

| rowspan="1" colspan="2" |

Applies the parameters that you specified.

|- |

Close

| rowspan="1" colspan="2" |

Disregards any changes that you made in this dialog box and closes the dialog box.

|- |

Help

| rowspan="1" colspan="2" |

Displays online help for this dialog box.

|}


Allow VOI holes (XOR)

This option (if turned on) allows to preserve holes in VOIs when converting them to masks (see [MIPAV_Segmentation.html#1611149 ``Converting VOI contours to masks'']), see [MIPAV_Segmentation.html#1652333 Figure 180].
Figure 180. The Allow VOI holes (XOR) option is turned on


{| align="center"

AllowVOIHolesXOR.jpg



|}