Slicer  4.11
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
vtkMRMLSelectionNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLSelectionNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLSelectionNode_h
16 #define __vtkMRMLSelectionNode_h
17 
18 // MRML includes
19 #include "vtkMRMLNode.h"
20 
21 class vtkMRMLUnitNode;
22 
23 // STD includes
24 #include <vector>
25 
34 class VTK_MRML_EXPORT vtkMRMLSelectionNode : public vtkMRMLNode
35 {
36  public:
37  static vtkMRMLSelectionNode *New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  vtkMRMLNode* CreateNodeInstance() override;
42 
44  void ReadXMLAttributes( const char** atts) override;
45 
47  void WriteXML(ostream& of, int indent) override;
48 
50  void Copy(vtkMRMLNode *node) override;
51 
53  const char* GetNodeTagName() override {return "Selection";}
54 
56  const char* GetActiveVolumeID();
57  void SetActiveVolumeID(const char* id);
59  void SetReferenceActiveVolumeID (const char *id) { this->SetActiveVolumeID(id); };
60 
62  const char* GetSecondaryVolumeID();
63  void SetSecondaryVolumeID(const char* id);
65  void SetReferenceSecondaryVolumeID (char *id) { this->SetSecondaryVolumeID(id); };
66 
68  const char* GetActiveLabelVolumeID();
69  void SetActiveLabelVolumeID(const char* id);
71  void SetReferenceActiveLabelVolumeID (const char *id) { this->SetActiveLabelVolumeID(id); };
72 
75  const char* GetActiveFiducialListID();
78  void SetActiveFiducialListID(const char* id);
81  void SetReferenceActiveFiducialListID (const char *id) { this->SetActiveFiducialListID(id); };
82 
87  vtkGetStringMacro (ActivePlaceNodeClassName);
92  vtkSetStringMacro(ActivePlaceNodeClassName);
97  void SetReferenceActivePlaceNodeClassName (const char *className);
98 
102  const char* GetActivePlaceNodeID();
106  void SetActivePlaceNodeID(const char* id);
111  void SetReferenceActivePlaceNodeID (const char *id)
112  { this->SetActivePlaceNodeID(id);
114 
116  const char* GetActiveROIListID();
117  void SetActiveROIListID(const char* id);
119  void SetReferenceActiveROIListID (const char *id) { this->SetActiveROIListID(id); };
120 
122  const char* GetActiveCameraID();
123  void SetActiveCameraID(const char* id);
125  void SetReferenceActiveCameraID (const char *id) { this->SetActiveCameraID(id); };
126 
128  const char* GetActiveTableID();
129  void SetActiveTableID(const char* id);
131  void SetReferenceActiveTableID (char *id) { this->SetActiveTableID(id); };
132 
134  const char* GetActiveViewID();
135  void SetActiveViewID(const char* id );
137  void SetReferenceActiveViewID (const char *id) { this->SetActiveViewID(id); };
138 
140  const char* GetActiveLayoutID();
141  void SetActiveLayoutID(const char* id);
143  void SetReferenceActiveLayoutID (const char *id) { this->SetActiveLayoutID(id); };
144 
146  const char* GetActivePlotChartID();
147  void SetActivePlotChartID(const char* id);
149  void SetReferenceActivePlotChartID (const char *id) { this->SetActivePlotChartID(id); };
150 
163  enum
164  {
165  ActivePlaceNodeIDChangedEvent = 19001,
169  };
170 
173  void AddNewPlaceNodeClassNameToList(const char *newID, const char *resource = nullptr, const char *iconName = "");
174 
175  // -- Units --
176 
186  const char* GetUnitNodeID(const char* quantity);
187  void SetUnitNodeID(const char* quantity, const char* id);
188 
191  vtkMRMLUnitNode* GetUnitNode(const char* quantity);
192 
196  void GetUnitNodes(std::vector<vtkMRMLUnitNode*>& units);
197 
200  void GetUnitNodeIDs(std::vector<const char*>& quantities,
201  std::vector<const char*>& unitIDs);
202 
206  void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override;
207 
210  void RemovePlaceNodeClassNameFromList(const char *className);
213  std::string GetPlaceNodeClassNameByIndex(int n);
216  std::string GetPlaceNodeResourceByIndex(int n);
219  std::string GetPlaceNodeIconNameByIndex(int n);
220 
222  int PlaceNodeClassNameInList(std::string className);
227  std::string GetPlaceNodeResourceByClassName(std::string className);
229  int GetNumberOfPlaceNodeClassNamesInList() { return static_cast<int>(this->PlaceNodeClassNameList.size()); };
230 
231 protected:
233  ~vtkMRMLSelectionNode() override;
235  void operator=(const vtkMRMLSelectionNode&);
236 
238 
239  std::vector<std::string> PlaceNodeClassNameList;
240  std::vector<std::string> PlaceNodeResourceList;
241  std::vector<std::string> PlaceNodeIconNameList;
242 };
243 
244 #endif
void SetReferenceActiveTableID(char *id)
void SetReferenceActiveLayoutID(const char *id)
virtual void ReadXMLAttributes(const char **atts)
void SetReferenceActivePlaceNodeID(const char *id)
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
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.
std::vector< std::string > PlaceNodeIconNameList
void SetReferenceActiveViewID(const char *id)
void SetReferenceActiveLabelVolumeID(const char *id)
void SetReferenceSecondaryVolumeID(char *id)
virtual void WriteXML(ostream &of, int indent)
void SetReferenceActiveFiducialListID(const char *id)
void SetReferenceActiveROIListID(const char *id)
void SetReferenceActiveVolumeID(const char *id)
int GetNumberOfPlaceNodeClassNamesInList()
Get the number of class names in the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void SetReferenceActiveCameraID(const char *id)
Node that holds the information about a unit.
MRML node for storing information about the active nodes in the scene.
std::vector< std::string > PlaceNodeClassNameList
std::vector< std::string > PlaceNodeResourceList
void SetReferenceActivePlotChartID(const char *id)