ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTransformFileReader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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_ASSIGN(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 Update();
72 
73 #if !defined ( ITK_LEGACY_REMOVE )
74 
77  TransformListType * GetTransformList() { return &m_TransformList; }
78 #else
79  const TransformListType * GetTransformList() { return &m_TransformList; }
80 #endif
81  TransformListType * GetModifiableTransformList() { return &m_TransformList; }
83 
85  itkSetObjectMacro( TransformIO, TransformIOType );
86  itkGetConstObjectMacro( TransformIO, TransformIOType );
88 
89 protected:
90  void PrintSelf(std::ostream & os, Indent indent) const override;
91 
93  ~TransformFileReaderTemplate() override;
94 
97  std::string m_FileName;
98 };
99 
102 
103 } // namespace itk
104 
105 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
106 #include "itkTransformIOFactoryRegisterManager.h"
107 #endif
108 
109 // Note: Explicit instantiation is done in itkTransformFileReader.cxx
110 
111 #endif // itkTransformFileReade_h
112 
114 #ifndef ITK_TEMPLATE_EXPLICIT_TransformFileReader
115 // Explicit instantiation is required to ensure correct dynamic_cast
116 // behavior across shared libraries.
117 //
118 // IMPORTANT: Since within the same compilation unit,
119 // ITK_TEMPLATE_EXPLICIT_<classname> defined and undefined states
120 // need to be considered. This code *MUST* be *OUTSIDE* the header
121 // guards.
122 //
123 # if defined( ITKIOTransformBase_EXPORTS )
124 // We are building this library
125 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
126 # else
127 // We are using this library
128 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
129 # endif
130 namespace itk
131 {
132 
133 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
134  ITK_GCC_PRAGMA_DIAG_PUSH()
135 #endif
136 ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes")
137 
140 
141 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
142  ITK_GCC_PRAGMA_DIAG_POP()
143 #else
144  ITK_GCC_PRAGMA_DIAG(warning "-Wattributes")
145 #endif
146 
147 } // end namespace itk
148 # undef ITKIOTransformBase_EXPORT_EXPLICIT
149 #endif
TransformListType * GetModifiableTransformList()
typename TransformIOType::TransformPointer TransformPointer
Light weight base class for most itk classes.
TransformIOType::Pointer m_TransformIO
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformFileReaderTemplate< double >
typename TransformType::ParametersType ParametersType
const TransformListType * GetTransformList()
typename TransformIOType::TransformListType TransformListType
Class to hold and manage different parameter types used during optimization.
typename TransformType::FixedParametersType FixedParametersType
typename TransformType::ParametersValueType ParametersValueType
typename TransformType::FixedParametersValueType FixedParametersValueType
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformFileReaderTemplate< float >
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
#define ITKIOTransformBase_EXPORT_EXPLICIT
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
TParametersValueType ParametersValueType