21 #ifndef __vtkMRMLMarkupsPlaneNode_h 22 #define __vtkMRMLMarkupsPlaneNode_h 28 #include "vtkSlicerMarkupsModuleMRMLExport.h" 33 #include <vtkMatrix4x4.h> 53 void PrintSelf(ostream& os, vtkIndent indent)
override;
55 const char*
GetIcon()
override {
return ":/Icons/MarkupsPlaneMouseModePlace.png";}
76 void WriteXML(ostream& of,
int indent)
override;
86 vtkSetMacro(SizeMode,
int);
87 vtkGetMacro(SizeMode,
int);
88 const char* GetSizeModeAsString(
int sizeMode);
89 int GetSizeModeFromString(
const char* sizeMode);
94 vtkGetMacro(AutoSizeScalingFactor,
double);
95 vtkSetMacro(AutoSizeScalingFactor,
double);
100 void GetPlaneBounds(
double bounds[6]);
101 vtkSetVector6Macro(PlaneBounds,
double);
105 void GetNormal(
double normal[3]);
106 void SetNormal(
const double normal[3]);
107 void GetNormalWorld(
double normal[3]);
108 void SetNormalWorld(
const double normal[3]);
112 void GetOrigin(
double origin[3]);
113 void SetOrigin(
const double origin[3]);
114 void GetOriginWorld(
double origin[3]);
115 void SetOriginWorld(
const double origin[3]);
122 void GetAxes(
double x[3],
double y[3],
double z[3]);
123 void SetAxes(
const double x[3],
const double y[3],
const double z[3]);
124 void GetAxesWorld(
double x[3],
double y[3],
double z[3]);
125 void SetAxesWorld(
const double x[3],
const double y[3],
const double z[3]);
128 virtual void GetPlaneToLocalMatrix(vtkMatrix4x4* planeToLocalMatrix);
130 virtual void GetPlaneToWorldMatrix(vtkMatrix4x4* planeToWorldMatrix);
134 virtual vtkMatrix4x4* GetPlaneToPlaneOffsetMatrix();
143 double GetClosestPointOnPlaneWorld(
const double posWorld[3],
double closestPosWorld[3],
bool infinitePlane =
true);
148 void CalculateAxesFromPoints(
const double point0[3],
const double point1[3],
const double point2[3],
double x[3],
double y[3],
double z[3]);
152 double PlaneBounds[6];
static vtkMRMLMarkupsNode * New()
const char * GetIcon() override
vtkSmartPointer< vtkMatrix4x4 > PlaneToPlaneOffsetMatrix
double AutoSizeScalingFactor
void operator=(const vtkMRMLMarkupsNode &)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual void UpdateInteractionHandleToWorldMatrix()
Calculates the handle to world matrix based on the current control points.
MRML node to represent a plane markup Plane Markups nodes contain three control points. Visualization parameters are set in the vtkMRMLMarkupsDisplayNode class.
vtkMRMLCopyContentMacro(vtkMRMLMarkupsNode)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
Abstract Superclass for all specific types of MRML nodes.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override