go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTranslationTransformInitializer.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
19#ifndef __itkTranslationTransformInitializer_h
20#define __itkTranslationTransformInitializer_h
21
22#include "itkObject.h"
23#include "itkObjectFactory.h"
24#include "itkImageMomentsCalculator.h"
25
26#include <iostream>
27
28namespace itk
29{
30
60template< class TTransform,
61class TFixedImage,
62class TMovingImage >
64{
65public:
66
69 typedef Object Superclass;
71 typedef SmartPointer< const Self > ConstPointer;
72
74 itkNewMacro( Self );
75
77 itkTypeMacro( TranslationTransformInitializer, Object );
78
80 typedef TTransform TransformType;
81 typedef typename TransformType::Pointer TransformPointer;
82
84 itkStaticConstMacro( SpaceDimension, unsigned int, TransformType::SpaceDimension );
85 itkStaticConstMacro( InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension );
86 itkStaticConstMacro( OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension );
87
89 typedef TFixedImage FixedImageType;
90 typedef TMovingImage MovingImageType;
91 typedef typename FixedImageType::ConstPointer FixedImagePointer;
92 typedef typename MovingImageType::ConstPointer MovingImagePointer;
95 typedef typename FixedMaskType::ConstPointer FixedMaskPointer;
96 typedef typename MovingMaskType::ConstPointer MovingMaskPointer;
97
99 typedef ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType;
100 typedef ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType;
101
102 typedef typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer;
103 typedef typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer;
104
106 typedef typename TransformType::InputPointType InputPointType;
107
109 typedef typename TransformType::OutputVectorType OutputVectorType;
110
112 itkSetObjectMacro( Transform, TransformType );
113
115 itkSetConstObjectMacro( FixedImage, FixedImageType );
116
118 itkSetConstObjectMacro( MovingImage, MovingImageType );
119
121 itkSetConstObjectMacro( FixedMask, FixedMaskType );
122
124 itkSetConstObjectMacro( MovingMask, MovingMaskType );
125
127 virtual void InitializeTransform() const;
128
131 void GeometryOn() { m_UseMoments = false; }
132 void MomentsOn() { m_UseMoments = true; }
133
135 itkGetConstObjectMacro( FixedCalculator, FixedImageCalculatorType );
136 itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
137
138protected:
139
142
143 void PrintSelf( std::ostream & os, Indent indent ) const override;
144
145private:
146
147 TranslationTransformInitializer( const Self & ); // purposely not implemented
148 void operator=( const Self & ); // purposely not implemented
149
156
159
160};
161
162} // namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165#include "itkTranslationTransformInitializer.hxx"
166#endif
167
168#endif /* __itkTranslationTransformInitializer_h */
TranslationTransformInitializer is a helper class intended to initialize the translation of a Transla...
ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
void PrintSelf(std::ostream &os, Indent indent) const override
ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
virtual void InitializeTransform() const
itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension)
Image< unsigned char, InputSpaceDimension > FixedMaskType
MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
Image< unsigned char, OutputSpaceDimension > MovingMaskType
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension)
itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension)
FixedImageCalculatorType::Pointer FixedImageCalculatorPointer


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo