21 #ifndef __vtkMRMLSegmentationStorageNode_h 22 #define __vtkMRMLSegmentationStorageNode_h 26 #define SUPPORT_4D_SPATIAL_NRRD 31 #ifdef SUPPORT_4D_SPATIAL_NRRD 33 #include <itkImageRegionIteratorWithIndex.h> 43 class vtkInformationStringKey;
44 class vtkInformationIntegerVectorKey;
51 #ifdef SUPPORT_4D_SPATIAL_NRRD 55 typedef itk::Image<unsigned char, 4> BinaryLabelmap4DImageType;
56 typedef itk::ImageRegionIteratorWithIndex<BinaryLabelmap4DImageType> BinaryLabelmap4DIteratorType;
62 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
67 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
70 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
76 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "SegmentationStorage";}
87 void ResetSupportedWriteFileTypes();
114 #ifdef SUPPORT_4D_SPATIAL_NRRD 115 virtual int ReadBinaryLabelmapRepresentation4DSpatial(
vtkMRMLSegmentationNode* segmentationNode, std::string path);
124 void AddPolyDataFileNames(std::string path,
vtkSegmentation* segmentation);
127 std::string SerializeContainedRepresentationNames(
vtkSegmentation* segmentation);
130 void CreateRepresentationsBySerializedNames(
vtkSegmentation* segmentation, std::string representationNames);
132 static std::string GetSegmentMetaDataKey(
int segmentIndex,
const std::string& keyName);
134 static std::string GetSegmentationMetaDataKey(
const std::string& keyName);
136 static std::string GetSegmentTagsAsString(
vtkSegment* segment);
137 static void SetSegmentTagsFromString(
vtkSegment* segment, std::string tagsValue);
140 static std::string GetImageExtentAsString(
int extent[6]);
141 static void GetImageExtentFromString(
int extent[6], std::string extentValue);
143 static std::string GetSegmentColorAsString(
vtkMRMLSegmentationNode* segmentationNode,
const std::string& segmentId);
144 static void GetSegmentColorFromString(
double color[3], std::string colorString);
This class encapsulates a segment that is part of a segmentation.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
virtual void InitializeSupportedReadFileTypes()
MRML node for segmentation storage on disk.
virtual const char * GetDefaultWriteFileExtension()
Return default file extension for writing.
void operator=(const vtkMRMLStorageNode &)
Image data containing orientation information.
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
Create instance of the default node. Like New only virtual.
This class encapsulates a segmentation that can contain multiple segments and multiple representation...
A supercalss for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void InitializeSupportedWriteFileTypes()
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...