Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSegmentationConversionParameters.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15 ==============================================================================*/
16 
17 #ifndef __vtkSegmentationConversionParameters_h
18 #define __vtkSegmentationConversionParameters_h
19 
20 // VTK includes
21 #include <vtkObject.h>
22 
23 // STD includes
24 #include <vector>
25 
26 // Segmentation includes
27 #include "vtkSegmentationCoreConfigure.h"
28 
35 class vtkSegmentationCore_EXPORT vtkSegmentationConversionParameters : public vtkObject
36 {
37 public:
39  vtkTypeMacro(vtkSegmentationConversionParameters, vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
44  std::string GetName(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
45  void SetName(int index, const std::string& name) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
47 
50  std::string GetDescription(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
51  std::string GetDescription(const std::string& name);
52  void SetDescription(int index, const std::string& description) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
53  void SetDescription(const std::string& name, const std::string& description);
55 
58  std::string GetValue(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
59  std::string GetValue(const std::string& name);
60  double GetValueAsDouble(const std::string& name);
61  int GetValueAsInt(const std::string& name);
62  void SetValue(int index, const std::string& value) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
63  void SetValue(const std::string& name, const std::string& value);
65 
68  int GetIndexFromName(const std::string name);
69 
71  int GetNumberOfParameters();
72 
74  void RemoveAllParameters();
75 
77  void RemoveParameter(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
78 
80  int SetParameter(const std::string& name, const std::string& value, const std::string& description = "");
81 
83  void DeepCopy(vtkSegmentationConversionParameters* source);
84 
86  void CopyParameter(vtkSegmentationConversionParameters* source, int sourceIndex);
87 
88 protected:
89 
91  {
92  std::string Name;
93  std::string Description;
94  std::string Value;
95  };
96 
97  std::vector<ConversionParameterType> ParameterList;
98 
99 protected:
102 
103 private:
105  void operator=(const vtkSegmentationConversionParameters&) = delete;
106 };
107 
108 #endif // __vtkSegment_h
std::vector< ConversionParameterType > ParameterList
Store a list of conversion parameters.