21#ifndef __vtkSegmentationConverter_h
22#define __vtkSegmentationConverter_h
26#include <vtkSmartPointer.h>
27#include <vtkStringArray.h>
36#include "vtkSegmentationCoreConfigure.h"
41class vtkAbstractTransform;
77 void PrintSelf(ostream& os, vtkIndent indent)
override;
165 void FindPath(
const std::string& sourceRepresentationName,
const std::string& targetRepresentationName,
Image data containing orientation information.
This class encapsulates a segment that is part of a segmentation.
Store a list of conversion parameters.
Store a segmentation conversion path.
Store multiple segmentation conversion paths.
static const char * GetFractionalLabelmapRepresentationName()
static std::string SerializeImageGeometry(vtkMatrix4x4 *geometryMatrix, vtkImageData *imageData)
Utility function for serializing geometry of a complete geometry matrix and regular image data (provi...
std::vector< vtkSegmentationConverterRule * > RulesListType
For each "to" representation (first) stores a rule (second)
static vtkSegmentationConverter * New()
std::map< std::string, RulesListType > RepresentationToRepresentationToRuleMapType
For each "from" representation (first) stores an array of rules (second)
static const char * GetSegmentationFractionalLabelmapRepresentationName()
static const char * GetInterpolationTypeFieldName()
static std::string SerializeImageGeometry(vtkOrientedImageData *orientedImageData)
Utility function for serializing geometry of oriented image data.
static bool DeserializeImageGeometry(std::string geometryString, vtkMatrix4x4 *geometryMatrix, int extent[6])
static const char * GetSegmentationPlanarContourRepresentationName()
vtkSmartPointer< vtkSegmentationConversionParameters > CustomConversionParameters
static const std::string GetReferenceImageGeometryParameterName()
static const char * GetBinaryLabelmapRepresentationName()
std::vector< vtkSmartPointer< vtkSegmentationConverterRule > > ConverterRulesListType
void ApplyTransformOnReferenceImageGeometry(vtkAbstractTransform *transform)
static const char * GetSegmentationClosedSurfaceRepresentationName()
static const char * GetThresholdValueFieldName()
void RebuildRulesGraph()
Build a graph from ConverterRules list to facilitate faster finding of rules from a specific represen...
static const char * GetScalarRangeFieldName()
Field names for 2D display parameters.
static const char * GetClosedSurfaceRepresentationName()
std::string SerializeAllConversionParameters()
void GetConversionParametersForPath(vtkSegmentationConversionParameters *conversionParameters, vtkSegmentationConversionPath *path)
Get all conversion parameters used by the selected conversion path.
void PrintSelf(ostream &os, vtkIndent indent) override
void GetPossibleConversions(const std::string &sourceRepresentationName, const std::string &targetRepresentationName, vtkSegmentationConversionPaths *paths)
Get all possible conversions between two representations.
static vtkSegmentationConversionPath * GetCheapestPath(vtkSegmentationConversionPaths *paths)
Return cheapest path from a list of paths with costs.
std::string GetConversionParameterDescription(const std::string &description)
static bool DeserializeImageGeometry(std::string geometryString, vtkOrientedImageData *orientedImageData, bool allocateScalars=true, int scalarType=VTK_VOID, int numberOfScalarsComponents=-1)
std::string GetConversionParameter(const std::string &name)
void GetAllConversionParameters(vtkSegmentationConversionParameters *conversionParameters)
Get all conversion parameters in this converter. Aggregates all parameters from all rules.
void SetConversionParameters(vtkSegmentationConversionParameters *parameters)
Set a list of conversion parameters to all rules (cannot change the description, only the value)
static std::string SerializeImageGeometry(vtkMatrix4x4 *geometryMatrix, int extent[6])
Utility function for serializing geometry of a complete geometry matrix and given extents.
static const char * GetSegmentationBinaryLabelmapRepresentationName()
~vtkSegmentationConverter() override
void FindPath(const std::string &sourceRepresentationName, const std::string &targetRepresentationName, vtkSegmentationConversionPaths *paths, vtkStringArray *skipRepresentations)
void SetConversionParameter(const std::string &name, const std::string &value, const std::string &description="")
Set a conversion parameter to all rules having this parameter.
ConverterRulesListType ConverterRules
vtkSegmentationConverter()
static const char * GetPlanarContourRepresentationName()
void GetAvailableRepresentationNames(std::set< std::string > &representationNames)
Get all representations supported by the converter.
virtual void DeepCopy(vtkSegmentationConverter *aConverter)
Deep copy one converter into another.
RepresentationToRepresentationToRuleMapType RulesGraph
Source representation to target representation rule graph.
void DeserializeConversionParameters(std::string conversionParametersString)