Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLMarkupsAngleNode.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
18#ifndef __vtkMRMLMarkupsAngleNode_h
19#define __vtkMRMLMarkupsAngleNode_h
20
21// MRML includes
23
24// Markups includes
25#include "vtkSlicerMarkupsModuleMRMLExport.h"
27#include "vtkMRMLMarkupsNode.h"
28
36class VTK_SLICER_MARKUPS_MODULE_MRML_EXPORT vtkMRMLMarkupsAngleNode : public vtkMRMLMarkupsNode
37{
38public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
44 const char* GetIcon() override {return ":/Icons/MarkupsAngle.png";}
45 const char* GetAddIcon() override {return ":/Icons/MarkupsAngleMouseModePlace.png";}
46 const char* GetPlaceAddIcon() override {return ":/Icons/MarkupsAngleMouseModePlaceAdd.png";}
47
53 {
57 AngleMeasurementMode_Last
58 };
59
60 //--------------------------------------------------------------------------
61 // MRMLNode methods
62 //--------------------------------------------------------------------------
63
66 const char* GetNodeTagName() override {return "MarkupsAngle";}
67
69 const char* GetMarkupType() override {return "Angle";};
70
71 // Get markup type GUI display name
72 const char* GetTypeDisplayName() override {return "Angle";};
73
75 const char* GetDefaultNodeNamePrefix() override {return "A";};
76
78 void ReadXMLAttributes( const char** atts) override;
79
81 void WriteXML(ostream& of, int indent) override;
82
86
89 vtkGetMacro(AngleMeasurementMode, int);
115
118 vtkGetVector3Macro(OrientationRotationAxis, double);
121 virtual void SetOrientationRotationAxis(double r, double a, double s);
124 virtual void SetOrientationRotationAxis(double ras[3]);
125
129
130protected:
135
138
139protected:
143 double OrientationRotationAxis[3];
144
151};
152
153#endif
MRML node to represent an angle markup Angle Markups nodes contain three control points....
vtkMRMLMarkupsAngleNode(const vtkMRMLMarkupsAngleNode &)
virtual void SetOrientationRotationAxis(double r, double a, double s)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
const char * GetMarkupType() override
Get markup type internal name.
const char * GetAddIcon() override
void SetAngleMeasurementModeToOrientedPositive()
~vtkMRMLMarkupsAngleNode() override
void SetAngleMeasurementModeToOrientedSigned()
static vtkMRMLMarkupsAngleNode * New()
virtual void SetOrientationRotationAxis(double ras[3])
void operator=(const vtkMRMLMarkupsAngleNode &)
int GetAngleMeasurementModeFromString(const char *name)
void PrintSelf(ostream &os, vtkIndent indent) override
Print out the node information to the output stream.
void SetAngleMeasurementModeToMinimal()
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
const char * GetIcon() override
const char * GetTypeDisplayName() override
const char * GetPlaceAddIcon() override
vtkMRMLCopyContentMacro(vtkMRMLMarkupsAngleNode)
const char * GetDefaultNodeNamePrefix() override
Get markup short name.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void SetAngleMeasurementMode(int type)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
const char * GetAngleMeasurementModeAsString(int id)
void UpdateInteractionHandleToWorldMatrix() override
Calculates the handle to world matrix based on the current control points.
Abstract Superclass for all specific types of MRML nodes.