21 #ifndef __vtkMRMLMarkupsROINode_h 22 #define __vtkMRMLMarkupsROINode_h 29 #include "vtkSlicerMarkupsModuleMRMLExport.h" 34 #include <vtkMatrix4x4.h> 35 #include <vtkSmartPointer.h> 36 #include <vtkStringArray.h> 37 #include <vtkTransform.h> 42 class vtkImplicitFunction;
59 void PrintSelf(ostream& os, vtkIndent indent)
override;
61 const char*
GetIcon()
override {
return ":/Icons/MarkupsCurveMouseModePlace.png";}
76 vtkGetVector3Macro(Size,
double);
77 void SetSize(
const double size[3]);
78 void SetSize(
double x,
double y,
double z);
81 void GetCenter(
double center[3]);
82 void GetCenterWorld(
double center[3]);
83 void SetCenterWorld(
const double center[3]);
84 void SetCenter(
const double center[3]);
88 void GetXAxisWorld(
double axis_World[3]);
89 void GetYAxisWorld(
double axis_World[3]);
90 void GetZAxisWorld(
double axis_World[3]);
91 void GetAxisWorld(
int axisIndex,
double axis_World[3]);
92 void GetXAxisLocal(
double axis_Local[3]);
93 void GetYAxisLocal(
double axis_Local[3]);
94 void GetZAxisLocal(
double axis_Local[3]);
95 void GetAxisLocal(
int axisIndex,
double axis_Local[3]);
100 return this->ROIToLocalMatrix;
104 void GetBoundsROI(
double bounds[6]);
108 vtkGetMacro(ROIType,
int);
109 void SetROIType(
int roiType);
110 static const char* GetROITypeAsString(
int roiType);
111 static int GetROITypeFromString(
const char* roiType);
114 virtual void UpdateROIFromControlPoints();
115 virtual void UpdateBoxROIFromControlPoints();
116 virtual void UpdateBoundingBoxROIFromControlPoints();
119 virtual void UpdateControlPointsFromROI();
120 virtual void UpdateControlPointsFromBoundingBoxROI();
121 virtual void UpdateControlPointsFromBoxROI();
155 void ProcessMRMLEvents(vtkObject* caller,
unsigned long event,
void* callData)
override;
179 int SetXYZ(
double center[3]);
180 int SetXYZ(
double x,
double y,
double z);
181 bool GetXYZ(
double center[3]);
190 void SetRadiusXYZ(
double radiusXYZ[3]);
191 void SetRadiusXYZ(
double x,
double y,
double z);
192 void GetRadiusXYZ(
double radiusXYZ[3]);
195 void GetTransformedPlanes(vtkPlanes* planes);
199 vtkSetMacro(InsideOut,
bool);
200 vtkGetMacro(InsideOut,
bool);
201 vtkBooleanMacro(InsideOut,
bool);
204 bool InsideOut{
false};
207 double Size[3]{ 0.0, 0.0, 0.0 };
209 bool IsUpdatingControlPointsFromROI{
false};
210 bool IsUpdatingROIFromControlPoints{
false};
static vtkMRMLMarkupsNode * New()
MRML node to represent an ROI markup.
void operator=(const vtkMRMLMarkupsNode &)
void CreateDefaultDisplayNodes() override
Create and observe default display node(s)
void OnTransformNodeReferenceChanged(vtkMRMLTransformNode *transformNode) override
Called when transform node reference added/modified/removed.
virtual void UpdateInteractionHandleToWorldMatrix()
Calculates the handle to world matrix based on the current control points.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
vtkMRMLCopyContentMacro(vtkMRMLMarkupsNode)
const char * GetIcon() override
vtkMRMLStorageNode * CreateDefaultStorageNode() override
Create default storage node or nullptr if does not have one.
A superclass for other storage nodes.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
vtkMatrix4x4 * GetROIToLocalMatrix()
4x4 matrix defining the ROI center and axis directions within the local coordinate system...
vtkSmartPointer< vtkMatrix4x4 > ROIToLocalMatrix
Abstract Superclass for all specific types of MRML nodes.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
Alternative method to propagate events generated in Display nodes.
void PrintSelf(ostream &os, vtkIndent indent) override