VoxelizeWEM¶
-
MLModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLOpenVDB
definition MLOpenVDB.def keywords distance
,distancetransform
Purpose¶
The VoxelizeWEM
allows to voxelize the surface of a WEM mesh to a given reference coordinate system given by the input image (but only inside the bounds of the input image). It supports both voxel thickness and world thickness, but using voxel thickness is considerably faster.
It can also fill the inside and provide anti-aliasing.
It makes use of the OpenVDB (http://www.openvdb.org/) library.
Tips¶
If you want to voxelize the WEM to an image that has just the right size you might consider to use the GenerateImageForBoundingBox
module, which will create an image grid of the needed size aligned to the world axes if you feed it the bounding box values from, e.g., an WEMInfo
module.
Output Fields¶
Parameter Fields¶
Field Index¶
Anti-aliasing : Bool |
Invert Normals : Bool |
PVL name : String |
Clear : Trigger |
Mode : Enum |
Surface : Bool |
Distance Mode : Enum |
Normal Mode : Enum |
Surface Thickness : Float |
Exterior Bandwidth : Double |
Normal Type : Enum |
Update : Trigger |
Fill Inside : Bool |
Output Closest Node : Bool |
|
Interior Bandwidth : Double |
Output Closest Normal : Bool |
|
Interpolate PVL : Bool |
Output closest PVL : Bool |
|
Invalid PVL value : Double |
Output Closest Triangle : Bool |
Visible Fields¶
Mode¶
-
name:
mode
, type:
Enum
, default:
Surface
¶ Selects in which mode the module operates.
Values:
Title | Name | Description |
---|---|---|
Signed Distance | SignedDistance | The module outputs a signed distance field (using float as output datatype). The distance is positive on the outside of a closed mesh and negative inside. |
Surface | Surface | The module outputs the surface (and optionally fills it and applies anti-aliasing). |
Distance Mode¶
-
name:
distanceMode
, type:
Enum
, default:
VoxelDistance
¶ Allows to choose if the distance calculations use world or voxel distances. The distance mode is used for
Surface Thickness
and for the output distances in SignedDistance mode.NOTE: World distances are much slower, since the grid needs to undergo an extra resampling step.
Values:
Title | Name | Description |
---|---|---|
World Distance | WorldDistance | Use world distances (millimeters). |
Voxel Distance | VoxelDistance | Use voxel distances. |
Surface Thickness¶
-
name:
surfaceThickness
, type:
Float
, default:
1
¶ Sets the thickness of the surface (in voxels).
Fill Inside¶
-
name:
fillInside
, type:
Bool
, default:
TRUE
¶ If enabled, the inside of closed meshes is filled.
Anti-aliasing¶
-
name:
antiAliasing
, type:
Bool
, default:
TRUE
¶ Enables anti-aliasing on the borders of the surface and/or the filling.
Interior Bandwidth¶
-
name:
interiorBandwidth
, type:
Double
, default:
3
, minimum:
1
¶ Defines the inner bandwidth (in voxels) when SignedDistance mode is used. The signed distance field is only propagated this far into the inside of a surface. All other inner voxels are set to the bandwidth distance.
Exterior Bandwidth¶
-
name:
exteriorBandwidth
, type:
Double
, default:
3
, minimum:
1
¶ Defines the outer bandwidth (in voxels) when SignedDistance mode is used. The signed distance field is only propagated this far outside of a surface. All other outer voxels are set to the bandwidth distance.
Output Closest Triangle¶
Output closest PVL¶
Interpolate PVL¶
-
name:
interpolatePVL
, type:
Bool
, default:
FALSE
¶ If enabled, per node PVL values are interpolated using the barycentric coordinates of the triangle. If disabled, the closes point’s PVL value is used uninterpolated.
Invalid PVL value¶
-
name:
invalidPVLValue
, type:
Double
, default:
0
¶ The value that is written where no PVL value is available.
PVL name¶
-
name:
pvlName
, type:
String
, default:
LUT
¶ The name of the PVL that is used. We support per face and per node PVLs.
Invert Normals¶
-
name:
invertNormals
, type:
Bool
, default:
FALSE
¶ Invert the normals of the normal output image.
Output Closest Node¶
-
name:
outputClosestNode
, type:
Bool
, default:
FALSE
¶ Output an image with the indices to the closest WEM node.
Output Closest Normal¶
-
name:
outputClosestNormal
, type:
Bool
, default:
FALSE
¶ Output the closest normals.
Normal Mode¶
-
name:
normalMode
, type:
Enum
, default:
FaceNormal
¶ Defines which normals are used.
Values:
Title | Name | Description |
---|---|---|
Face Normal | FaceNormal | The closest face’s normal. |
Node Normal | NodeNormal | The normal of the closest node. |
Interpolated Node Normal | InterpolatedNodeNormal | The interpolated normal of the closest face’s node normals (renormalized). |
Normal Type¶
-
name:
normalType
, type:
Enum
, default:
Type_UInt8
¶ Defines the type of the normal output image.
Values:
Title | Name | Description |
---|---|---|
UInt8 | Type_UInt8 | Uint8 in 3 color channels in range 0-255 (centered around 128). This format can be used for the SoGVRGradientVolume . |
Double | Type_Double | Double values from -1 to 1 in 3 color channels. |
Vector3 | Type_Vector3 | Vector3 is used for the normals. |