Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkTagTable.h
Go to the documentation of this file.
1 #ifndef __vtkTagTable_h
2 #define __vtkTagTable_h
3 
4 // MRML includes
5 #include "vtkMRML.h"
6 
7 // VTK includes
8 #include <vtkObject.h>
9 
10 // STD includes
11 #include <string>
12 #include <map>
13 
14 class VTK_MRML_EXPORT vtkTagTable : public vtkObject
15 {
16  public:
18  static vtkTagTable *New();
19  vtkTypeMacro(vtkTagTable, vtkObject);
20  void PrintSelf(ostream& os, vtkIndent indent) override;
21 
24  vtkGetStringMacro ( Name );
25  vtkSetStringMacro ( Name );
26 
27  vtkGetMacro ( RestoreSelectionState, int);
28  vtkSetMacro ( RestoreSelectionState, int);
29 
33  virtual void Initialize() { };
34 
37  virtual void AddOrUpdateTag ( const char *attribute, const char *value );
40  virtual void AddOrUpdateTag ( const char *attribute, const char *value, int selected );
43  virtual void AddUniqueTag ( const char *attribute, const char *value );
46  virtual int UpdateTag ( const char *attribute, const char *value );
47  virtual int UpdateTag ( const char *attribute, const char *value, int selected );
48 
51  virtual const char *GetTagAttribute ( int index);
52 
55  virtual const char *GetTagValue ( int index );
56 
59  virtual const char *GetTagValue ( const char* attribute);
60 
64  virtual int CheckTableForTag ( const char *attribute, const char *value );
65 
68  virtual int CheckTableForTag ( const char *attribute );
69 
70  virtual void SelectTag ( const char *attribute );
71  virtual void DeselectTag ( const char *attribute );
72  virtual int IsTagSelected ( const char *attribute );
73 
74 
77  virtual void DeleteTag ( const char *attribute );
78 
81  virtual void ClearTagTable ( );
82 
85  virtual int GetNumberOfTags ( );
86 
88  virtual void Copy( vtkTagTable *t);
89 
91  std::map<std::string, std::string> TagTable;
93  std::map<std::string, int > TagSelectionTable;
94 
95  private:
96  char *Name;
97  int RestoreSelectionState;
98 
99  protected:
100  vtkTagTable();
101  ~vtkTagTable() override;
102  vtkTagTable(const vtkTagTable&);
103  void operator=(const vtkTagTable&);
104 
105 };
106 
107 #endif
virtual void Initialize()
Definition: vtkTagTable.h:33
std::map< std::string, int > TagSelectionTable
describes whether each attribute is selected or not.
Definition: vtkTagTable.h:93
std::map< std::string, std::string > TagTable
describes attribute value pairs
Definition: vtkTagTable.h:91