go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxBSplineTransformWithDiffusion.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 #ifndef __elxBSplineTransformWithDiffusion_H__
15 #define __elxBSplineTransformWithDiffusion_H__
16 
17 /* For easy changing the BSplineOrder: */
18 #define __VSplineOrder 3
19 
20 #include "elxIncludes.h" // include first to avoid MSVS warning
23 //#include "itkBSplineCombinationTransform.h"
24 #include "itkBSplineResampleImageFilterBase.h"
25 #include "itkBSplineUpsampleImageFilter.h"
26 
27 #include "itkImageRegionConstIterator.h"
28 
32 #include "itkImageFileReader.h"
33 #include "itkImageFileWriter.h"
34 #include "itkResampleImageFilter.h"
35 #include "itkCastImageFilter.h"
36 #include "itkMaximumImageFilter.h"
37 #include "itkImageRegionIterator.h"
38 #include "itkBSplineInterpolateImageFunction.h"
39 
40 namespace elastix
41 {
42 
154 template< class TElastix >
156  public
158  itk::AdvancedCombinationTransform<
159  //BSplineCombinationTransform<
160  typename elx::TransformBase< TElastix >::CoordRepType,
161  elx::TransformBase< TElastix >::FixedImageDimension > >,
162  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >,
163  public
164  TransformBase< TElastix >
165 {
166 public:
167 
172  //BSplineCombinationTransform<
175  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >
178 
186 
187  typedef itk::SmartPointer< Self > Pointer;
188  typedef itk::SmartPointer< const Self > ConstPointer;
189 
191  itkNewMacro( Self );
192 
195 
200  elxClassNameMacro( "BSplineTransformWithDiffusion" );
201 
203  itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
204 
206  itkStaticConstMacro( SplineOrder, unsigned int, __VSplineOrder );
207 
220 
234 
247 
251  typedef typename VectorImageType::Pointer VectorImagePointer;
252 
254  typedef typename ElastixType::FixedImageType FixedImageELXType;
255  typedef typename ElastixType::MovingImageType MovingImageELXType;
256 
258  typedef itk::Image< short,
259  itkGetStaticConstMacro( SpaceDimension ) > DummyImageType;
260  typedef itk::ImageRegionConstIterator<
264 
266  typedef itk::ImageFileReader< VectorImageType > VectorReaderType;
267  typedef typename VectorImageType::PixelType VectorType;
268  typedef itk::ImageRegionIterator<
271  typedef typename GrayValueImageType::Pointer GrayValueImagePointer;
272  typedef typename GrayValueImageType::PixelType GrayValuePixelType;
273  typedef itk::ImageRegionIterator<
275  typedef itk::MaximumImageFilter<
281  typedef typename VectorImageType::SizeType RadiusType;
282  typedef itk::ResampleImageFilter<
285  typedef typename ResamplerType1::Pointer ResamplerPointer1;
286  typedef itk::ResampleImageFilter<
289  typedef typename ResamplerType2::Pointer ResamplerPointer2;
290  typedef itk::BSplineInterpolateImageFunction<
292  typedef typename InterpolatorType::Pointer InterpolatorPointer;
293  typedef itk::ImageFileReader< GrayValueImageType > GrayValueImageReaderType;
294  typedef typename GrayValueImageReaderType::Pointer GrayValueImageReaderPointer;
295  typedef itk::ImageFileWriter< GrayValueImageType > GrayValueImageWriterType;
296  typedef itk::ImageFileWriter< VectorImageType > DeformationFieldWriterType;
297 
303  virtual void BeforeRegistration( void );
304 
308  virtual void BeforeEachResolution( void );
309 
313  virtual void AfterEachIteration( void );
314 
318  virtual void AfterRegistration( void );
319 
321  virtual void SetInitialGrid( bool upsampleGridOption );
322 
324  virtual void IncreaseScale( void );
325 
327  virtual void ReadFromFile( void );
328 
330  virtual void WriteToFile( const ParametersType & param ) const;
331 
333  void DiffuseDeformationField( void );
334 
345  virtual OutputPointType TransformPoint( const InputPointType & point ) const;
346 
358 protected:
359 
364 
367 
368 private:
369 
371  BSplineTransformWithDiffusion( const Self & ); // purposely not implemented
373  void operator=( const Self & ); // purposely not implemented
374 
393 
401 
404 
409 
410 };
411 
412 } // end namespace elastix
413 
414 #ifndef ITK_MANUAL_INSTANTIATION
415 #include "elxBSplineTransformWithDiffusion.hxx"
416 #endif
417 
418 #endif // end #ifndef __elxBSplineTransformWithDiffusion_H__
This class combines two transforms: an 'initial transform' with a 'current transform'.
itk::ImageRegionIterator< GrayValueImageType > GrayValueImageIteratorType
itk::DeformationFieldRegulizer< itk::AdvancedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension > > Superclass1
itk::Image< short, itkGetStaticConstMacro(SpaceDimension) > DummyImageType
Superclass::RegistrationPointer RegistrationPointer
Superclass1::IntermediaryDFTransformType IntermediaryDFTransformType
Deformable transform using a B-spline representation.
An itk transform based on a DeformationVectorField.
Superclass::OutputVectorType OutputVectorType
itk::ImageFileWriter< VectorImageType > DeformationFieldWriterType
itk::BSplineInterpolateImageFunction< GrayValueImageType > InterpolatorType
Superclass::OutputPointType OutputPointType
virtual OutputPointType TransformPoint(const InputPointType &point) const
itk::ImageRegionConstIterator< DummyImageType > DummyIteratorType
itk::AdvancedBSplineDeformableTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, __VSplineOrder > BSplineTransformType
itk::MaximumImageFilter< GrayValueImageType, GrayValueImageType, GrayValueImageType > MaximumImageFilterType
itk::ImageRegionIterator< VectorImageType > VectorImageIteratorType
GrayValueImageReaderType::Pointer GrayValueImageReaderPointer
Returns the weights over the support region used for B-spline interpolation/reconstruction.
itk::ResampleImageFilter< GrayValueImageType, GrayValueImageType, CoordRepType > ResamplerType2
Superclass::InputVnlVectorType InputVnlVectorType
BSplineTransformType::ContinuousIndexType ContinuousIndexType
ElastixType::FixedImageType FixedImageType
itk::VectorMeanDiffusionImageFilter< VectorImageType, GrayValueImageType > DiffusionFilterType
virtual void WriteToFile(void) const
Superclass::ParametersType ParametersType
Superclass::ElastixType ElastixType
Transform maps points, vectors and covariant vectors from an input space to an output space...
#define __VSplineOrder
itk::ImageFileReader< VectorImageType > VectorReaderType
WeightsFunctionType::ContinuousIndexType ContinuousIndexType
BSplineTransformType::WeightsFunctionType WeightsFunctionType
itkStaticConstMacro(SpaceDimension, unsigned int, Superclass2::FixedImageDimension)
Superclass::OutputCovariantVectorType OutputCovariantVectorType
virtual void SetInitialGrid(bool upsampleGridOption)
Superclass2::CombinationTransformType CombinationTransformType
ElastixType::MovingImageType MovingImageType
Superclass1::InputCovariantVectorType InputCovariantVectorType
Superclass::ElastixPointer ElastixPointer
Superclass::OutputVnlVectorType OutputVnlVectorType
Applies an averaging filter to an image.
ElastixType::CoordRepType CoordRepType
Superclass::RegistrationType RegistrationType
elxClassNameMacro("BSplineTransformWithDiffusion")
Superclass1::OutputCovariantVectorType OutputCovariantVectorType
This class is the elastix base class for all Transforms.
Superclass::ConfigurationType ConfigurationType
Superclass::ConfigurationPointer ConfigurationPointer
Superclass::InputPointType InputPointType
Superclass2::ConfigurationPointer ConfigurationPointer
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::InputVectorType InputVectorType
itk::ImageFileReader< GrayValueImageType > GrayValueImageReaderType
This class combines a B-spline transform with the diffusion/filtering of the deformation field...
itk::ResampleImageFilter< MovingImageELXType, GrayValueImageType, CoordRepType > ResamplerType1
itk::ImageFileWriter< GrayValueImageType > GrayValueImageWriterType
BSplineTransformType::ParameterIndexArrayType ParameterIndexArrayType
IntermediaryDFTransformType::CoefficientVectorImageType VectorImageType
This class combines any itk transform with the DeformationFieldTransform.


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo