Slicer 5.9
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
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
14class 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:
101 ~vtkTagTable() override;
103 void operator=(const vtkTagTable&);
104
105};
106
107#endif
virtual void DeleteTag(const char *attribute)
Deletes a column with the name matching "attribute" in the TagTable.
virtual int GetNumberOfTags()
Convenience method that returns the number of tags in TagTable.
virtual void AddOrUpdateTag(const char *attribute, const char *value)
Add a tag column to the TagTable.
virtual void AddOrUpdateTag(const char *attribute, const char *value, int selected)
Add a tag column to the TagTable.
std::map< std::string, int > TagSelectionTable
describes whether each attribute is selected or not.
Definition vtkTagTable.h:93
virtual void AddUniqueTag(const char *attribute, const char *value)
Add a tag column to the TagTable.
static vtkTagTable * New()
The Usual vtk class functions.
virtual int UpdateTag(const char *attribute, const char *value)
Replace a tag column in the TagTable.
virtual void Initialize()
Definition vtkTagTable.h:33
virtual void Copy(vtkTagTable *t)
vtkTagTable(const vtkTagTable &)
virtual const char * GetTagAttribute(int index)
Get the attribute at a particular index in the TagTable.
void operator=(const vtkTagTable &)
virtual const char * GetTagValue(int index)
Get the value of a tag in the TagTable.
virtual const char * GetTagValue(const char *attribute)
Get the value of a tag in the TagTable.
virtual void SelectTag(const char *attribute)
virtual int IsTagSelected(const char *attribute)
virtual int UpdateTag(const char *attribute, const char *value, int selected)
std::map< std::string, std::string > TagTable
describes attribute value pairs
Definition vtkTagTable.h:91
virtual void ClearTagTable()
Clears all tags out of table.
~vtkTagTable() override
virtual void DeselectTag(const char *attribute)
virtual int CheckTableForTag(const char *attribute, const char *value)
virtual int CheckTableForTag(const char *attribute)
Returns index of table for which tag exists, or returns -1.
void PrintSelf(ostream &os, vtkIndent indent) override