21 #ifndef __vtkSegmentationConverter_h 22 #define __vtkSegmentationConverter_h 25 #include <vtkObject.h> 26 #include <vtkSmartPointer.h> 27 #include <vtkStringArray.h> 36 #include "vtkSegmentationCoreConfigure.h" 41 class vtkAbstractTransform;
78 void PrintSelf(ostream& os, vtkIndent indent)
override;
84 void GetAvailableRepresentationNames(std::set<std::string>& representationNames);
87 void GetPossibleConversions(
const std::string& sourceRepresentationName,
100 void SetConversionParameter(
const std::string& name,
const std::string& value,
const std::string& description=
"");
104 std::string GetConversionParameter(
const std::string& name);
108 std::string GetConversionParameterDescription(
const std::string& description);
112 std::string SerializeAllConversionParameters();
116 void DeserializeConversionParameters(std::string conversionParametersString);
121 void ApplyTransformOnReferenceImageGeometry(vtkAbstractTransform* transform);
132 static std::string SerializeImageGeometry(vtkMatrix4x4* geometryMatrix, vtkImageData* imageData);
135 static std::string SerializeImageGeometry(vtkMatrix4x4* geometryMatrix,
int extent[6]);
144 static bool DeserializeImageGeometry(std::string geometryString,
vtkOrientedImageData* orientedImageData,
bool allocateScalars=
true,
int scalarType=VTK_VOID,
int numberOfScalarsComponents=-1);
151 static bool DeserializeImageGeometry(std::string geometryString, vtkMatrix4x4* geometryMatrix,
int extent[6]);
155 void RebuildRulesGraph();
166 void FindPath(
const std::string& sourceRepresentationName,
const std::string& targetRepresentationName,
194 #endif // __vtkSegmentationConverter_h This class encapsulates a segment that is part of a segmentation.
static const char * GetThresholdValueFieldName()
static const char * GetInterpolationTypeFieldName()
static const std::string GetReferenceImageGeometryParameterName()
static const char * GetSegmentationBinaryLabelmapRepresentationName()
std::map< std::string, RulesListType > RepresentationToRepresentationToRuleMapType
For each "from" representation (first) stores an array of rules (second)
static const char * GetClosedSurfaceRepresentationName()
std::vector< vtkSmartPointer< vtkSegmentationConverterRule > > ConverterRulesListType
Image data containing orientation information.
std::vector< vtkSegmentationConverterRule * > RulesListType
For each "to" representation (first) stores a rule (second)
static const char * GetBinaryLabelmapRepresentationName()
static const char * GetSegmentationClosedSurfaceRepresentationName()
RepresentationToRepresentationToRuleMapType RulesGraph
Source representation to target representation rule graph.
static const char * GetSegmentationFractionalLabelmapRepresentationName()
static const char * GetFractionalLabelmapRepresentationName()
Store a list of conversion parameters.
Store multiple segmentation conversion paths.
static const char * GetSegmentationPlanarContourRepresentationName()
Store a segmentation conversion path.
static const char * GetPlanarContourRepresentationName()
static const char * GetScalarRangeFieldName()
Field names for 2D display parameters.
ConverterRulesListType ConverterRules
Class that can convert between different representations of a segment.