Contour To Mask
Renders countours to binary mask (or a fuzzy mask) on a reference image.
Inputs
Contour
The contours to render.
Type: Contour, List, Required, Single
Reference
The reference image(s) or mask(s) which provides the matrix (i.e. image position, voxel size etc) on which to render the contours.
Type: Mask, Image, List, Required, Single
Outputs
Mask
The rendered contours as Mask(s).
Type: Mask, List
Fuzzy Mask
The rendered contours as Image(s), or fuzzy mask(s). A fuzzy mask is a type of binary mask that assigns a degree of membership to each pixel in an image, rather than a simple 0 or 1 value. The degree of membership ranges between 0 and 1, where a value of 1 indicates that the pixel is fully a member of the set and a value of 0 indicates that the pixel is not a member of the set. Fuzzy masks are commonly used in image processing for tasks such as image segmentation, edge detection, and pattern recognition, as they allow for more nuanced and flexible representation of image features compared to binary masks. This is especially impotant for small structures which have a relativly large fraction of edge pixels.
Type: Image, List
Statistics
Statistics regarding the mask and fuzzy mask, such as volumes and volume error. Volume error is the relative difference between the volume calculated directly from the polygon structure compared to the rendered binary and smooth mask.
Type: Table
Settings
Contour Selection
Contour Name(s) Text
Name of the contours to render, if you define several structures as a comma separated list it will render the first structure that matches. To select a contour that has a name that contains comma, use the escape character '\,'.
Condition Selection
Condition to use when matching strings to find the structure.
Values: Contains, Equals, Does Not Contain, Not Equal, Regex
Case Sensitive Boolean
When enabled a case sensitive string match will be used.
Configure
Supersampling Method Selection
Supersampling increases the accuracy of the rendered volume by creating a fuzzy mask. A fuzzy mask is a Hero specific concept which allows polygonal structures to be rendered on an image, allowing fractional values between 0 and 1. If the polygon cuts a voxel precisely diagonally, the voxel value of the fuzzy mask at that voxel will be 0.5. When producing different statistics based on regions of interest, these can be weighted by the intensity of the fuzzy mask, greatly improving the accuracy especially for structures with small volumes. Note that the fuzzy mask is an ordinary Image and not a specific datatype, so the user must ensure that the input really is a fuzzy mask to avoid nonsense statistics.
None of course means that no supersampling takes place.
Two-Step implies that the supersampling is done in two steps, where the Initial step supersamples the whole image, and the Refined step supersamples the voxels with values between 0 and 1.
Dynamic is an iterative process where the supersampling tries to achieve a certain volume rendering accuracy (comparing the volume of the actual polygons to the volume in the rendered fuzzy mask).
Values: None, Two-Step, Dynamic
Mask Threshold [%] Float
Sets how much of a single voxel that needs to be inside the structure for the voxel to be set to TRUE in the mask.
Mask Threshold Type Selection
The type of criteria used to set the resulting mask voxel to TRUE.
Values: Equal, Greater Than, Greater or Equal, Less Than, Less or Equal, Not Equal
End Cap Thickness [mm] Float
Sets the end cap thickness of the structure.
Two-Step Supersampling
Initial Method Selection
Set the initial supersampling method.
Regular Grid divides the image grid (or matrix) into subvoxels, defined by the “Initial Subvoxel Ratio”.
Monte Carlo randomly samples positions in voxels the number of times specified in the Initial Num. Points per Voxel.
Values: Regular Grid, Monte Carlo
Initial Subvoxel Ratio Integers
Set how two divide a voxel to produce subvoxels, defined as [i, j, k]. If you specify, e.g. [2, 2, 4], each voxel will be divid into 2 in the i direction, 2 in the j direction and 4 in the k direction.
Initial Points per Voxel Integer
Set the number of points to sample per voxel with the Monte Carlo method.
Refined Method Selection
Set the method for the refined supersampling. See the section under Initial Method for additional information.
Values: None, Regular Grid, Monte Carlo
Refined Subvoxel Ratio Integers
Set how two divide a voxel to produce subvoxels, defined as [i, j, k]. If you specify, e.g. [2, 2, 4], each voxel will be divid into 2 in the i direction, 2 in the j direction and 4 in the k direction.
Refined Points per Voxel Integer
Set the number of points to sample per voxel with the Monte Carlo method.
Dynamic Supersampling
Maximum Volume Error [%] Float
The maximum volume error in %, i.e.
\(\left| \dfrac{V_{polygons}}{V_{rendered}} - 1\right|*100\)
that the filter tries to achieve by iterating with increasingly finer supersampling.
Maximum Iterations Integer
The maximum number of iterations for trying to achieve an error lower than the specified Maximum Volume Error [%].
Use Error Stopping Criterion Boolean
Use Error Stopping Criterion will stop the calculations if the volume error has not improved by a certain amount, specified in the Error Stopping Criterion [%], compared to the last iteration. This will stop the algorithm from running all iterations set in the Maximum Iterations settings when the target error probably won't be reached.
Error Stopping Criterion [%] Float
Specify the amount if improvement expected between two iterations in order to continue calculations.
See also
Keywords:
Copyright © 2023, Hero Imaging AB