21 #ifndef __vtkMRMLSegmentationNode_h 22 #define __vtkMRMLSegmentationNode_h 35 class vtkCallbackCommand;
59 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
65 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
68 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
77 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Segmentation";};
83 virtual void GetRASBounds(
double bounds[6]) VTK_OVERRIDE;
88 virtual void GetBounds(
double bounds[6]) VTK_OVERRIDE;
100 virtual void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
133 virtual bool GenerateMergedLabelmap(
vtkOrientedImageData* mergedImageData,
int extentComputationMode,
vtkOrientedImageData* mergedLabelmapGeometry = NULL,
const std::vector<std::string>& segmentIDs = std::vector<std::string>());
135 #endif // __VTK_WRAP__ 159 virtual bool SetMasterRepresentationToBinaryLabelmap();
162 virtual bool SetMasterRepresentationToClosedSurface();
165 virtual bool CreateBinaryLabelmapRepresentation();
168 virtual void RemoveBinaryLabelmapRepresentation();
178 virtual bool CreateClosedSurfaceRepresentation();
181 virtual void RemoveClosedSurfaceRepresentation();
187 virtual vtkPolyData* GetClosedSurfaceRepresentation(
const std::string segmentId);
191 virtual std::string AddSegmentFromClosedSurfaceRepresentation(vtkPolyData* polyData,
192 std::string segmentName =
"",
double color[3] = NULL, std::string segmentId =
"");
197 std::string segmentName =
"",
double color[3] = NULL, std::string segmentId =
"");
200 void RemoveSegment(
const std::string& segmentID);
207 static void SegmentationModifiedCallback(vtkObject* caller,
unsigned long eid,
void* clientData,
void* callData);
211 void OnMasterRepresentationModified();
215 void OnSegmentAdded(
const char* segmentId);
219 void OnSegmentRemoved(
const char* segmentId);
223 void OnSegmentModified(
const char* segmentId);
238 #endif // __vtkMRMLSegmentationNode_h vtkSmartPointer< vtkCallbackCommand > SegmentationModifiedCallbackCommand
Command handling events from segmentation object.
static std::string GetReferenceImageGeometryReferenceRole()
Expose reference identifier to get the volume node defining the reference image geometry if any...
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
virtual void GetBounds(double bounds[6])
Extent is computed as union of effective extent of all segments.
void operator=(const vtkMRMLDisplayableNode &)
MRML node to represent a complete subject hierarchy tree.
Image data containing orientation information.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
This class encapsulates a segmentation that can contain multiple segments and multiple representation...
vtkSegmentation * Segmentation
Segmentation object to store the actual data.
virtual void CreateDefaultDisplayNodes()
static const char * GetSegmentIDAttributeName()
A supercalss for other storage nodes.
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
virtual void GetRASBounds(double bounds[6])
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...