go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkCenteredTransformInitializer2.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 
20  Program: Insight Segmentation & Registration Toolkit
21  Module: $RCSfile: itkCenteredTransformInitializer2.h,v $
22  Language: C++
23  Date: $Date: 2010-07-04 10:30:49 $
24  Version: $Revision: 1.11 $
25 
26  Copyright (c) Insight Software Consortium. All rights reserved.
27  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28 
29  This software is distributed WITHOUT ANY WARRANTY; without even
30  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31  PURPOSE. See the above copyright notices for more information.
32 
33 =========================================================================*/
34 #ifndef __itkCenteredTransformInitializer2_h
35 #define __itkCenteredTransformInitializer2_h
36 
37 #include "itkObject.h"
38 #include "itkObjectFactory.h"
39 #include "itkSpatialObject.h"
41 
42 #include <iostream>
43 
44 namespace itk
45 {
46 
91 template< class TTransform, class TFixedImage, class TMovingImage >
92 class CenteredTransformInitializer2 : public Object
93 {
94 public:
95 
98  typedef Object Superclass;
99  typedef SmartPointer< Self > Pointer;
100  typedef SmartPointer< const Self > ConstPointer;
101 
103  itkNewMacro( Self );
104 
106  itkTypeMacro( CenteredTransformInitializer2, Object );
107 
109  typedef TTransform TransformType;
110  typedef typename TransformType::Pointer TransformPointer;
111 
113  itkStaticConstMacro( InputSpaceDimension, unsigned int,
114  TransformType::InputSpaceDimension );
115  itkStaticConstMacro( OutputSpaceDimension, unsigned int,
116  TransformType::OutputSpaceDimension );
117 
119  typedef TFixedImage FixedImageType;
120  typedef TMovingImage MovingImageType;
121 
122  typedef typename FixedImageType::ConstPointer FixedImagePointer;
123  typedef typename MovingImageType::ConstPointer MovingImagePointer;
124 
127  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskPointer;
128  typedef typename MovingImageMaskType::ConstPointer MovingImageMaskPointer;
129 
135 
136  typedef typename FixedImageCalculatorType::Pointer
138  typedef typename MovingImageCalculatorType::Pointer
140 
142  typedef typename TransformType::OffsetType OffsetType;
143 
145  typedef typename TransformType::InputPointType InputPointType;
146 
148  typedef typename TransformType::OutputVectorType OutputVectorType;
149 
150  typedef typename FixedImageType::PixelType InputPixelType;
151 
153  itkSetObjectMacro( Transform, TransformType );
154 
156  itkSetConstObjectMacro( FixedImage, FixedImageType );
157 
159  itkSetConstObjectMacro( MovingImage, MovingImageType );
160 
162  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
163  itkSetConstObjectMacro( MovingImageMask, MovingImageMaskType );
164 
166  itkSetMacro( NumberOfSamplesForCenteredTransformInitialization, SizeValueType );
167  itkSetMacro( LowerThresholdForCenterGravity, InputPixelType );
168  itkSetMacro( CenterOfGravityUsesLowerThreshold, bool );
169 
171  virtual void InitializeTransform();
172 
175  void GeometryOn() { m_UseMoments = false; m_UseOrigins = false; m_UseTop = false; }
176  void MomentsOn() { m_UseMoments = true; m_UseOrigins = false; m_UseTop = false; }
177  void OriginsOn() { m_UseMoments = false; m_UseOrigins = true; m_UseTop = false; }
178  void GeometryTopOn() { m_UseMoments = false; m_UseOrigins = false; m_UseTop = true; }
179 
181  itkGetConstObjectMacro( FixedCalculator, FixedImageCalculatorType );
182  itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
183 
184 protected:
185 
188 
189  void PrintSelf( std::ostream & os, Indent indent ) const override;
190 
192 
197 
198 private:
199 
200  CenteredTransformInitializer2( const Self & ); // purposely not implemented
201  void operator=( const Self & ); // purposely not implemented
202 
204 
209 
212  bool m_UseTop;
213 
216 
217 };
218 
219 } // namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkCenteredTransformInitializer2.hxx"
223 #endif
224 
225 #endif /* __itkCenteredTransformInitializer2_h */
Compute moments of an n-dimensional image.
CenteredTransformInitializer2 is a helper class intended to initialize the center of rotation and the...
itkGetModifiableObjectMacro(Transform, TransformType)
MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
FixedImageMaskType::ConstPointer FixedImageMaskPointer
MovingImageMaskType::ConstPointer MovingImageMaskPointer
AdvancedImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
Image< unsigned char, InputSpaceDimension > FixedImageMaskType
TransformType::OutputVectorType OutputVectorType
void PrintSelf(std::ostream &os, Indent indent) const override
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension)
AdvancedImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension)
Image< unsigned char, OutputSpaceDimension > MovingImageMaskType


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo