ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTwoProjectionImageRegistrationMethod.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 itkTwoProjectionImageRegistrationMethod_h
19 #define itkTwoProjectionImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
29 
64 template <typename TFixedImage, typename TMovingImage>
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_ASSIGN(TwoProjectionImageRegistrationMethod);
69 
75 
77  itkNewMacro(Self);
78 
81 
83  using FixedImageType = TFixedImage;
84  using FixedImageConstPointer = typename FixedImageType::ConstPointer;
85 
87  using MovingImageType = TMovingImage;
88  using MovingImageConstPointer = typename MovingImageType::ConstPointer;
89 
95 
98  using TransformPointer = typename TransformType::Pointer;
99 
105 
108  using InterpolatorPointer = typename InterpolatorType::Pointer;
109 
112 
116 
119 
124  void StartRegistration(void);
125 
127  void StartOptimization(void);
128 
130  void SetFixedImage1( const FixedImageType * fixedImage1 );
131  void SetFixedImage2( const FixedImageType * fixedImage2 );
132  itkGetConstObjectMacro( FixedImage1, FixedImageType );
133  itkGetConstObjectMacro( FixedImage2, FixedImageType );
135 
137  void SetMovingImage( const MovingImageType * movingImage );
138  itkGetConstObjectMacro( MovingImage, MovingImageType );
140 
142  itkSetObjectMacro( Optimizer, OptimizerType );
143  itkGetConstObjectMacro( Optimizer, OptimizerType );
145 
147  itkSetObjectMacro( Metric, MetricType );
148  itkGetConstObjectMacro( Metric, MetricType );
150 
152  itkSetObjectMacro( Transform, TransformType );
153  itkGetConstObjectMacro( Transform, TransformType );
155 
157  itkSetObjectMacro( Interpolator1, InterpolatorType );
158  itkSetObjectMacro( Interpolator2, InterpolatorType );
159  itkGetConstObjectMacro( Interpolator1, InterpolatorType );
160  itkGetConstObjectMacro( Interpolator2, InterpolatorType );
162 
164  virtual void SetInitialTransformParameters( const ParametersType & param );
165  itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
167 
170  itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
171 
179  void SetFixedImageRegion1( const FixedImageRegionType & region1 );
180  void SetFixedImageRegion2( const FixedImageRegionType & region2 );
181 
186  itkGetConstReferenceMacro( FixedImageRegion1, FixedImageRegionType );
187  itkGetConstReferenceMacro( FixedImageRegion2, FixedImageRegionType );
188 
191  itkGetMacro( FixedImageRegionDefined1, bool );
192  itkGetMacro( FixedImageRegionDefined2, bool );
193 
198  itkSetMacro( FixedImageRegionDefined1, bool );
199  itkSetMacro( FixedImageRegionDefined2, bool );
201 
203  virtual void Initialize();
204 
206  const TransformOutputType * GetOutput() const;
207 
212 
215  unsigned long GetMTime() const override;
216 
217 protected:
220  void PrintSelf(std::ostream& os, Indent indent) const override;
221 
224  void GenerateData() override;
225 
227  itkSetMacro( LastTransformParameters, ParametersType );
228 
229 
230 private:
233 
237 
241 
244 
249 
250 };
251 
252 } // end namespace itk
253 
254 
255 #ifndef ITK_MANUAL_INSTANTIATION
256 #include "itkTwoProjectionImageRegistrationMethod.hxx"
257 #endif
258 
259 #endif
typename MetricType::FixedImageRegionType FixedImageRegionType
Light weight base class for most itk classes.
typename MetricType::TransformParametersType ParametersType
void SetMovingImage(const MovingImageType *movingImage)
void SetFixedImage1(const FixedImageType *fixedImage1)
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
void SetFixedImageRegion2(const FixedImageRegionType &region2)
Computes similarity between two fixed images and one fixed image.
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
void SetFixedImage2(const FixedImageType *fixedImage2)
This class is a base for the Optimization methods that optimize a single valued function.
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > InterpolatorType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename MovingImageType::ConstPointer MovingImageConstPointer
Transform< CoordinateRepresentationType, itkGetStaticConstMacro(MovingImageDimension), itkGetStaticConstMacro(FixedImageDimension)> TransformType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
SmartPointer< Self > Pointer
void SetFixedImageRegion1(const FixedImageRegionType &region1)
Decorates any subclass of itkObject with a DataObject API.
const TransformOutputType * GetOutput() const
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
SmartPointer< const Self > ConstPointer
typename TransformType::ParametersType TransformParametersType
typename TransformOutputType::ConstPointer TransformOutputConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename FixedImageType::RegionType FixedImageRegionType
unsigned long GetMTime() const override
virtual void SetInitialTransformParameters(const ParametersType &param)
SmartPointer< Self > Pointer