ITK  4.5.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.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 __itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod_h
19 #define __itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod_h
20 
22 
26 
27 namespace itk
28 {
29 //Forward-declare these because of module dependency conflict.
30 //They will soon be moved to a different module, at which
31 // time this can be removed.
32 template <unsigned int VDimension, typename TDataHolder>
33 class ImageToData;
34 template <typename TDataHolder>
35 class Array1DToData;
36 
93 template<typename TFixedImage, typename TMovingImage, typename TOutputTransform =
94  TimeVaryingBSplineVelocityFieldTransform<double, TFixedImage::ImageDimension> >
96 : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform>
97 {
98 public:
104 
106  itkNewMacro( Self );
107 
109  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
110 
112  itkTypeMacro( TimeVaryingBSplineVelocityFieldImageRegistrationMethod, SimpleImageRegistrationMethod );
113 
115  typedef TFixedImage FixedImageType;
116  typedef typename FixedImageType::Pointer FixedImagePointer;
117  typedef TMovingImage MovingImageType;
118  typedef typename MovingImageType::Pointer MovingImagePointer;
119 
122  typedef typename ImageMetricType::Pointer ImageMetricPointer;
123  typedef typename ImageMetricType::VirtualImageType VirtualImageType;
124  typedef typename ImageMetricType::MeasureType MeasureType;
126  typedef typename ImageMetricType::FixedImageMaskType FixedImageMaskType;
127  typedef typename ImageMetricType::MovingImageMaskType MovingImageMaskType;
130 
131  typedef TOutputTransform OutputTransformType;
132  typedef typename OutputTransformType::Pointer OutputTransformPointer;
133  typedef typename OutputTransformType::ScalarType RealType;
134  typedef typename OutputTransformType::DerivativeType DerivativeType;
135  typedef typename DerivativeType::ValueType DerivativeValueType;
136  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
137  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType;
138  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldControlPointLatticePointer;
139  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldType;
140  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldPointer;
141  typedef typename TimeVaryingVelocityFieldControlPointLatticeType::PixelType DisplacementVectorType;
142 
144 
146  typedef typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer;
147 
149 
156 
158  itkSetMacro( LearningRate, RealType );
159  itkGetConstMacro( LearningRate, RealType );
161 
163  itkSetMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
164  itkGetConstMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
166 
168  itkSetMacro( ConvergenceThreshold, RealType );
169  itkGetConstMacro( ConvergenceThreshold, RealType );
171 
173  itkSetMacro( ConvergenceWindowSize, unsigned int );
174  itkGetConstMacro( ConvergenceWindowSize, unsigned int );
176 
178  itkSetMacro( NumberOfTimePointSamples, SizeValueType );
179  itkGetConstMacro( NumberOfTimePointSamples, SizeValueType );
181 
182 protected:
185  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
186 
188  virtual void GenerateData();
189 
191  virtual void StartOptimization();
192 
193 private:
195  // implemented
196  void operator=( const Self & ); //purposely not
197 
199 
202 
204 
206 };
207 } // end namespace itk
208 
209 #ifndef ITK_MANUAL_INSTANTIATION
210 #include "itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx"
211 #endif
212 
213 #endif
Implementation of an image mask as spatial object.
Light weight base class for most itk classes.
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldControlPointLatticePointer
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ImageToImageMetricv4< FixedImageType, MovingImageType, VirtualImageType, RealType > ImageMetricType
Interface method for the current registration framework using the time varying velocity field transfo...
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldPointer
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
BSplineScatteredDataPointSetToImageFilter< PointSetType, TimeVaryingVelocityFieldType > BSplineFilterType
Image filter which provides a B-spline output approximation.
ObjectToObjectMultiMetricv4< ImageDimension, ImageDimension, VirtualImageType, RealType > MultiMetricType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent indent) const
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldType
Interface method for the current registration framework.
ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform > Superclass
Templated n-dimensional image class.
Definition: itkImage.h:75