ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkCompositeTransformIOHelper.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 itkCompositeTransformIOHelper_h
19 #define itkCompositeTransformIOHelper_h
20 
21 #include "ITKIOTransformBaseExport.h"
22 
23 #include "itkTransformIOBase.h"
24 #include "itkCompositeTransform.h"
25 
26 namespace itk
27 {
28 
47 template<typename TParametersValueType>
48 class ITK_TEMPLATE_EXPORT CompositeTransformIOHelperTemplate
49 {
50 public:
56 
65  ConstTransformListType &GetTransformList(const TransformType *transform);
66 
72  void SetTransformList(TransformType *transform,TransformListType &transformList);
73 
74 private:
76 
81  template <unsigned int VDimension>
82  int BuildTransformList(const TransformType *transform);
83 
89  template <unsigned int VDimension>
90  int InternalSetTransformList(TransformType *transform,TransformListType &transformList);
91 };
92 
95 
96 } // namespace itk
97 
98 // Note: Explicit instantiation is done in itkCompositeTransformIOHelper.cxx
99 
100 #endif // itkCompositeTransformIOHelper_h
101 
103 #ifndef ITK_TEMPLATE_EXPLICIT_CompositeTransformIOHelper
104 // Explicit instantiation is required to ensure correct dynamic_cast
105 // behavior across shared libraries.
106 //
107 // IMPORTANT: Since within the same compilation unit,
108 // ITK_TEMPLATE_EXPLICIT_<classname> defined and undefined states
109 // need to be considered. This code *MUST* be *OUTSIDE* the header
110 // guards.
111 //
112 # if defined( ITKIOTransformBase_EXPORTS )
113 // We are building this library
114 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
115 # else
116 // We are using this library
117 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
118 # endif
119 namespace itk
120 {
121 
122 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
123  ITK_GCC_PRAGMA_DIAG_PUSH()
124 #endif
125 ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes")
126 
129 
130 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
131  ITK_GCC_PRAGMA_DIAG_POP()
132 #else
133  ITK_GCC_PRAGMA_DIAG(warning "-Wattributes")
134 #endif
135 
136 } // end namespace itk
137 # undef ITKIOTransformBase_EXPORT_EXPLICIT
138 #endif
CompositeTransformIOHelperTemplate< double > CompositeTransformIOHelper
template class ITKIOTransformBase_EXPORT_EXPLICIT CompositeTransformIOHelperTemplate< double >
TransformIOBaseTemplate< TParametersValueType >::TransformPointer TransformPointer
TransformIOBaseTemplate< TParametersValueType >::ConstTransformListType ConstTransformListType
An adapter that adapts CompositeTransform into the TransformReader/Writer.
template class ITKIOTransformBase_EXPORT_EXPLICIT CompositeTransformIOHelperTemplate< float >
TransformIOBaseTemplate< TParametersValueType >::TransformType TransformType
std::list< TransformPointer > TransformListType
TransformIOBaseTemplate< TParametersValueType >::ConstTransformPointer ConstTransformPointer
#define ITKIOTransformBase_EXPORT_EXPLICIT
std::list< ConstTransformPointer > ConstTransformListType
TransformIOBaseTemplate< TParametersValueType >::TransformListType TransformListType