CSOIsoGenerator¶
-
MLModule
¶ genre CSOModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCSOModules
definition MLCSOModules.def see also CSOIsoProcessor
keywords contour
,isoline
,isovalue
,generate
Purpose¶
The module CSOIsoGenerator
generates iso-contours for a whole image at a fixed iso value.
Usage¶
Attach a CSOList that is to be filled (attach a CSOManager
to it) with the iso CSOs and an image to this module.
Details¶
The module scans the input image in a slice-wise manner. The slice orientation is fixed and always the same as one would see in a standard 2D viewer (z-plane). If differently oriented slices should be used as a base for the generation of iso contours, use an OrthoReformat3
module first.
Each slice is scanned by a marching squares algorithm that produces always closed CSOs. The border is treated as being always lower that the iso value. The CSOs can be interpolated by a linear interpolation scheme and/or smoothed by applying a spline approximation (B-Splines). A generated CSO yields approximately as many seed points as there are voxels on the iso path.
in addition to the smoothing by applying the spline approximation, a Laplacian smoothing can be applied after the spline approximation. This smoothing algorithm applies also a term that counters the shrinking effect that would normally appear with a standard Laplacian smoothing.
A keeping mode lets the user adjust which CSOs on one slice should be kept; if the mode is set to All, all CSOs are kept (if they yield enough seed points if the according restricting is enabled). If it is set to Largest, only the largest CSO (measured in number of seed points) on a slice is kept of the proto contours. The keeping modes Outmost and Inner apply an actual point-in-polygon test with using an arbitrary seed point as the point and all other CSOs as polygons. Testing one point is sufficient because iso contours never cross. Note that all keeping modes apply to contours on the same slice only.
Input Fields¶
input0¶
-
name:
input0
, type:
Image
¶ The input image that should be scanned for iso contours on its z-planes.
inCSOList¶
-
name:
inCSOList
, type:
CSOList(MLBase)
¶ The input CSOList that should be filled with scanned iso contours.
For accessing this object via scripting see the Scripting Reference:MLCSOListWrapper
.
Parameter Fields¶
Field Index¶
Add To Group : Enum |
Group Id : Integer |
Send CSO events : Bool |
Allow Undo : Bool |
Group Label : String |
Smoothing Factor : Float |
Auto apply : Bool |
Interpolate contours : Bool |
Smoothing Mode : Enum |
Auto Clear : Bool |
Iso Value : Float |
Smoothing Range : Integer |
Auto Description : Enum |
isProcessing : Bool |
Start condition : Enum |
Creation Mode : Enum |
Keeping Mode : Enum |
Start position : Vector3 |
Creator Id : Integer |
Min. Num. Seeds : Integer |
Time Point : Integer |
done : Trigger |
Mode : Enum |
Update : Trigger |
Empty group before generation : Bool |
Num. Smoothing Passes : Integer |
Use : Bool |
Ensure clockwise orientation : Bool |
progress : Float |
Use Smooth : Bool |
Generate For All Timepoints : Bool |
Reduce CSOs to one seed point : Bool |
Visible Fields¶
Mode¶
-
name:
updateMode
, type:
Enum
, default:
AutoClear
¶ Defines the update mode of this module.
Values:
Title | Name | Description |
---|---|---|
Off | Off | The module does not compute anew if the input image changes. |
Auto Update | AutoUpdate | The module computes anew if the input image changes. |
Auto Clear | AutoClear |
Auto apply¶
-
name:
autoApply
, type:
Bool
, default:
FALSE
¶ If checked, the module computes anew if any field on the GUI is changed.
Empty group before generation¶
-
name:
emptyGroupBeforeGeneration
, type:
Bool
, default:
FALSE
¶ If checked, the module will empty the CSOGroup where it stores the generated iso contours in. See
Add To Group
.
Add To Group¶
-
name:
addCSOToGroupMode
, type:
Enum
, default:
AddToGroupByLabel
¶ Defines how the module determines in which CSOGroup the generated iso contours should be stored in.
Values:
Title | Name | Description |
---|---|---|
None | AddToGroupNone | The generated iso contours are not stored in any CSOGroup. |
By Label | AddToGroupByLabel | The generated iso contours are stored in a CSOGroup that is given by a label in If a CSOGroup with the given label does not already exist, it is created before being filled. |
By Id | AddToGroupById | The generated iso contours are stored in a CSOGroup that is given by an id in If a CSOGroup with the given id does not already exist, the generated iso contours are not stored in any group. |
Group Label¶
-
name:
addCSOToGroupWithLabel
, type:
String
¶ Sets the label of the CSOGroup newly generated iso contours should be stored in.
If such a CSOGroup does not already exist, it is created.
If
Empty group before generation
is checked, the CSOGroup with this label is emptied before filled again.
Group Id¶
-
name:
addCSOToGroupWithId
, type:
Integer
, default:
-1
¶ Sets the id of the CSOGroup newly generated iso contours should be stored in.
If such a CSOGroup does not already exist, the generated CSO will not be stored in any CSOGroup.
If
Empty group before generation
is checked, the CSOGroup with this idis emptied before filled again.
Creator Id¶
-
name:
id
, type:
Integer
, default:
0
¶ Sets the creator id to the generated iso contours for a later identification.
This can be an arbitrary number.
Allow Undo¶
-
name:
allowUndo
, type:
Bool
, default:
FALSE
¶ If checked, the generation of CSOs can be undone, using the CSOList’s undo manager.
Send CSO events¶
-
name:
sendCSOEvents
, type:
Bool
, default:
FALSE
¶ If checked, the generation of individual CSOs triggers the sending of CSO application events.
Interpolate contours¶
-
name:
interpolate
, type:
Bool
, default:
TRUE
¶ If checked, the generated CSOs are interpolated by a linear interpolation scheme regarding the voxel values and the iso value.
Time Point¶
-
name:
timePoint
, type:
Integer
, default:
0
¶ Sets the time point for which the CSOs are to be generated.
Generate For All Timepoints¶
-
name:
generateForAllTimepoints
, type:
Bool
, default:
FALSE
¶ If checked, all slices for all available timepoints are scanned.
Smoothing Mode¶
-
name:
smoothingMode
, type:
Enum
, default:
SmoothingModeSplineApproximation
¶ Defines the smoothing mode that is applied after the linear interpolation (
Interpolate contours
) and before the Laplacian smoothing (Use Smooth
).
Values:
Title | Name |
---|---|
None | SmoothingModeNone |
Spline Approximation | SmoothingModeSplineApproximation |
Spline Interpolation | SmoothingModeSplineInterpolation |
Use¶
-
name:
useMinimumNumberSeeds
, type:
Bool
, default:
FALSE
¶ If checked, the module only collects CSO on slices with an adjustable minimum number of seed points (
Min. Num. Seeds
) which are generated as much as voxels lie on the iso path.
Min. Num. Seeds¶
Keeping Mode¶
-
name:
keepingMode
, type:
Enum
, default:
KeepingModeAll
¶ Defines the keeping mode to determine which of the CSO are to be kept on a slice.
Values:
Title | Name | Description |
---|---|---|
All | KeepingModeAll | Keep all generated iso contours. |
Largest | KeepingModeLargest | Keep only the largest CSO (with the most seed points). |
Outmost | KeepingModeOutmost | Keep only the outmost CSOs (or in other words, remove all inner CSOs). |
Inner | KeepingModeInner | Keep only the inner CSOs. |
Auto Description¶
-
name:
autoDescription
, type:
Enum
, default:
None
¶ Defines the description set for each generated CSO.
Values:
Title | Name | Description |
---|---|---|
None | None | No description is set. |
Slice | Slice | The slice index in which the CSO is located is set. |
Timepoint | Timepoint | Timepoint index where the CSO is located is set. |
Slice and Timepoint | Slice and Timepoint | Slice index and timepoint index where the CSO is located is set, separated by a space. |
Ensure clockwise orientation¶
-
name:
ensureClockwiseOrientation
, type:
Bool
, default:
FALSE
¶ If checked, the module ensures that all generated iso contours have a clockwise orientation.
Use Smooth¶
-
name:
useSmooth
, type:
Bool
, default:
FALSE
¶ If checked, a Laplacian smoothing is applied.
Num. Smoothing Passes¶
-
name:
numSmoothPasses
, type:
Integer
, default:
10
, minimum:
0
¶ Sets the number of passes of the Laplacian smoothing.
Smoothing Factor¶
-
name:
smoothFactor
, type:
Float
, default:
0.1
, minimum:
0
, maximum:
1
¶ Sets the factor for Laplacian smoothing.
Smoothing Range¶
-
name:
smoothRange
, type:
Integer
, default:
1
, minimum:
1
¶ Sets the smoothing range for the neighborhood that is considered for smoothing.
A value of 1 means that the direct neighbors are taken into consideration, a value of 2 means that two points on the contour to each side of a point are considered for smoothing and so on.
Reduce CSOs to one seed point¶
-
name:
reduceCSOsToOnlyOneSeedPoint
, type:
Bool
, default:
TRUE
¶ If checked, the resulting CSOs will have only one seed point and one path point list. All positions are then stored in that one path point list.
Otherwise, a seed point will be generated for each voxel.
Auto Clear¶
-
name:
autoClear
, type:
Bool
, default:
FALSE
¶ If checked, the module clears the input CSOList on any image change.
Creation Mode¶
-
name:
creationMode
, type:
Enum
, default:
All
¶ Defines the creation mode.
Values:
Title | Name | Description |
---|---|---|
All | All | Creates all iso-contours on all slices. |
Single | Single | Creates only the first found iso-contour of all slices. |
Start condition¶
-
name:
startCondition
, type:
Enum
, default:
Always
¶ Defines a condition for starting to scan an iso-contour if
Creation Mode
is Single.
Values:
Title | Name |
---|---|
Always | Always |
Hit Lower Iso Value | HitLowerIsoValue |
Hit Greater Iso Value | HitGreaterIsoValue |
Start position¶
-
name:
startPosition
, type:
Vector3
, default:
0 0 0
¶ Sets a start position in world coordinates for scanning for iso-contours if
Creation Mode
is Single.