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 Inventor scene into a voxel image.
The voxelization result may be colored according to the colors of the original polygonal scene.
Also, the module allows for a filled voxelization of closed surfaces, using a scan line algorithm.
Usage¶
Just connect an ML image and an Inventor scene to the module.
Make sure that the ML image and the 3D scene share the same world coordinate space.
Details¶
Firstly, the Inventor scene’s primitves (Points, Lines and Triangles) are collected. All those primitives’ bounding boxes are sorted according to slices.
If the surface should be voxelized, all voxels of the intersecting bounding box of primitive’s bounding box and the current slice’s bounding box are investigated regarding the distance of the voxel to the primitive. If this distance falls below the adjusted thickness parameter, the voxel is set.
If the resulting image should be filled, a scan line algorithm is applied on the 3D primitives (here: triangles only). Note that due to the ratio of polygon size and image resolution (voxel size) some artifacts may appear as uncorrect lines; this is 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 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 that this mode does not work well with using 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’ voxel 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 Inventor scene.
For example, if the draw style is Wire Frame, with this option only lines will be voxelized. Otherwise, the faces of the surfaces would be voxelized as well.
Filled¶
-
name:
voxelizeFilled
, type:
Bool
, default:
TRUE
¶ If checked and the 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 regarded while 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 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 mm. |
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 Inventor scene. The optional fill voxels will have the color set with
Fill Color
andAlpha
.