genre | CSOModule |
authors | Olaf Konrad, Frank Heckel |
package | MeVisLab/Standard |
dll | MLCSOModules |
definition | MLCSOModules.def |
see also | CSOConvertTo3DMask, CSOInterpolate |
keywords | contour, fill, voxelize, rasterize |
The module CSOConvertToImage converts all CSOs of the input CSOList to a ML image. It rasterizes or voxelizes the CSOs with the according Voxelize flag set to 'true' into the output image. If a CSO is in-plane, it also can be filled.
Attach a CSOList and an ML image to the module's inputs, adjust the parameters and press Update.
The contour itself is converted into a 6-connected line of voxels. This is computed by following a contour's segments through the voxels by applying a derivate of a marching cubes scheme. In this scheme, the cells are checked for which cell's side the contour segments are crossing.
A filling of the voxelized contours is computed by applying a marching cube algorithm where the CSO's plane equation is evaluated (it can be evaluated to 'is above-', 'is below-' and 'is on plane', resulting in a scalar). Additionally, all cells' middle points in the vicinity of the voxelized CSO are projected onto the CSO's plane and are checked for being inside the CSO. If a certain amount of cells are determined in this fashion, a sufficiently 'thick' security margin is computed, so that all the remaining cells can be computed by applying a recursive marching cube algorithm that test only against the plane equation.
The set voxels of the rasterized CSO itself and the set of voxels of the according filling are disjunctive.
If CSOs are crossing each other or are embracing each other, they will generate voxels at same positions. In such cases, the resulting ML image value can be determined by using a certain logic mode. This can be an adding of those voxel values, a replacing with the greater or lower voxel value, or an applying of an XOR operation. The result of the latter depends on the order of computing and may lead to different results if the CSOs' voxel write mode involves either their ids or different constants. If the voxel write mode of all CSOs is set to Module (the default), however, the XOR operation can safely be used for generating holes in contours by using other contours. If the voxel write mode is different and different voxel write values are used, such holes are produced as well, but if there are an odd number of CSOs (more than 1), the resulting voxel value cannot predicted for sure.
Note that the border voxels can be generated with anti-aliased values, but the border voxels of those holes will not be anti-aliased.
The module can either convert all incoming CSOs at once on each notification, or just those which cross any demanded image page. Note that the voxel count, the generation of markers and the voxel bounding box fields are only valid if the generation mode is set to Complete.
The OnDemand mode is intended to be used in interactive systems.
Additionally, the module can output all target voxels as markers and as CSOVoxelSet. In both representations, the Boolean logic is not applied and thus, crossing or overlapping CSOs result in doubly existing markers or CSOVoxels.
Output marker list. The creation of markers is optional, see Create marker list.
Output CSOVoxelSet. The creation of markers is optional, see Create CSO voxel set.
Auto apply: Bool | Ignore time points: Bool | String: String |
Background: Float | isProcessing: Bool | Subsample: Integer |
Clear: Trigger | Logic for Overlapping CSOs: Enum | Update: Trigger |
Copy input image: Bool | Margin: Integer | Use Always Foreground Value Of Module: Bool |
Create CSO voxel set: Bool | Marker Generation Mode: Enum | Use global subsample: Bool |
Create marker list: Bool | Mode: Enum | Use image values: Bool |
done: Trigger | Num. Threads: Integer | useAntiAliasing: Bool |
Draw to all time points: Bool | progress: Float | Volume Threshold: Double |
End (endVoxelBoundingBox): Vector3 | Remove Outside Voxels Mode: String | Voxel: Integer |
End (endWorldBoundingBox): Vector3 | removeBorderVoxelsByVolume: Bool | Voxelize Border: Bool |
Fill: Bool | removeOutsideVoxels: Bool | X: Integer |
Finishing: Bool | Repaint: Bool | Y: Integer |
Foreground: Float | Start (startVoxelBoundingBox): Vector3 | Z: Integer |
Generation Mode: Enum | Start (startWorldBoundingBox): Vector3 |
Defines how the module react on input changes. This includes touching, connecting and disconnecting of inputs as well as notifications of the CSOList (if enabled).
Values:
Title | Name | Description |
---|---|---|
Off | Off | The module does not react on input changes. |
Auto Update | AutoUpdate | The module computes anew if any input changes or a valid notification is triggered. |
If checked, the module computes anew on any change of a field on the GUI.
Sets the object voxel value if the CSO's voxel write mode is set to Module (which is the default), and if the module is not using image values for the object voxels (Use image values).
Sets the background voxel value if the module is not copying the input image's values (Use image values).
If checked, the input image's voxel values are used as object voxel values.
If checked, the CSOs which are in-plane are filled.
If checked, the background of the output image is filled with the voxel values of the input image.
Sets an augmentation value for the voxel bounding box.
Shows the upper front left corner position of the voxel bounding box.
Shows the lower rear right corner position of the voxel bounding box.
Shows the upper front left corner of the bounding box in world coordinates.
Shows the lower rear right corner of the bounding box in world coordinates.
Shows the voxel bounding boxes start and end position as a string consisting of six 3D coordinates separated by a space.
If checked, the voxel write mode of the CSO or CSOGroup are ignored and the foreground value of the module is used in any case.
If pressed, the output image of the module is cleared and invalidated.
If checked, the path points of the CSOs themselves are voxelized into the output image.
If checked, the module uses the Subsample value for subsampling in order to determine border voxel values for useAntiAliasing or for removeBorderVoxelsByVolume.
Otherwise, the module uses the explicit subsample values for x, y and z directions (X, Y and Z).
Sets a global subsample value that is used if Use global subsample is checked.
Sets the explicit subsample value in x-direction. Is used if Use global subsample is unchecked.
Sets the explicit subsample value in y-direction. Is used if Use global subsample is unchecked.
Sets the explicit subsample value in z-direction. Is used if Use global subsample is unchecked.
Sets a threshold value for the border handling. If the border voxel is covered by a less percentage by the CSO, if can be removed from the resulting voxel set.
If checked, the timepoint indices of the input CSOs are ignored and the CSOs of all timepoint indices are voxelized into the first t-dimension of the output image.
If checked, all CSOs are voxelized into all t-dimensions of the output image.
If checked, a marker list output is filled with a marker per converted voxel of a CSO.
The value of a marker is the id of the originating CSO.
Defines whether the markers are being generated before or after applying the Boolean logic to the resulting voxels.
Values:
Title | Name | Description |
---|---|---|
Voxels | CSOMarkerGenerationModeFromVoxels | Markers are being generated after the Boolean logic has been applied. |
CSOs | CSOMarkerGenerationModeFromCSOs | Markers are being generated before the Boolean logic has been applied. That means that some markers may have the same position. |
Shows the amount of resulting voxels in the output image.
If checked, a CSOVoxelSet is created. This is a sparse representation of the resulting mask image.
Defines how voxels of overlapping CSOs are handled.
Values:
Title | Name | Description |
---|---|---|
Add | VoxelSetModeAdd | Values of voxels at the same position are added. |
Replace Max | VoxelSetModeReplaceMax | The maximum value of voxels at the same position is set. |
Replace Min | VoxelSetModeReplaceMin | The minimum value of voxels at the same position is set. |
XOR | VoxelSetModeXOR | And XOR operation is applied to the voxel position. That means that the voxel is set if the number of resulting voxels for a position is uneven, and the voxel is unset (background) if the number is even. By using this option, holes in contours can be modelled. |
Defines the generation mode.
Values:
Title | Name | Description |
---|---|---|
Complete | GenerationModeComplete | On computing the result, all CSOs are being converted to voxels and the result is held in an internal structure for being copied to the output page if demanded. |
On Demand | GenerationModeOnDemand | Only the CSOs are voxelized that are being cut by a requested output page and the result is written into an internal storage. |
Sets the number of threads for parallel computation.
Defines the border mode. Only available if Voxelize Border is checked.
Possible values are:
Value | Meaning |
---|---|
Disabled | No border handling, all border voxels are written into the output image |
Midpoint | If the midpoint of a voxel lies within a CSO, it is written into the output image, otherwise it is skipped |
Volume | If the volume (projected area) of the portion of the voxel that lies within the CSO is greater than Volume Threshold, it is written into the output image, otherwise it is skipped |
AntiAliasing | The value of the output voxel is proportional to the projected area that lies within the CSO |