VoxelizeInventorScene¶
-
MLModule
¶ genre Visualization
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLVoxelizeInvScene
definition MLVoxelizeInvScene.def see also Raster
,RasterFunctions
keywords voxelization
,raster
,volume
Purpose¶
The module VoxelizeInventorScene
voxelizes an arbitrary Open Inventor scene into a voxel image.
The voxelization result may be colored based on the colors of the original polygonal scene.
Additionally, the module allows for filled voxelization of closed surfaces using a scan-line algorithm.
Usage¶
Simply connect an ML image and an Open Inventor scene to the module.
Ensure that the ML image and the 3D scene share the same world coordinate space.
Details¶
Firstly, the primitives of the Open Inventor scene (points, lines, and triangles) are collected. The bounding boxes of these primitives are sorted according to slices.
If the surface is to be voxelized, all voxels within the intersecting bounding box of the primitive and the current slice’s bounding box are examined regarding their distance to the primitive. If this distance falls below the adjusted thickness parameter, the voxel is set.
If the resulting image is to be filled, a scan-line algorithm is applied to the 3D primitives (in this case, triangles only). Note: Due to the ratio of polygon size to image resolution (voxel size), some artifacts may appear as incorrect lines; this occurs because of the sampling theorem. Adjust either the voxel size (ImagePropertyConvert
, etc.) or the polygon sizes (WEMReducePolygons
or WEMSubdivide
).
Input Fields¶
Parameter Fields¶
Field Index¶
Alpha : Float |
Include border : Bool |
Surface : Bool |
Anti-alias : Bool |
Lines : Bool |
Thickness : Float |
Apply : Trigger |
Mode : Enum |
Triangles : Bool |
Colored : Bool |
On Inventor change : Bool |
Use Super Sampling : Bool |
Copy input image : Bool |
On ML image change : Bool |
Write Voxel Value : Double |
DrawStyle as Inventor scene : Bool |
On parameter change : Bool |
|
Fill Color : Color |
Output number of collected primitives : Bool |
|
Filled : Bool |
Points : Bool |
Visible Fields¶
Points¶
-
name:
allowCollectPoints
, type:
Bool
, default:
FALSE
¶ If checked, the module collects information about points and voxelizes those single points.
Lines¶
-
name:
allowCollectLines
, type:
Bool
, default:
FALSE
¶ If checked, the module collects information about lines and voxelizes those lines.
Triangles¶
-
name:
allowCollectTriangles
, type:
Bool
, default:
TRUE
¶ If checked, the module collects information about triangles and voxelizes those triangles.
If this is active, the module can fill surfaces.
Write Voxel Value¶
-
name:
voxelValue
, type:
Double
, default:
1024
¶ Sets the voxel write value if the Open Inventor scene should not be voxelized with the original color.
Note that if anti-aliasing is active, the border voxels may not have the value set in
Write Voxel Value
.
Thickness¶
Anti-alias¶
-
name:
useAntiAliasing
, type:
Bool
, default:
TRUE
¶ If checked, the lines and faces are voxelized with an anti-aliasing.
This option works for non-colored output only.
Copy input image¶
-
name:
copyInputImage
, type:
Bool
, default:
TRUE
¶ If checked, the input image is copied to the output image.
Otherwise, the background voxels are all set to 0 (or black if voxelized in color).
Note: This mode does not work well with the option
Copy input image
because the original image values are scaled and copied only to the red channel of the output image, while the green, blue, and alpha channels’ voxels are set to an undefined value.
DrawStyle as Inventor scene¶
-
name:
drawStyleAsScene
, type:
Bool
, default:
FALSE
¶ If checked, the module considers the current draw style of the Open Inventor scene.
For example, if the draw style is Wire Frame, only lines will be voxelized with this option. Otherwise, the faces of the surfaces will also be voxelized.
Filled¶
-
name:
voxelizeFilled
, type:
Bool
, default:
TRUE
¶ If checked and the Open Inventor scene contains surfaces (and
Triangles
is checked), the module fills the voxelized surfaces with either theWrite Voxel Value
or theFill Color
/Alpha
.
Include border¶
-
name:
includeBorderOnFill
, type:
Bool
, default:
TRUE
¶ If checked, the surface voxels of the voxelized objects are considered when filling a closed surface.
Surface¶
-
name:
voxelizeSurface
, type:
Bool
, default:
TRUE
¶ If checked, the surface itself is being voxelized.
On Inventor change¶
-
name:
autoUpdateInvScene
, type:
Bool
, default:
FALSE
¶ If checked, the module computes anew on each update of the attached Open Inventor scene.
On ML image change¶
-
name:
autoUpdateMLImage
, type:
Bool
, default:
FALSE
¶ If checked, the module computes anew on each change of the attached ML image.
On parameter change¶
-
name:
autoUpdateParameter
, type:
Bool
, default:
FALSE
¶ If checked, the module computes anew on each change of any parameter field.
Mode¶
-
name:
distanceMode
, type:
Enum
, default:
WorldDistance
¶ Defines the distance mode. This is how the field
Thickness
is interpreted.
Values:
Title | Name | Description |
---|---|---|
Voxel Distance | VoxelDistance | The Thickness sets a thickness in number of voxels. |
World Distance | WorldDistance | The Thickness sets a thickness in millimeters. |
Colored¶
-
name:
voxelizeColored
, type:
Bool
, default:
FALSE
¶ If checked, the resulting voxel image will be a color image with all the colors of the primitives of the Open Inventor scene. The optional fill voxels will have the color set with
Fill Color
andAlpha
.