ITK  4.13.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 
45 
50 
54 
56  itkNewMacro(Self);
57 
59  typedef Object Superclass;
62 
64  itkSetStringMacro(FileName);
65 
67  itkGetStringMacro(FileName);
68 
70  virtual void Update();
71 
72 #if !defined( ITK_FUTURE_LEGACY_REMOVE )
73 
76  TransformListType * GetTransformList() { return &m_TransformList; }
77 #else
78 
80  const TransformListType * GetTransformList() { return &m_TransformList; }
81 #endif
82 
84  itkSetObjectMacro( TransformIO, TransformIOType );
85  itkGetConstObjectMacro( TransformIO, TransformIOType );
87 
88 protected:
89  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
90 
91  TransformFileReaderTemplate();
92  virtual ~TransformFileReaderTemplate() ITK_OVERRIDE;
93 
94  TransformListType m_TransformList;
95  typename TransformIOType::Pointer m_TransformIO;
96  std::string m_FileName;
97 
98 private:
99  ITK_DISALLOW_COPY_AND_ASSIGN(TransformFileReaderTemplate);
100 };
101 
103 typedef itk::TransformFileReaderTemplate<double> TransformFileReader;
104 
105 } // namespace itk
106 
107 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
108 #include "itkTransformIOFactoryRegisterManager.h"
109 #endif
110 
111 // Note: Explicit instantiation is done in itkTransformFileReader.cxx
112 
113 #endif // itkTransformFileReade_h
114 
116 #ifndef ITK_TEMPLATE_EXPLICIT_TransformFileReader
117 // Explicit instantiation is required to ensure correct dynamic_cast
118 // behavior across shared libraries.
119 //
120 // IMPORTANT: Since within the same compilation unit,
121 // ITK_TEMPLATE_EXPLICIT_<classname> defined and undefined states
122 // need to be considered. This code *MUST* be *OUTSIDE* the header
123 // guards.
124 //
125 # if defined( ITKIOTransformBase_EXPORTS )
126 // We are building this library
127 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
128 # else
129 // We are using this library
130 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
131 # endif
132 namespace itk
133 {
134 
135 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
136  ITK_GCC_PRAGMA_DIAG_PUSH()
137 #endif
138 ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes")
139 
142 
143 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
144  ITK_GCC_PRAGMA_DIAG_POP()
145 #else
146  ITK_GCC_PRAGMA_DIAG(warning "-Wattributes")
147 #endif
148 
149 } // end namespace itk
150 # undef ITKIOTransformBase_EXPORT_EXPLICIT
151 #endif
Light weight base class for most itk classes.
TransformFileReaderTemplate Self
TransformIOType::TransformListType TransformListType
TParametersValueType ParametersValueType
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformFileReaderTemplate< double >
TransformBaseTemplate< TParametersValueType > TransformType
TransformType::FixedParametersValueType FixedParametersValueType
Class to hold and manage different parameter types used during optimization.
TransformType::FixedParametersType FixedParametersType
TransformType::ParametersType ParametersType
TransformIOType::TransformPointer TransformPointer
TransformIOBaseTemplate< ParametersValueType > TransformIOType
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
TransformType::ParametersValueType ParametersValueType
Base class for most ITK classes.
Definition: itkObject.h:59