21 #ifndef __vtkMRMLSegmentationNode_h 22 #define __vtkMRMLSegmentationNode_h 35 class vtkCallbackCommand;
60 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
66 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
69 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
78 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Segmentation";};
84 virtual void GetRASBounds(
double bounds[6]) VTK_OVERRIDE;
89 virtual void GetBounds(
double bounds[6]) VTK_OVERRIDE;
97 virtual
void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) VTK_OVERRIDE;
101 virtual
void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
107 virtual
void CreateDefaultDisplayNodes() VTK_OVERRIDE;
134 virtual bool GenerateMergedLabelmap(
vtkOrientedImageData* mergedImageData,
int extentComputationMode,
vtkOrientedImageData* mergedLabelmapGeometry = NULL,
const std::vector<std::string>& segmentIDs = std::vector<std::string>());
136 #endif // __VTK_WRAP__ 149 EditAllowedEverywhere = 0,
177 std::string editedSegmentID=
"", std::string maskSegmentID=
"",
195 virtual bool SetMasterRepresentationToBinaryLabelmap();
198 virtual bool SetMasterRepresentationToClosedSurface();
201 virtual bool CreateBinaryLabelmapRepresentation();
204 virtual void RemoveBinaryLabelmapRepresentation();
214 virtual bool CreateClosedSurfaceRepresentation();
217 virtual void RemoveClosedSurfaceRepresentation();
223 virtual vtkPolyData* GetClosedSurfaceRepresentation(
const std::string segmentId);
227 virtual std::string AddSegmentFromClosedSurfaceRepresentation(vtkPolyData* polyData,
228 std::string segmentName =
"",
double color[3] = NULL, std::string segmentId =
"");
233 std::string segmentName =
"",
double color[3] = NULL, std::string segmentId =
"");
236 void RemoveSegment(
const std::string& segmentID);
239 double* GetSegmentCenter(
const std::string& segmentID);
244 double* GetSegmentCenterRAS(
const std::string& segmentID);
251 static void SegmentationModifiedCallback(vtkObject* caller,
unsigned long eid,
void* clientData,
void* callData);
255 void OnMasterRepresentationModified();
259 void OnSegmentAdded(
const char* segmentId);
263 void OnSegmentRemoved(
const char* segmentId);
267 void OnSegmentModified(
const char* segmentId);
283 double SegmentCenterTmp[4];
286 #endif // __vtkMRMLSegmentationNode_h vtkSmartPointer< vtkCallbackCommand > SegmentationModifiedCallbackCommand
Command handling events from segmentation object.
Modification is allowed outside all visible segments.
static std::string GetReferenceImageGeometryReferenceRole()
Expose reference identifier to get the volume node defining the reference image geometry if any...
Modification is allowed inside all visible segments.
virtual void GetBounds(double bounds[6])
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
Modification is allowed inside all segments.
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.
MRML node for representing segmentation display attributes.
static const char * GetSegmentIDAttributeName()
Modification is allowed only over the area covered by segment specified in MaskSegmentID.
A superclass for other storage nodes.
Modification is allowed outside all segments.
Extent is computed as union of effective extent of all segments.
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 ...