Modifying Contours

From MIPAV
Revision as of 17:42, 21 February 2012 by Angelfish100 (Talk)

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

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


</font></div>
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.

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.
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 "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 Figure 8.

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

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.
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 "Manually creating a mask using paint".

To arrange contours
1 Click the contour to be reordered. See Figure 9.
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 9. Arranging the VOIs

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 10. Smooth VOI dialog box
Replace Original Contour
If selected, this option allows a new smoothed VOI to replace the original VOI.

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
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.

Allow VOI holes (XOR)

This option (if turned on) allows to preserve holes in VOIs when converting them to masks (see "Converting VOI contours to masks"), see Figure 11.

Figure 11. The Allow VOI holes (XOR) option is turned on

AllowVOIHolesXOR.jpg

The algorithm uses the XOR operation, for more information, refer to "Morphology".

Copying, cutting, and pasting VOIs

You can undo, cut, copy, and paste a VOI within the image, to another slice in the image dataset, or to another image dataset.

To undo a VOI
1 Select the VOI.
2 Select Edit > Undo VOI in the MIPAV window. The software removes the VOI from the image.

To cut a VOI
1 Select the VOI.
2 Select Edit > Cut VOI in the MIPAV window. The software copies the VOI to the clipboard and deletes it from the window.
Tip: You can also remove a VOI by pressing the Del key after selecting the VOI.

To copy and paste a VOI
1 Select the VOI.
2 Select VOI> Edit VOI> Copy VOI. It is copied to the clipboard.
3 Now, do one of the following:

  • Navigate to another slice using the Image Slice Slider.
  • Or open another image dataset.

4 Select VOI > Edit VOI > Paste VOI. The program copies the VOI from the clipboard and pastes it into the image.
< You can only copy and paste a single, not multiple, VOIs into another slice using the Paste command. Also, note that the software pastes a copied VOI into the image at exactly the place from which it was copied.

To propagate multiple VOIs to the next or previous slice in the dataset
PropagateBothSideIco.jpg - Propagate Both Sides; PropagateLeftIco.jpg - Propagate Left; PropagateRightIco.jpg - Propagate Right;
1 Select all of the VOIs that you want to copy.
2 Do one of the following:
Click the Propagate VOI up icon, to copy the VOI to the next slice.
Click the Propagate VOI down icon, to copy the VOI to the previous slice.
Click the Propagate VOI to all slices icon, to copy it to every image in the dataset.

Deleting VOIs

You can easily delete a VOI or one of its contours.
To delete a VOI
1 Select the VOI or one of its contours.
To delete a VOI that consists of many contours, hold down the Shift key and then click one of the contours in the VOI group.
2 Do one of the following:
Right-click on the VOI, and then select Edit > Delete.
Select Edit > Delete VOI in the MIPAV window.
The software removes the VOI or contour.

Saving and opening VOI files

You can save a VOI to a text file. This file can then be opened and applied to the same dataset or a different one, or it can be manipulated using a word processor.
To save a single VOI as a text file
1 Select a contour or a VOI.
To select a contour, click on it.
To select a VOI, hold down the Shift key and select a contour. All contours that are part of the VOI are selected.
2 Do either of the following:

  • If you want the software to automatically name the file, select VOI > Save VOI in the MIPAV window. The software saves the file with an.XML extension.
  • If you want to assign the file name, select VOI > Save VOI as. The Save as dialog box appears.
    • a Type the name of the VOI file in the File Name box. Be sure to use either the VOI extension or the XML extension.
    • b Click Save. The software saves the file under the specified name.

To save multiple VOIs
Do either of the following:

  • To allow the software to automatically name the file, select VOI > Save All VOIs.
  • To assign a file name to the file, select VOI > Save All VOIs as.
    • a Type the name of the VOI file in the File Name box. Be sure to use either the VOI extension or the XML extension.
    • b Click Save. The software saves the file under the specified name.

To open saved VOI files
1 Select the image window of the dataset to which you want to apply the VOI.
2 Select VOI > Open VOI in the MIPAV window. The Open dialog box appears.
3 Select the file or files and then click Open. The VOI or VOIs appear in the image window.
If you make a change to the VOI and want to make a change to the file, select VOI > Save VOI in the MIPAV window. The changes are saved to the VOI file.

Segmenting Images Using Contours and Masks: Generating Masks