DistanceMapSegmentation
Synopsis
The DistanceMapSegmentation 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.

Input Ports
| Name |
Type |
Description |
|
| in |
Mesh_Unif + Node_Data |
Input data from which the segmentation will be performed |
|
Parameters
| Name |
Type |
Description |
UI Control |
|
axes
plane |
int |
values defining slice number and viewing direction of 2 D input |
UIradioBoxLabel
UIslider |
init_mask
init_points
reset |
int |
triggers functions to initialize the mask
removes all values from current mask
removes all points from current mask
deletes all masks and points |
UIbutton |
|
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 diam5) |
UIradioBoxLabel |
| do |
int |
starts the calculating of the 3D segmentation |
UIfield |
|
Output Ports
| Name |
Type |
Description |
|
| data_obj |
DefaultObject |
2D output of current slice with isoline of segmentation |
| out_field |
Mesh_Unif + Node_Data |
3D output of the segmentation,
includes a 'shadow' of not segmented objects |
| fill_obj |
DefaultObject |
2D output of the distance map of the segmentation of the
current slice |
| res_obj |
DefaultObject |
resulting 2D output of segmentation of this slice, includes a 'shadow' of not segmented objects |
| mask_obj |
DefaultObject |
2D output of the segmentation mask of the current slice, different masks are displayed in different colours |
|
Description
The DistanceMapSegmentation macro provides a way to segment a 3 D byte
volumes using a distance map. The user selects a area of interest by picking a
point out of it with the left mouse button while the Ctrl-key is pressed. A
border gets drown around an area with similar values. With the tolerance
and cutoff sliders this area can be adjusted. The do button starts
the calculation of the 3D segmentation of this area. The fill window shows the
distance map derived from this area. The mask window shows the mask, if there
are several masks they get drawn in different colours. The result window shows
the current slice with the distance values used in the 3D scene window.
Around the picked points a region growing is performed to select areas with
approximately the same values. This segmentation is used to create distance map.
Values below a threshold (cutoff) get ignored.
There is the possibility to have up to 100 mask of the same volume. This
masks are not independent of each other. Point in one mask cannot be also points
in another mask. Therefore mask operations are provided. You can add new
segments to an existing mask, or replace the values with the new ones; you can
also intersect or subtract two masks. To reset the current mask the user can
press reset mask, to initialize all point init points, or to reset
everything reset.
Inputs
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.
Parameters
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.
Outputs
data_obj
DefaultObject containing the current slice in the specified
direction in which the segmentation is represented by an isoline.
out_field
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.
fill_obj
This is a 2 D representation of the current slice as shown in the
data_obj output. The values come from a distance map calculated from the
selection in that slice.
res_obj
This is a 2 D representation of the current slice as shown in the
data_obj output. The values come from a global distance map from the
current selected mask (same values as in the out_field). It includes
also a 'shadow' of all not currently segmented objects in that volume.
mask_obj
This is a 2 D representation of the current slice as shown in the
data_obj output. It represents the masks in this slice. Each mask is shown
in a different colour.
Utility Macros
The functional macro DistanceMapSegmentationFunc uses the
low-level modules dist_fill, create_outf, reset_all,
init_mask, init_point and the macros distance_map_slice
which uses in one instance the module add_points, and mask_field
which uses create_outm. The user macro DistanceMapSegmentation uses this functional macro and the user interface macro
DistanceMapSegmentationUI. The distmapParams parameter block is used to connect these components together.
Example
The DistanceMapSegmentationEg example application loads a file and
displays all outputs in separate windows.
Files
"../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.
Authors
Dr Krzysztof Nowinski
Warsaw University
Modifications
Anja Bindrich,
Manchester Visualization Centre
Tobias Schiebeck
International AVS Centre
Contact
International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL
See Also
- DistanceMapSegmentationDialog
|