The DistanceMapSegmentationDialog performs a 3D segmentation based on the difference in the value of neighboured pixels. The segmentation itself is done by region growing. This module works only with byte data. The DistanceMapSegmentationDialog provides an independent window containing the user interface and all the viewers neccessary to use the DistanceMapSegmentation module.
Input Ports
Name Type Description in Mesh_Unif + Node_Data Input data from which the segmentation will be performed visible int Possibility to hide DistanceMapSegmentationDialog window (optional input)
0 - hide
1 - show (default)Parameters
Name Type Description UI Control axes
planeint values defining slice number and viewing direction of 2D input UIradioBoxLabel
UIslider
init_mask
init_points
resetint triggers functions to initialize the mask
removes all values from current mask
removes all points from current mask
deletes all masks and pointsUIbutton fill_mode int decides which operation should be performed with the masks (replace, add, intersect, subtract) UIradioBoxLabel mask_num int current mask number (between 1 and 100) UIslider tolerance int value declares the accepted difference in the voxel-value from the picked value to be part of this mask UIslider fill_val int value of the region of interest, usually picked by mouse UIfield cutoff int provides threshold for segmentation; values below this threshold are set to 0 UIslider smooth int threshold used for mask operations UIslider smooth_out int decides about the kind of smoothing (no smoothing, smooth diam 3, smooth diam 5) UIradioBoxLabel do int starts the calculating of the 3D segmentation UIfield Output Ports
Name Type Description out Mesh_Unif + Node_Data 3 D output of the segmentation, includes a 'shadow' of not segmented objects obj DefaultObject 3 D output of the object that shows the segmentation as it is rendered by the volume renderer
The DistanceMapSegmentationDialog macro works in the same way as the DistanceMapSegmantation macro, see distmap.html. The difference between these two modules is that the wizard provides an own viewer in which all outputs are displayed, see picture above. It provides only two outputs a Meh_Unif+Node_Data (out) that is the 3D segmented output and a DefaultObject (obj) which can be rendered directly, which shows the segmented object and a 'shadow' of the not segmented objects in the volume, but not a bounding box.
in
Input of 3D volume data, usually provided by a Read Field module. This is the data which should be segmented using this module. This input is required.
visible
This input decides whether the DistanceMapSegmentationDialog window is shown or not. If the input is 0 the window is hidden, value 1 shows it again. The input si optional and the default is 1.
axes
plane
This values define the current slice. The axis provides the viewing direction on the volume data, the plane the depth of the selected slice in the volume.
init_mask
init_point
reset
This are parameters which trigger functions to reset the current mask, or to reset all picket point points, or to reset everything, so all masks and all points get deleted.fill_mode
There is the choice between four mask operations. You can replace an existing mask, you can add new values to it, or intersect two masks or make the difference between them. It is impossible that two masks have points at the same place. The default fill mode is replace the old mask with the new one.
mask_num
You could have up to 100 different masks for the same volume. This parameter specifies the current.
tolerance
The tolerance provides a value to specify the allowed difference between neighboured voxels to belong to the same area of interest. This is one of two possibilities to select the correct area of the volume, the other parameter is cutoff.
fill_val
The value of the voxel which was picked as part of the area of interest. Pixels around this voxel with a value within the choosen tolerance get selected as part of the area of interest.
cutoff
The second value to influence the mask. It provides a threshold. After the distance map was created all voxels which have not the same value as the picked one are represented by their difference in value. If the difference is bigger than this threshold they get excluded from the mask.
smooth
This is the threshold for the mask opperations. Only values above this threshold get considered.
smooth_out
The user has the choice between no smoothing, smooth diam 3, or smooth diam 5. The difference between the two smoothing methods is the radius which gets considered (one voxel on each side or two). This is useful if you want to prevent the creation of pointy areas.
do
If this value gets set, it triggers the calculation of the 3D segmentation.
out
This is the segmented output field. The current selected mask is used to calculate this output. It includes also a 'shadow' of the other not currently segmented objects in the data.obj
This is a direct displayable output of the segmentation as it is done by the volume renderer, it does not include the bounding box but it includes the 'shadow' of all not segmented objects in the field.
The user macro DistanceMapSegmentationDialog uses the DistanceMapSegmantation macro, which is described in distmap.html. Additionally it employs an own Uview2D and provides an own framework with the macro UI.
The DistanceMapSegmentationDialogEg example application loads a file and displays all outputs in an own Uviewer.
"../iac_proj/distmap/dstmppar.v" contains the V definition of the parameter blocks. pt_params defines the point parameter needed; pt_init_params defines the reset of the picked points; fill_params includes all needed parameter to fill a mask; out_params includes all needed parameter to do the segmentation; points include all picked points; distmapParams include all other parameter blocks.
"../iac_proj/distmap/dstmpmod.v" contains the V definition modules. add_points handels the picking of new points from the input slice; create_outf creates the 3 D output; create_outm creates the mask output; dis_fill creates the distance map; init_points resets all picked points of current slice; init_mask resets the mask of current slice; reset_all resets the points and masks of all slices;
"../iac_proj/distmap/dstmpmac.v" contains the V definition of the macros. DistanceMapSegmentationUI describes the user interface of this module; distance_map_slice creates the data input slice according to the selected axis and plane; DistanceMapSegmentationFunc is the functional macro in this library; DistanceMapSegmentation and DistanceMapSegmentationDialog are the user macros.
"../iac_proj/distmap/dstmpapp.v" contains the V definition of the example applications. DistanceMapSegmentationEg is a multi-window application that uses the DistanceMapSegmentation user macro, separate output windows; DistanceMapSegmentationDialogEg uses the DistanceMapSegmentationDialog as user macro, all windows are displayed in one viewer.
Dr Krzysztof Nowinski Warsaw University
Tobias Schiebeck International AVS Centre Anja Bindrich MVC University of Manchester
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL