Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
34class vtkSegmentationCore_EXPORT vtkSegmentationConversionParameters : public vtkObject
35{
36public:
38 vtkTypeMacro(vtkSegmentationConversionParameters, vtkObject);
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
43 std::string GetName(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
44 void SetName(int index, const std::string& name) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
46
49 std::string GetDescription(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
50 std::string GetDescription(const std::string& name);
51 void SetDescription(int index, const std::string& description) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
52 void SetDescription(const std::string& name, const std::string& description);
54
57 std::string GetValue(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
58 std::string GetValue(const std::string& name);
59 double GetValueAsDouble(const std::string& name);
60 int GetValueAsInt(const std::string& name);
61 void SetValue(int index, const std::string& value) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
62 void SetValue(const std::string& name, const std::string& value);
64
67 int GetIndexFromName(const std::string name);
68
71
74
76 void RemoveParameter(int index) VTK_EXPECTS(0 <= index && index < GetNumberOfParameters());
77
79 int SetParameter(const std::string& name, const std::string& value, const std::string& description = "");
80
83
85 void CopyParameter(vtkSegmentationConversionParameters* source, int sourceIndex);
86
87protected:
89 {
90 std::string Name;
91 std::string Description;
92 std::string Value;
93 };
94
95 std::vector<ConversionParameterType> ParameterList;
96
97protected:
100
101private:
103 void operator=(const vtkSegmentationConversionParameters&) = delete;
104};
105
106#endif
void DeepCopy(vtkSegmentationConversionParameters *source)
Replace parameters with content of another parameter list.
std::string GetDescription(const std::string &name)
int GetValueAsInt(const std::string &name)
std::vector< ConversionParameterType > ParameterList
int GetIndexFromName(const std::string name)
std::string GetDescription(int index) VTK_EXPECTS(0<
void PrintSelf(ostream &os, vtkIndent indent) override
int GetNumberOfParameters()
Return number of parameters.
void CopyParameter(vtkSegmentationConversionParameters *source, int sourceIndex)
Replace parameters with content of another parameter list.
std::string GetValue(const std::string &name)
void SetDescription(const std::string &name, const std::string &description)
std::string GetValue(int index) VTK_EXPECTS(0<
std::string GetName(int index) VTK_EXPECTS(0<
void SetName(int index, const std::string &name) VTK_EXPECTS(0<
int SetParameter(const std::string &name, const std::string &value, const std::string &description="")
Set a conversion parameter.
void SetValue(int index, const std::string &value) VTK_EXPECTS(0<
void RemoveAllParameters()
Delete all parameters.
void SetValue(const std::string &name, const std::string &value)
double GetValueAsDouble(const std::string &name)
void RemoveParameter(int index) VTK_EXPECTS(0<
Delete parameter.
static vtkSegmentationConversionParameters * New()
void SetDescription(int index, const std::string &description) VTK_EXPECTS(0<