Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLInteractionNode.h
Go to the documentation of this file.
1 #ifndef __vtkMRMLInteractionNode_h
2 #define __vtkMRMLInteractionNode_h
3 
4 #include "vtkMRMLNode.h"
5 
7 
8 class VTK_MRML_EXPORT vtkMRMLInteractionNode : public vtkMRMLNode
9 {
10 public:
11  static vtkMRMLInteractionNode *New();
13  void PrintSelf(ostream& os, vtkIndent indent) override;
14 
15  vtkMRMLNode* CreateNodeInstance() override;
16 
18  void ReadXMLAttributes( const char** atts) override;
19 
21  void WriteXML(ostream& of, int indent) override;
22 
24  void Copy(vtkMRMLNode *node) override;
25 
27  const char* GetNodeTagName() override {return "Interaction";}
28 
30  vtkGetMacro(CurrentInteractionMode, int);
31  void SetCurrentInteractionMode(int mode);
32  vtkGetMacro(LastInteractionMode, int);
33  void SetLastInteractionMode(int mode);
34 
35  vtkGetMacro(PlaceModePersistence, int);
36  vtkGetMacro(TransformModePersistence, int);
37 
43  virtual void SetPlaceModePersistence(int val);
44  virtual void SetTransformModePersistence(int val);
45  virtual void NormalizeAllMouseModes();
46 
50  enum
51  {
52  Place = 1,
53  ViewTransform = 2,
54  Select = 4,
56  User = 1000
57  };
58 
60  enum
61  {
62  InteractionModeChangedEvent = 19001,
67  };
68 
70  const char *GetInteractionModeAsString(int mode);
71  const char *GetInteractionModeAsString() { return this->GetInteractionModeAsString(this->CurrentInteractionMode); } ;
72 
74  int GetInteractionModeByString ( const char * modeString );
75 
77  void SwitchToPersistentPlaceMode();
78  void SwitchToSinglePlaceMode();
79  void SwitchToViewTransformMode();
80 
82  vtkGetMacro(EnableFiberEdit, int);
83  vtkSetMacro(EnableFiberEdit, int);
84 
87  void EditNode(vtkMRMLNode* node);
88 
90  void ShowViewContextMenu(vtkMRMLInteractionEventData* eventData);
91 
92 protected:
94  ~vtkMRMLInteractionNode() override;
95 
97  void operator=(const vtkMRMLInteractionNode&);
98 
101 
104 
106 };
107 
108 #endif
const char * GetInteractionModeAsString()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual void ReadXMLAttributes(const char **atts)
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
virtual void Copy(vtkMRMLNode *node)
Copy node contents from another node of the same type. Does not copy node ID and Scene. Performs deep copy - an independent copy is created from all data, including bulk data.
virtual void WriteXML(ostream &of, int indent)
void PrintSelf(ostream &os, vtkIndent indent) override
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167