3D Region Growing Method that defines the borders of the volume to grow using the threshold values (lower and upper limit).
Name | Type | Description | |
in_fld | Mesh+Data | input field | |
Name | Type | Description | UI Control |
min | float | minimum threshold value | Field |
max | float | maximum threshold value | Field |
seed_x | int | x-coordinate of seed voxel | Slider |
seed_y | int | y-coordinate of seed voxel | Slider |
seed_z | int | z-coordinate of seed voxel | Slider |
Name | Type | Description | |
out_fld | Mesh+Data | output field of the grown region. | |
out_obj | DataObject | directly renderable output object of the grown region. | |
The SeededThreshold macro grows a 3D region from a seed voxel using a recursive algorithm. It is a region growing algorithm which is working on the NodeData values of the input field. The region is grown from the seed voxel in all directions in the 3D-space (26). The region growing stops if the NodeData value of a voxel is less than then the minimum value (lower limit) or bigger than the maximum value (upper limit) given by the user. Voxels within the grown region keep their NodeData values all other NodeData values are set to 0.
The macro includes a user interface. The Minimum and Maximum Values and Seed voxel can be controlled from the user interface panel. It should be noted that as the low level function is highly recursive the SeededThreshold requires a large Stack.
in_fld
Reference to the input field. It has to be a 3D field with a scalar node data component.
min
A member of the SeededThresholdParams parameter block group. This float value is used as the minimum threshold value for the region growing. The region is not grown across voxels where the node data value is smaller than this value.
max
A member of the SeededThresholdParams parameter block group. This float value is used as the maximum threshold value for the region growing. The region is not grown across voxels where the node data value is bigger than this value.
seed_x; seed_y; seed_z
Members of the SeededThresholdParams parameter block group. This int values are used as the coordinates of the seed voxel for the region growing. The region is grown starting form the seed voxel in all directions (26) as long as the node data value is between the minimum and the maximum threshold values.
out_fld
The most primitive output field of the SeededThreshold macro. This contains the new 3D model grown starting from the seed voxel using the minimum and maximum threshold values. The grown region is combined with its original data component. Voxels which are not part of the region have a zero node data value.
out_obj
The directly renderable output field of the SeededThreshold macro. This contains a DataObject object that can be rendered by the standard data viewers. The DataObject is generated directly from the field data created from the input model.
The User Macro SeededThreshold makes use of the Functional Macro SeededThresholdFunc and the UI Macro SeededThresholdUI.
An example application SeededThresholdEg is provided, which loads a Field-File and grows a region from a given seed voxel. The output filed is then cut using cut_plane to show the thresholding on minimum and maximum value.
iac_proj/seedthr/sthrmods.v contains the V definitions of the SeededThresholdParams parameter block and the SeededThresholdCore module.
iac_proj/seedthr/sthrmacs.v contains the V definitions of the SeededThresholdFunc Functional Macro, the SeededThresholdUI User Interface Macro, and the SeededThreshold User Macro.
iac_proj/seedthr/sthrapps.v contains the V definition of the example application SeededThresholdEg.
The low-level SeededThresholdMods library containing the low-level module SeededThresholdCore does not specify a process. By default the express process will be used.
The SeededThresholdCore function uses an recursive algorithm for the region growing, hence it requires a big stack. To grow for example a volume of
64x64x64 voxels a minimum stack size of about 17MByte is required. If the stacksize is too small AVS/Express exits with a Segmentation fault.
On UNIX systems the stack-size can be changed using:
ulimit -s <i>stacksize</i>
Dave Goughnour Advanced Visual Systems, Inc.
Tobias Schiebeck International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL