ITK  5.2.0
Insight Toolkit
itkTransformFileReader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkTransformFileReader_h
19 #define itkTransformFileReader_h
20 
21 #include "ITKIOTransformBaseExport.h"
22 
23 #include "itkTransformIOBase.h"
24 
25 namespace itk
26 {
36 template <typename TParametersValueType>
37 class ITK_TEMPLATE_EXPORT TransformFileReaderTemplate : public LightProcessObject
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(TransformFileReaderTemplate);
41 
46 
51 
55 
57  itkNewMacro(Self);
58 
60  using Superclass = Object;
63 
65  itkSetStringMacro(FileName);
66 
68  itkGetStringMacro(FileName);
69 
71  virtual void
72  Update();
73 
74 #if !defined(ITK_LEGACY_REMOVE)
75 
79  GetTransformList()
80  {
81  return &m_TransformList;
82  }
83 #else
84  const TransformListType *
86  {
87  return &m_TransformList;
88  }
89 #endif
90  TransformListType *
92  {
93  return &m_TransformList;
94  }
96 
98  itkSetObjectMacro(TransformIO, TransformIOType);
99  itkGetConstObjectMacro(TransformIO, TransformIOType);
101 
102 protected:
103  void
104  PrintSelf(std::ostream & os, Indent indent) const override;
105 
107  ~TransformFileReaderTemplate() override;
108 
111  std::string m_FileName;
112 };
113 
116 
117 } // namespace itk
118 
119 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
120 # include "itkTransformIOFactoryRegisterManager.h"
121 #endif
122 
123 // Note: Explicit instantiation is done in itkTransformFileReader.cxx
124 
125 #endif // itkTransformFileReade_h
126 
128 #ifndef ITK_TEMPLATE_EXPLICIT_TransformFileReader
129 // Explicit instantiation is required to ensure correct dynamic_cast
130 // behavior across shared libraries.
131 //
132 // IMPORTANT: Since within the same compilation unit,
133 // ITK_TEMPLATE_EXPLICIT_<classname> defined and undefined states
134 // need to be considered. This code *MUST* be *OUTSIDE* the header
135 // guards.
136 //
137 #if defined(ITKIOTransformBase_EXPORTS)
138 // We are building this library
139 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
140 #else
141 // We are using this library
142 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
143 #endif
144 namespace itk
145 {
146 
147 ITK_GCC_PRAGMA_DIAG_PUSH()
148 ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes")
149 
152 
153 ITK_GCC_PRAGMA_DIAG_POP()
154 
155 } // end namespace itk
156 #undef ITKIOTransformBase_EXPORT_EXPLICIT
157 #endif
itk::TransformFileReaderTemplate::ParametersType
typename TransformType::ParametersType ParametersType
Definition: itkTransformFileReader.h:47
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::LightProcessObject
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Definition: itkLightProcessObject.h:72
itk::TransformFileReaderTemplate::m_TransformList
TransformListType m_TransformList
Definition: itkTransformFileReader.h:109
itk::TransformIOBaseTemplate< ParametersValueType >::TransformListType
std::list< TransformPointer > TransformListType
Definition: itkTransformIOBase.h:80
itk::TransformFileReaderTemplate::FixedParametersType
typename TransformType::FixedParametersType FixedParametersType
Definition: itkTransformFileReader.h:49
itkTransformIOBase.h
itk::TransformIOBaseTemplate< ParametersValueType >::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkTransformIOBase.h:79
itk::TransformFileReaderTemplate::GetTransformList
const TransformListType * GetTransformList()
Definition: itkTransformFileReader.h:85
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TransformFileReaderTemplate::ParametersValueType
typename TransformType::ParametersValueType ParametersValueType
Definition: itkTransformFileReader.h:48
itk::TransformFileReaderTemplate< float >
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformFileReaderTemplate< float >
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::TransformFileReaderTemplate::FixedParametersValueType
typename TransformType::FixedParametersValueType FixedParametersValueType
Definition: itkTransformFileReader.h:50
itk::TransformIOBaseTemplate< ParametersValueType >
itk::TransformFileReaderTemplate::m_FileName
std::string m_FileName
Definition: itkTransformFileReader.h:111
itk::TransformFileReaderTemplate::GetModifiableTransformList
TransformListType * GetModifiableTransformList()
Definition: itkTransformFileReader.h:91
itk::TransformFileReaderTemplate
TODO.
Definition: itkTransformFileReader.h:37
itk::TransformFileReaderTemplate< double >
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformFileReaderTemplate< double >
itk::TransformBaseTemplate::FixedParametersValueType
double FixedParametersValueType
Definition: itkTransformBase.h:83
itk::TransformFileReaderTemplate::m_TransformIO
TransformIOType::Pointer m_TransformIO
Definition: itkTransformFileReader.h:110
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
ITKIOTransformBase_EXPORT_EXPLICIT
#define ITKIOTransformBase_EXPORT_EXPLICIT
Definition: itkTransformFileReader.h:142
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::TransformBaseTemplate::ParametersValueType
TParametersValueType ParametersValueType
Definition: itkTransformBase.h:81
itk::TransformFileReaderTemplate::TransformPointer
typename TransformIOType::TransformPointer TransformPointer
Definition: itkTransformFileReader.h:53
itk::TransformFileReaderTemplate::TransformListType
typename TransformIOType::TransformListType TransformListType
Definition: itkTransformFileReader.h:54
itk::TransformBaseTemplate
Definition: itkTransformBase.h:68