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:
81
84 typedef Object Superclass;
86 typedef SmartPointer< const Self > ConstPointer;
87
89 itkNewMacro( Self );
90
92 itkTypeMacro( ParameterFileParser, Object );
93
95 typedef std::vector< std::string > ParameterValuesType;
96 typedef std::map<
97 std::string,
99
101 itkSetStringMacro( ParameterFileName );
102 itkGetStringMacro( ParameterFileName );
103
105 virtual const ParameterMapType & GetParameterMap( void ) const;
106
108 void ReadParameterFile( void );
109
113 std::string ReturnParameterFileAsString( void );
114
115protected:
116
119
120private:
121
122 ParameterFileParser( const Self & ); // purposely not implemented
123 void operator=( const Self & ); // purposely not implemented
124
131 void BasicFileChecking( void ) const;
132
138 bool CheckLine( const std::string & line, std::string & lineOut ) const;
139
141 void GetParameterFromLine( const std::string & fullLine,
142 const std::string & line );
143
145 void SplitLine( const std::string & fullLine, const std::string & line,
146 std::vector< std::string > & splittedLine ) const;
147
151 void ThrowException( const std::string & line, const std::string & hint ) const;
152
156
157};
158
159} // end of namespace itk
160
161#endif // end __itkParameterFileParser_h
Implements functionality to read a parameter file.
~ParameterFileParser() override
void SplitLine(const std::string &fullLine, const std::string &line, std::vector< std::string > &splittedLine) const
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
bool CheckLine(const std::string &line, std::string &lineOut) const
void operator=(const Self &)
virtual const ParameterMapType & GetParameterMap(void) const
void BasicFileChecking(void) const
std::vector< std::string > ParameterValuesType
std::string ReturnParameterFileAsString(void)
void ThrowException(const std::string &line, const std::string &hint) const
std::map< std::string, ParameterValuesType > ParameterMapType
void GetParameterFromLine(const std::string &fullLine, const std::string &line)
ParameterFileParser(const Self &)


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo