User Tools

Site Tools


other:dsx:surface3d:tutorials:segment_a_file_and_create_a_model

Segment a File and Create a Model

Overview

This tutorial discusses the basic steps needed to Segment a file and create a Surface Model.

Adding Landmarks and POIs

Landmarks are 3D locations in the image data, such as ligament attachment points, that you digitize for later use in other applications. Points of Interest (POIs) are 3D locations (usually a bead) that are tracked in a DSX trial. The coordinates of either locations are expressed in the segmented object’s reference frame, and are stored in the subject file.

To create a landmark/poi:

Note: Make sure you add landmarks/pois to an object after cropping the image data to that object so that the landmark coordinates will be in the same reference frame as the segmented object.

1) Use the View menu to display the Landmarks/POIs widget.
2) Click on the Add Landmark/POI button at the bottom of the widget.
3) Move the cursor into one of the 2D image data windows; the cursor will change into a cross hair with the 3D coordinates next to it.
4) Left click in any of the 2D windows to create the landmark/poi.
Note: Press Esc to cancel without clicking.
5) Change the name of the landmark/poi by double-click on its name in the widget and typing in a new name.
6) To move an existing landmark/poi, select it by clicking anywhere on its row in the list and then click on the new location in one of the 2D windows.

Segmentation

In order to segment an image:

1) Loading the 3D image data using either the Load Image or Load Subject menu items. The image formats currently supported are: dicom, raw, and tif.
2) Add a label to the segmentation widget via the Add Object Label item of the Segmentation menu.
3) The items in the Segmentation widget table can be edited by double-clicking on them with the left mouse button.
4) The histogram of the image data can be used to specify the range of image intensities to which to assign a given label. There are two vertical lines in the histogram that can be selected and dragged with the mouse cursor. The green line represents the lower segmentation threshold, the red line the upper segmentation threshold.
5) After positioning the thresholds on the histogram, select the Segmentation-Select Thresholding Seed menu item. The cursor will now change into a crosshair when hovering in one of the 2D windows. Use the left mouse button to define the seed point in one of the 2D windows. Pressing 'Esc' will cancel the selection of the seed. Surface3D will start at this seed point and search in all three dimensions for voxels which are between the two thresholds and connected to the seed point. All of these voxels will be labelled with the selected label.
6) Once you see the labelled voxels, you can change the upper and lower thresholds and the labelled region will automatically update. Note: the updating process is slow!

Editing the Segmentation Label

Simple thresholding is usually not sufficient for segmenting an object from CT or MRI data. After setting the threshold as best you can, you can modify the segmentation by filling holes, erasing voxel labels, and painting voxel labels. These commands are described below. You can also undo/redo these edits using the Undo and Redo commands in the Segmentation menu. The number of commands stored in the undo list is specified by the Undo Limit parameter.

Note: If you change the label thresholds in the histogram widget, Surface3D will recalculate the segmentation from the initial seed point, thus deleting any manual edits you have made.

Fill 3D Holes

Segmentation holes are unlabelled image voxels that are completely surrounded by labelled voxels. the Fill 3D Holes command will automatically label all holes in the 3D segmentation that are smaller than a certain volume threshold.

The command is initiated by selecting Fill 3D Holes from the Segmentation menu. A dialog first appears in which the user can adjust the value of the 3D Hole Threshold parameter.
Shortcut: Ctrl + H can also be used.

Manual Hole Filling

Manual hole filling works in 2D, on a single slice of image data.

1) Press and hold the M key.
2) Left-click on a hole in one of the 2D windows.

Erase Object Labels

This command erases a circular region of the segmentation label in one 2D image slice.

1) Press and hold the E key.
2) Left-click on one of the 2D slices at the center of the region you want to erase.
Note: The size of the region is controlled by Paintbrush Radius in the Settings dialog. If the voxels have the same size in the two dimensions of the slice the painted region will be a circle, otherwise it will be an ellipse.

Paint Object Labels

This command paints a circular region of the segmentation label in one 2D image slice.

1) Press and hold the P key.
2) Left-click on one of the 2D slices at the center of the region you want to paint with the label.
Note: The size of the region is controlled by Paintbrush Radius in the Settings dialog. If the voxels have the same size in the two dimensions of the slice the painted region will be a circle, otherwise it will be an ellipse.

Masking and Cropping Image Data

To make the segmented image suitable for DRR generation in X4D, it needs to be masked and cropped using Mask Labeled Image Data followed by Crop Image Data to Labels from the Image menu. This actions involve setting all unlabelled voxels to zero and cropping the image to the minimum dimensions that include all of the labelled voxels, respectively.

Surface Model

After the object of interest has been labelled and the image data has been cropped, you can create a surface model from the segmented image. Surface3D uses a marching cubes algorithm to generate a surface model of triangles from the labelled voxels.

1) Select Create Surface Model from the Segmentation menu.
2) After the model has been made you can smooth and decimate it using the Smooth Surface Model and Decimate Surface Model commands in the Segmentation menu.
Note: In order for the surface model to be in the same reference frame as the segmented image (used for DRR generation), it is important to create the surface model after the image data has been cropped.

other/dsx/surface3d/tutorials/segment_a_file_and_create_a_model.txt · Last modified: 2024/07/17 15:44 by sgranger