Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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
22 #include "vtkMRMLDisplayableNode.h"
23 
24 // Markups includes
25 #include "vtkSlicerMarkupsModuleMRMLExport.h"
27 #include "vtkMRMLMarkupsNode.h"
28 
36 class VTK_SLICER_MARKUPS_MODULE_MRML_EXPORT vtkMRMLMarkupsAngleNode : public vtkMRMLMarkupsNode
37 {
38 public:
39  static vtkMRMLMarkupsAngleNode *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  const char* GetIcon() override {return ":/Icons/MarkupsAngleMouseModePlace.png";}
45 
51  {
55  AngleMeasurementMode_Last
56  };
57 
58  //--------------------------------------------------------------------------
59  // MRMLNode methods
60  //--------------------------------------------------------------------------
61 
62  vtkMRMLNode* CreateNodeInstance() override;
64  const char* GetNodeTagName() override {return "MarkupsAngle";}
65 
67  void ReadXMLAttributes( const char** atts) override;
68 
70  void WriteXML(ostream& of, int indent) override;
71 
75 
78  vtkGetMacro(AngleMeasurementMode, int);
81  void SetAngleMeasurementMode(int type);
86  const char* GetAngleMeasurementModeAsString(int id);
91  int GetAngleMeasurementModeFromString(const char* name);
95  void SetAngleMeasurementModeToMinimal();
99  void SetAngleMeasurementModeToOrientedSigned();
103  void SetAngleMeasurementModeToOrientedPositive();
104 
107  vtkGetVector3Macro(OrientationRotationAxis, double);
110  virtual void SetOrientationRotationAxis(double r, double a, double s);
113  virtual void SetOrientationRotationAxis(double ras[3]);
114 
117  double GetAngleDegrees();
118 
119 protected:
121  ~vtkMRMLMarkupsAngleNode() override;
123  void operator=(const vtkMRMLMarkupsAngleNode&);
124 
126  void UpdateInteractionHandleToWorldMatrix() override;
127 
128 protected:
132  double OrientationRotationAxis[3];
133 
140 };
141 
142 #endif
static vtkMRMLMarkupsNode * New()
MRML node to represent an angle markup Angle Markups nodes contain three control points. Visualization parameters are set in the vtkMRMLMarkupsDisplayNode class.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void operator=(const vtkMRMLMarkupsNode &)
virtual void UpdateInteractionHandleToWorldMatrix()
Calculates the handle to world matrix based on the current control points.
vtkMRMLCopyContentMacro(vtkMRMLMarkupsNode)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
const char * GetIcon() override
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
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