go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkParameterFileParser.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkParameterFileParser_h
19#define itkParameterFileParser_h
20
21#include "itkObject.h"
22#include "itkObjectFactory.h"
23#include "itkMacro.h"
24
25#include <map>
26#include <string>
27#include <vector>
28
29namespace itk
30{
31
78class ParameterFileParser : public Object
79{
80public:
82
85 using Superclass = Object;
86 using Pointer = SmartPointer<Self>;
87 using ConstPointer = SmartPointer<const Self>;
88
90 itkNewMacro(Self);
91
93 itkTypeMacro(ParameterFileParser, Object);
94
96 using ParameterValuesType = std::vector<std::string>;
97 using ParameterMapType = std::map<std::string, ParameterValuesType>;
98
100 itkSetStringMacro(ParameterFileName);
101 itkGetStringMacro(ParameterFileName);
102
104 const ParameterMapType &
106
108 void
110
114 std::string
116
118 static ParameterMapType
119 ReadParameterMap(const std::string & fileName);
120
123 static ParameterMapType
124 ConvertToParameterMap(const std::string & text);
125
126protected:
129
130private:
132 std::string m_ParameterFileName{};
134};
135
136} // end of namespace itk
137
138#endif // end itkParameterFileParser_h
Implements functionality to read a parameter file.
~ParameterFileParser() override
std::map< std::string, ParameterValuesType > ParameterMapType
std::vector< std::string > ParameterValuesType
std::string ReturnParameterFileAsString()
const ParameterMapType & GetParameterMap() const
ITK_DISALLOW_COPY_AND_MOVE(ParameterFileParser)
SmartPointer< const Self > ConstPointer
static ParameterMapType ReadParameterMap(const std::string &fileName)
static ParameterMapType ConvertToParameterMap(const std::string &text)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo