Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkCodedEntry.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3 Portions (c) Copyright 2017 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 =========================================================================auto=*/
9 
10 #ifndef __vtkCodedEntry_h
11 #define __vtkCodedEntry_h
12 
13 // MRML includes
14 #include "vtkMRML.h"
15 
16 // VTK includes
17 #include <vtkObject.h>
18 
26 class VTK_MRML_EXPORT vtkCodedEntry : public vtkObject
27 {
28 public:
29 
30  static vtkCodedEntry *New();
31  vtkTypeMacro(vtkCodedEntry, vtkObject);
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35  virtual void Initialize();
36 
38  virtual void Copy(vtkCodedEntry* aEntry);
39 
43  vtkGetStringMacro(CodeValue);
44  vtkSetStringMacro(CodeValue);
45 
51  vtkGetStringMacro(CodingSchemeDesignator);
52  vtkSetStringMacro(CodingSchemeDesignator);
53 
59  vtkGetStringMacro(CodeMeaning);
60  vtkSetStringMacro(CodeMeaning);
61 
63  virtual void SetValueSchemeMeaning(const std::string& value, const std::string& scheme, const std::string& meaning);
64 
68  std::string GetAsPrintableString();
69 
73  std::string GetAsString();
74 
79  bool SetFromString(const std::string& content);
80 
81 protected:
82  vtkCodedEntry();
83  ~vtkCodedEntry() override;
85  void operator=(const vtkCodedEntry&);
86 
87 protected:
88  char* CodeValue{nullptr};
89  char* CodingSchemeDesignator{nullptr};
90  char* CodeMeaning{nullptr};
91 };
92 
93 #endif
Simple class for storing standard coded entries (coding scheme, value, meaning triplets) ...
Definition: vtkCodedEntry.h:26