Class that can convert between different representations of a segment.
More...
#include <Libs/vtkSegmentationCore/vtkSegmentationConverter.h>
Class that can convert between different representations of a segment.
Definition at line 47 of file vtkSegmentationConverter.h.
◆ ConversionPathAndCostListType
◆ ConversionPathAndCostType
◆ ConversionPathType
◆ ConverterRulesListType
◆ RepresentationToRepresentationToRuleMapType
◆ RulesListType
◆ Superclass
◆ vtkSegmentationConverter()
vtkSegmentationConverter::vtkSegmentationConverter |
( |
| ) |
|
|
protected |
◆ ~vtkSegmentationConverter()
vtkSegmentationConverter::~vtkSegmentationConverter |
( |
| ) |
|
|
overrideprotected |
◆ ApplyTransformOnReferenceImageGeometry()
void vtkSegmentationConverter::ApplyTransformOnReferenceImageGeometry |
( |
vtkAbstractTransform * |
transform | ) |
|
Apply a transform on the reference image geometry Linear: simply multiply the geometry matrix with the applied matrix, extent stays the same Non-linear: calculate new extents and change only the extents
◆ DeepCopy()
Deep copy one converter into another.
◆ DeserializeConversionParameters()
void vtkSegmentationConverter::DeserializeConversionParameters |
( |
std::string |
conversionParametersString | ) |
|
Parse conversion parameters in string and set it to the converter Such a string can be constructed in a segmentation converter object using /sa SerializeAllConversionParameters
◆ DeserializeImageGeometry() [1/2]
static bool vtkSegmentationConverter::DeserializeImageGeometry |
( |
std::string |
geometryString, |
|
|
vtkOrientedImageData * |
orientedImageData, |
|
|
bool |
allocateScalars = true , |
|
|
int |
scalarType = VTK_VOID , |
|
|
int |
numberOfScalarsComponents = -1 |
|
) |
| |
|
static |
Utility function for de-serializing reference image geometry into a dummy oriented image data
- Parameters
-
geometryString | String containing the serialized image geometry |
orientedImageData | Dummy oriented image data containing the de-serialized geometry information |
allocateScalars | Reallocate scalar array to match the new geometry. Can be set to false if image buffer is not used (e.g., an image is only created to parse image geometry) |
scalarType | If specified then scalar type will be set to the requested value, otherwise current value will be kept. |
numberOfScalarsComponents | If specified then the number of scalar components will be set to the requested value, otherwise current value will be kept. |
- Returns
- Success flag
◆ DeserializeImageGeometry() [2/2]
static bool vtkSegmentationConverter::DeserializeImageGeometry |
( |
std::string |
geometryString, |
|
|
vtkMatrix4x4 * |
geometryMatrix, |
|
|
int |
extent[6] |
|
) |
| |
|
static |
Utility function for de-serializing reference image geometry into a matrix and a dimensions vector
- Parameters
-
geometryString | String containing the serialized image geometry |
geometryMatrix | Matrix containing the de-serialized directions, scaling and origin |
extent | Vector containing the de-serialized extent |
- Returns
- Success flag
◆ FindPath()
void vtkSegmentationConverter::FindPath |
( |
const std::string & |
sourceRepresentationName, |
|
|
const std::string & |
targetRepresentationName, |
|
|
ConversionPathAndCostListType & |
pathsCosts, |
|
|
std::set< std::string > & |
skipRepresentations |
|
) |
| |
|
protected |
Find a transform path between the specified coordinate frames.
- Parameters
-
sourceRepresentationName | representation to convert from |
targetRepresentationName | representation to convert to |
conversionList | Stores the list of converter rules to get from source to the target representation (if not found then returns with empty list). The caller should pass an empty list (when the method is called recursively the list is not empty). |
skipRepresentations | Representations that should be ignored (e.g., because they are used already). The caller should pass an empty set (when the method is called recursively the set is not empty). |
◆ GetAllConversionParameters()
Get all conversion parameters in this converter. Aggregates all parameters from all rules.
◆ GetAvailableRepresentationNames()
void vtkSegmentationConverter::GetAvailableRepresentationNames |
( |
std::set< std::string > & |
representationNames | ) |
|
Get all representations supported by the converter.
◆ GetBinaryLabelmapRepresentationName()
static const char* vtkSegmentationConverter::GetBinaryLabelmapRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetCheapestPath()
Return cheapest path from a list of paths with costs.
◆ GetClassName()
virtual const char* vtkSegmentationConverter::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetClosedSurfaceRepresentationName()
static const char* vtkSegmentationConverter::GetClosedSurfaceRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetConversionParameter()
std::string vtkSegmentationConverter::GetConversionParameter |
( |
const std::string & |
name | ) |
|
Get a conversion parameter value from first rule containing this parameter Note: all parameters with the same name should contain the same value
◆ GetConversionParameterDescription()
std::string vtkSegmentationConverter::GetConversionParameterDescription |
( |
const std::string & |
description | ) |
|
Get a conversion parameter description from first rule containing this parameter Note: all parameters with the same name should contain the same value
◆ GetConversionParametersForPath()
Get all conversion parameters used by the selected conversion path.
◆ GetFractionalLabelmapRepresentationName()
static const char* vtkSegmentationConverter::GetFractionalLabelmapRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetInterpolationTypeFieldName()
static const char* vtkSegmentationConverter::GetInterpolationTypeFieldName |
( |
| ) |
|
|
inlinestatic |
◆ GetPlanarContourRepresentationName()
static const char* vtkSegmentationConverter::GetPlanarContourRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetPossibleConversions()
void vtkSegmentationConverter::GetPossibleConversions |
( |
const std::string & |
sourceRepresentationName, |
|
|
const std::string & |
targetRepresentationName, |
|
|
ConversionPathAndCostListType & |
pathsCosts |
|
) |
| |
Get all possible conversions between two representations.
◆ GetReferenceImageGeometryParameterName()
static const std::string vtkSegmentationConverter::GetReferenceImageGeometryParameterName |
( |
| ) |
|
|
inlinestatic |
Reference image geometry conversion parameter Contains serialized matrix and extent
Definition at line 71 of file vtkSegmentationConverter.h.
◆ GetScalarRangeFieldName()
static const char* vtkSegmentationConverter::GetScalarRangeFieldName |
( |
| ) |
|
|
inlinestatic |
◆ GetSegmentationBinaryLabelmapRepresentationName()
static const char* vtkSegmentationConverter::GetSegmentationBinaryLabelmapRepresentationName |
( |
| ) |
|
|
inlinestatic |
Default representation types In binary and fractional labelmaps values <=0 are considered background voxels (outside), values>0 are foreground (inside).
Definition at line 58 of file vtkSegmentationConverter.h.
◆ GetSegmentationClosedSurfaceRepresentationName()
static const char* vtkSegmentationConverter::GetSegmentationClosedSurfaceRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetSegmentationFractionalLabelmapRepresentationName()
static const char* vtkSegmentationConverter::GetSegmentationFractionalLabelmapRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetSegmentationPlanarContourRepresentationName()
static const char* vtkSegmentationConverter::GetSegmentationPlanarContourRepresentationName |
( |
| ) |
|
|
inlinestatic |
◆ GetThresholdValueFieldName()
static const char* vtkSegmentationConverter::GetThresholdValueFieldName |
( |
| ) |
|
|
inlinestatic |
◆ IsA()
virtual int vtkSegmentationConverter::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkSegmentationConverter::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ New()
◆ PrintSelf()
void vtkSegmentationConverter::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
override |
◆ RebuildRulesGraph()
void vtkSegmentationConverter::RebuildRulesGraph |
( |
| ) |
|
|
protected |
Build a graph from ConverterRules list to facilitate faster finding of rules from a specific representation.
◆ SafeDownCast()
◆ SerializeAllConversionParameters()
std::string vtkSegmentationConverter::SerializeAllConversionParameters |
( |
| ) |
|
Serialize all conversion parameters. The resulting string can be parsed in a segmentation converter object using /sa DeserializeConversionParameters
◆ SerializeImageGeometry() [1/3]
static std::string vtkSegmentationConverter::SerializeImageGeometry |
( |
vtkOrientedImageData * |
orientedImageData | ) |
|
|
static |
Utility function for serializing geometry of oriented image data.
◆ SerializeImageGeometry() [2/3]
static std::string vtkSegmentationConverter::SerializeImageGeometry |
( |
vtkMatrix4x4 * |
geometryMatrix, |
|
|
vtkImageData * |
imageData |
|
) |
| |
|
static |
Utility function for serializing geometry of a complete geometry matrix and regular image data (providing only extent)
◆ SerializeImageGeometry() [3/3]
static std::string vtkSegmentationConverter::SerializeImageGeometry |
( |
vtkMatrix4x4 * |
geometryMatrix, |
|
|
int |
extent[6] |
|
) |
| |
|
static |
Utility function for serializing geometry of a complete geometry matrix and given extents.
◆ SetConversionParameter()
void vtkSegmentationConverter::SetConversionParameter |
( |
const std::string & |
name, |
|
|
const std::string & |
value, |
|
|
const std::string & |
description = "" |
|
) |
| |
Set a conversion parameter to all rules having this parameter.
◆ SetConversionParameters()
Set a list of conversion parameters to all rules (cannot change the description, only the value)
◆ ConverterRules
Converter rules. When the class is created it contains just the default converter rules but then rules may be customized with parameters and may store segment-specific information. Therefore, the rules should not be reused in other segments.
Definition at line 178 of file vtkSegmentationConverter.h.
◆ RulesGraph
The documentation for this class was generated from the following file: