CSOSliceInterpolator¶
-
MLModule
¶ genre CSOModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCSOModules
definition MLCSOModules.def keywords contour
,parallel
,fill
,missing
,spline
,interpolation
Purpose¶
The module CSOSliceInterpolator
generates interpolated contours for existing CSOs that are parallel on z-slices of an ML image.
Usage¶
Attach a reference image and a CSOList that needs interpolation.
Details¶
The module interpolates parallel CSOs on z-slices by piece-wise interpolating the existing contours on consecutive slices.
The interpolation itself is done by establishing a spline surface function out of the path points of the contours and then scanning the missing slices in between by a marching squares algorithm.
The spline function used is the same as in the module CSOGenerateSmoothSurfaceFromSparseContours
and the marching squares algorithm used is the same as in the module CSOIsoGenerator
.
There are two values to adjust computation speed and quality, the Max Num Points For Function
and the Spline Quality
. The first one set a fixed maximum border for the amount of points that are taken into account in the generation of the spline function for one section. The second one is a relative factor for determining the resulting amount of points.
For example, let us assume that the Max Num Points For Function
is set to 100 and the Spline Quality
is set to 0.5.
Now we have two CSOs to be interpolated on different slices, the total amount of point in the original CSOs is 100. The Spline Quality
halves the amount of point, resulting in 50 points. This amount is less than the Max Num Points For Function
, so we still have the 50 to build up the spline function.
Now let us assume the two CSOs have a total amount of 300 points. The Spline Quality
still halves the amount of point to 150, but this time, the resulting amount is higher than Max Num Points For Function
. In this case, the maximum number limits the result and only 100 points will be taken into account for building the spline function.
Input Fields¶
input0¶
-
name:
input0
, type:
Image
¶ The reference image to determine the image extend and the world-to-voxel-matrix.
inputCSOList¶
-
name:
inputCSOList
, type:
CSOList(MLBase)
¶ The CSOList with CSOs to be filled up on slices.
For accessing this object via scripting see the Scripting Reference:MLCSOListWrapper
.
Parameter Fields¶
Field Index¶
Add To Group : Enum |
isProcessing : Bool |
smoothFactor : Float |
Auto apply : Bool |
Max Num Points For Function : Integer |
smoothingMode : Enum |
Creator Id : Integer |
Mode : Enum |
smoothRange : Integer |
done : Trigger |
numSmoothPasses : Integer |
Spline Quality : Float |
Empty Group Before Generation : Bool |
progress : Float |
Time Point Index : Integer |
Group Handling : Enum |
Reduce CSOs to one seed point : Bool |
Update : Trigger |
Group Id : Integer |
Remove original CSOs : Bool |
useSmooth : Bool |
Group Label : String |
Resolve embedded CSOs : Bool |
|
Handle Slices With Original CSOs : Enum |
sliceOrientation : Enum |
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 on changes on either the input CSOList or the input image. |
Auto Update | AutoUpdate | The module computes anew if the input image or the input CSOList changes. |
Auto Clear | AutoClear |
Auto apply¶
-
name:
autoApply
, type:
Bool
, default:
FALSE
¶ If checked, the module computes anew if any field on the GUI changes.
Empty Group Before Generation¶
-
name:
emptyGroupBeforeGeneration
, type:
Bool
, default:
FALSE
¶ If checked, the module will empty the group in which the interpolated contours are stored in before interpolating anew.
Add To Group¶
-
name:
addCSOToGroupMode
, type:
Enum
, default:
AddToGroupByLabel
¶ Defines in which group the generated CSOs will be stored into. Depends on
Group Handling
.
Values:
Title | Name | Description |
---|---|---|
None | AddToGroupNone | Generated CSOs will not be stored in any group. |
By Label | AddToGroupByLabel | Generated CSOs will be stored in a group with the label given in Group Label . If no group is existing yet with that label, it is created. |
By Id | AddToGroupById | Generated CSOs will be stored in a group with the id given in Group Id . If no group is existing yet with that id, the generated CSOs are stored in no group. |
Group Label¶
-
name:
addCSOToGroupWithLabel
, type:
String
¶ Sets a label for a group to put the generated CSOs into. Depends on
Add To Group
andGroup Handling
.If no group exists with that label, the group is created.
Group Id¶
-
name:
addCSOToGroupWithId
, type:
Integer
, default:
-1
¶ Sets an id for a group to put the generated CSOs into. Depends on
Add To Group
andGroup Handling
.If no group exists with that id, the generated CSOs are no stored in any group.
Creator Id¶
-
name:
id
, type:
Integer
, default:
0
¶ Sets an arbitrary creator id to the generated CSOs for a later identification.
Time Point Index¶
-
name:
timePointIndex
, type:
Integer
, default:
0
¶ Sets a filters for the input CSOs by their timepoint index. Only CSOs with the set index are being interpolated.
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.
Resolve embedded CSOs¶
-
name:
resolveEmbeddedCSOs
, type:
Bool
, default:
FALSE
¶ If checked, the module determines the level of embedding of CSOs and treats inner CSOs by inverting their normals.
By checking this option, inner CSOs can lead to holes in the mask in simple cases. Since the mask is in 3D, not all levels of embedding can be resolved to full satisfaction.
Max Num Points For Function¶
-
name:
maxNumPointsForFunction
, type:
Integer
, default:
300
¶ Sets the maximum number of points of all CSOs participating in one piece of the interpolation.
A lower number results in a faster computation but also in a lower quality.
Spline Quality¶
-
name:
splineQuality
, type:
Float
, default:
0.69999999
, minimum:
0
, maximum:
1
¶ Sets the percentile of points of CSOs for one piece of interpolation that are taken into account in building the spline function.
A lower value results in a faster computation but a lower quality.
Handle Slices With Original CSOs¶
-
name:
handleSlicesWithOriginalCSOs
, type:
Enum
, default:
OriginalSliceHandlingSkip
¶ Defines whether CSOs are generated on slices with original CSOs.
Values:
Title | Name | Description |
---|---|---|
Skip | OriginalSliceHandlingSkip | Slices with original CSOs on them will be skipped in the interpolation process. That means that no generated CSOs will share a slice with original CSOs. Be aware that original CSOs might not lie in the middle of slices if an image with another resolution is attached as a reference image than the image the original CSOs were generated on. |
Generate | OriginalSliceHandlingGenerate | CSO are generated on all slices between the first and the last slice with original CSOs on them. Be aware that this will result in some slice with original AND generated CSOs. The |
Group Handling¶
-
name:
groupHandling
, type:
Enum
, default:
GroupHandlingAddToOriginalGroups
¶ Defines how the generated CSOs will be grouped.
Values:
Title | Name | Description |
---|---|---|
Use Generator Settings | GroupHandlingUseGeneratorSettings | This option causes the generated CSOs to be added to the group with determined in Add To Group . |
Add To Original Groups | GroupHandlingAddToOriginalGroups |