Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrientedImageData type). The conversion algorithm is based on image stencil.
More...
#include <Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.h>
Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrientedImageData type). The conversion algorithm is based on image stencil.
Definition at line 36 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.
◆ Superclass
◆ vtkClosedSurfaceToBinaryLabelmapConversionRule()
vtkClosedSurfaceToBinaryLabelmapConversionRule::vtkClosedSurfaceToBinaryLabelmapConversionRule |
( |
| ) |
|
|
protected |
◆ ~vtkClosedSurfaceToBinaryLabelmapConversionRule()
vtkClosedSurfaceToBinaryLabelmapConversionRule::~vtkClosedSurfaceToBinaryLabelmapConversionRule |
( |
| ) |
|
|
overrideprotected |
◆ CalculateOutputGeometry()
bool vtkClosedSurfaceToBinaryLabelmapConversionRule::CalculateOutputGeometry |
( |
vtkPolyData * |
closedSurfacePolyData, |
|
|
vtkOrientedImageData * |
geometryImageData |
|
) |
| |
|
protected |
Calculate actual geometry of the output labelmap volume by verifying that the reference image geometry encompasses the input surface model, and extending it to the proper directions if necessary.
- Parameters
-
closedSurfacePolyData | Input closed surface poly data to convert |
geometryImageData | Output image data containing output labelmap geometry. Memory is not allocated for voxel data. |
- Returns
- Success flag indicating sane calculated extents
◆ ConstructRepresentationObjectByClass()
vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::ConstructRepresentationObjectByClass |
( |
std::string |
className | ) |
|
|
overridevirtual |
Constructs representation object from class name for the supported representation classes (typically source and target representation VTK classes, subclasses of vtkDataObject) Note: Need to take ownership of the created object! For example using vtkSmartPointer<vtkDataObject>::Take
Implements vtkSegmentationConverterRule.
Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.
◆ ConstructRepresentationObjectByRepresentation()
vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::ConstructRepresentationObjectByRepresentation |
( |
std::string |
representationName | ) |
|
|
overridevirtual |
Constructs representation object from representation name for the supported representation classes (typically source and target representation VTK classes, subclasses of vtkDataObject) Note: Need to take ownership of the created object! For example using vtkSmartPointer<vtkDataObject>::Take
Implements vtkSegmentationConverterRule.
Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.
◆ Convert()
bool vtkClosedSurfaceToBinaryLabelmapConversionRule::Convert |
( |
vtkSegment * |
segment | ) |
|
|
overridevirtual |
◆ CreateRuleInstance()
◆ GetClassName()
virtual const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetCollapseLabelmapsParameterName()
static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetCollapseLabelmapsParameterName |
( |
| ) |
|
|
inlinestatic |
Determines if the output binary labelmaps should be reduced to as few shared labelmaps as possible after conversion. A value of 1 means that the labelmaps will be collapsed, while a value of 0 means that they will not be collapsed.
Definition at line 48 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.
◆ GetConversionCost()
unsigned int vtkClosedSurfaceToBinaryLabelmapConversionRule::GetConversionCost |
( |
vtkDataObject * |
sourceRepresentation = nullptr , |
|
|
vtkDataObject * |
targetRepresentation = nullptr |
|
) |
| |
|
overridevirtual |
◆ GetCropToReferenceImageGeometryParameterName()
static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetCropToReferenceImageGeometryParameterName |
( |
| ) |
|
|
inlinestatic |
◆ GetDefaultImageGeometryStringForPolyData()
std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetDefaultImageGeometryStringForPolyData |
( |
vtkPolyData * |
polyData | ) |
|
|
protected |
Get default image geometry string in case of absence of parameter. The default geometry has identity directions and 1 mm uniform spacing, with origin and extent defined using the argument poly data.
- Parameters
-
polyData | Poly data defining the origin and extent of the default geometry |
- Returns
- Serialized image geometry for input poly data with identity directions and 1 mm spacing.
◆ GetName()
const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetOversamplingFactorParameterName()
static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetOversamplingFactorParameterName |
( |
| ) |
|
|
inlinestatic |
Conversion parameter: oversampling factor Determines the oversampling of the reference image geometry. If it's a number, then all segments are oversampled with the same value (value of 1 means no oversampling). If it has the value "A", then automatic oversampling is calculated.
Definition at line 44 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.
◆ GetSourceRepresentationName()
const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetSourceRepresentationName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetTargetRepresentationName()
const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetTargetRepresentationName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ IsA()
virtual int vtkClosedSurfaceToBinaryLabelmapConversionRule::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkClosedSurfaceToBinaryLabelmapConversionRule::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ New()
◆ PostConvert()
bool vtkClosedSurfaceToBinaryLabelmapConversionRule::PostConvert |
( |
vtkSegmentation * |
segmentation | ) |
|
|
override |
Perform postprocessing steps on the output Collapses the segments to as few labelmaps as is possible
◆ SafeDownCast()
◆ SetUseOutputImageDataGeometry()
virtual void vtkClosedSurfaceToBinaryLabelmapConversionRule::SetUseOutputImageDataGeometry |
( |
bool |
| ) |
|
|
virtual |
◆ UseOutputImageDataGeometry
bool vtkClosedSurfaceToBinaryLabelmapConversionRule::UseOutputImageDataGeometry {false} |
|
protected |
Flag determining whether to use the geometry of the given output oriented image data as is, or use the conversion parameters and the extent of the input surface. False by default, because pre-calculating the geometry of the output image data is not trivial and should be done only when there is a specific reason to do that (such as doing the conversion for sub-volumes and then stitching them back together).
Definition at line 107 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.
The documentation for this class was generated from the following file: