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 
15 #ifndef __elxBSplineTransformWithDiffusion_H__
16 #define __elxBSplineTransformWithDiffusion_H__
17 
18 /* For easy changing the BSplineOrder: */
19 #define __VSplineOrder 3
20 
23 //#include "itkBSplineCombinationTransform.h"
24 #include "itkBSplineResampleImageFilterBase.h"
25 #include "itkBSplineUpsampleImageFilter.h"
26 
27 #include "itkImageRegionConstIterator.h"
28 
29 #include "elxIncludes.h"
30 
34 #include "itkImageFileReader.h"
35 #include "itkImageFileWriter.h"
36 #include "itkResampleImageFilter.h"
37 #include "itkCastImageFilter.h"
38 #include "itkMaximumImageFilter.h"
39 #include "itkImageRegionIterator.h"
40 #include "itkBSplineInterpolateImageFunction.h"
41 
42 
43 namespace elastix
44 {
45 using namespace itk;
46 
47 
159 template < class TElastix >
161  : public
163  AdvancedCombinationTransform<
164  //BSplineCombinationTransform<
165  ITK_TYPENAME elx::TransformBase<TElastix>::CoordRepType,
166  elx::TransformBase<TElastix>::FixedImageDimension > >,
167  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >,
168  public
169  TransformBase<TElastix>
170 {
171 public:
172 
177  //BSplineCombinationTransform<
180  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >
183 
191 
192  typedef SmartPointer<Self> Pointer;
193  typedef SmartPointer<const Self> ConstPointer;
194 
196  itkNewMacro( Self );
197 
200 
205  elxClassNameMacro( "BSplineTransformWithDiffusion" );
206 
208  itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
209 
211  itkStaticConstMacro( SplineOrder, unsigned int, __VSplineOrder );
212 
225 
239 
252 
256 
258  typedef typename ElastixType::FixedImageType FixedImageELXType;
259  typedef typename ElastixType::MovingImageType MovingImageELXType;
260 
262  typedef Image< short,
263  itkGetStaticConstMacro( SpaceDimension ) > DummyImageType;
264  typedef ImageRegionConstIterator<
268 
270  typedef ImageFileReader< VectorImageType > VectorReaderType;
271  typedef typename VectorImageType::PixelType VectorType;
272  typedef ImageRegionIterator<
275  typedef typename GrayValueImageType::PixelType GrayValuePixelType;
276  typedef ImageRegionIterator<
278  typedef MaximumImageFilter<
283  typedef typename VectorImageType::SizeType RadiusType;
284  typedef ResampleImageFilter<
287  typedef ResampleImageFilter<
292  typedef ImageFileReader< GrayValueImageType > GrayValueImageReaderType;
295 
301  virtual void BeforeRegistration( void );
302 
306  virtual void BeforeEachResolution( void );
307 
311  virtual void AfterEachIteration( void );
312 
316  virtual void AfterRegistration( void );
317 
319  virtual void SetInitialGrid( bool upsampleGridOption );
320 
322  virtual void IncreaseScale( void );
323 
325  virtual void ReadFromFile( void );
326 
328  virtual void WriteToFile( const ParametersType & param ) const;
329 
331  void DiffuseDeformationField( void );
332 
343  virtual OutputPointType TransformPoint( const InputPointType & point ) const;
344 
356 protected:
357 
362 
364  SpacingType m_GridSpacingFactor;
365 
366 private:
367 
369  BSplineTransformWithDiffusion( const Self& ); // purposely not implemented
371  void operator=( const Self& ); // purposely not implemented
372 
375  typename VectorImageType::Pointer m_DeformationField;
376  typename VectorImageType::Pointer m_DiffusedField;
377  typename GrayValueImageType::Pointer m_GrayValueImage1;
378  typename GrayValueImageType::Pointer m_GrayValueImage2;
379  typename GrayValueImageType::Pointer m_MovingSegmentationImage;
380  typename GrayValueImageType::Pointer m_FixedSegmentationImage;
381  typename GrayValueImageReaderType::Pointer m_MovingSegmentationReader;
382  typename GrayValueImageReaderType::Pointer m_FixedSegmentationReader;
385  typename ResamplerType1::Pointer m_Resampler1;
386  typename ResamplerType2::Pointer m_Resampler2;
387  typename InterpolatorType::Pointer m_Interpolator;
391 
399 
402 
407 
408 }; // end class BSplineTransformWithDiffusion
409 
410 
411 } // end namespace elastix
412 
413 #ifndef ITK_MANUAL_INSTANTIATION
414 #include "elxBSplineTransformWithDiffusion.hxx"
415 #endif
416 
417 #endif // end #ifndef __elxBSplineTransformWithDiffusion_H__
418 
This class combines two transforms: an &#39;initial transform&#39; with a &#39;current transform&#39;.
VectorMeanDiffusionImageFilter< VectorImageType, GrayValueImageType > DiffusionFilterType
Image< short, itkGetStaticConstMacro(SpaceDimension) > DummyImageType
Superclass::RegistrationPointer RegistrationPointer
Superclass1::IntermediaryDFTransformType IntermediaryDFTransformType
Deformable transform using a B-spline representation.
#define elxClassNameMacro(_name)
Definition: elxMacro.h:254
An itk transform based on a DeformationVectorField.
Superclass::OutputVectorType OutputVectorType
BSplineInterpolateImageFunction< GrayValueImageType > InterpolatorType
Superclass::OutputPointType OutputPointType
ImageFileWriter< VectorImageType > DeformationFieldWriterType
MaximumImageFilter< GrayValueImageType, GrayValueImageType, GrayValueImageType > MaximumImageFilterType
GrayValueImageReaderType::Pointer m_FixedSegmentationReader
ImageFileReader< GrayValueImageType > GrayValueImageReaderType
ResampleImageFilter< GrayValueImageType, GrayValueImageType, CoordRepType > ResamplerType2
ImageFileReader< VectorImageType > VectorReaderType
AdvancedBSplineDeformableTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, __VSplineOrder > BSplineTransformType
DeformationFieldRegulizer< AdvancedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension > > Superclass1
Returns the weights over the support region used for B-spline interpolation/reconstruction.
ResampleImageFilter< MovingImageELXType, GrayValueImageType, CoordRepType > ResamplerType1
Superclass::InputVnlVectorType InputVnlVectorType
BSplineTransformType::ContinuousIndexType ContinuousIndexType
ImageRegionIterator< VectorImageType > VectorImageIteratorType
ElastixType::FixedImageType FixedImageType
Superclass::ParametersType ParametersType
Superclass::ElastixType ElastixType
Transform maps points, vectors and covariant vectors from an input space to an output space...
#define __VSplineOrder
WeightsFunctionType::ContinuousIndexType ContinuousIndexType
BSplineTransformType::WeightsFunctionType WeightsFunctionType
ImageRegionIterator< GrayValueImageType > GrayValueImageIteratorType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
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
ImageFileWriter< GrayValueImageType > GrayValueImageWriterType
ImageRegionConstIterator< DummyImageType > DummyIteratorType
Superclass1::OutputCovariantVectorType OutputCovariantVectorType
This class is the elastix base class for all Transforms.
Superclass::ConfigurationType ConfigurationType
Superclass::ConfigurationPointer ConfigurationPointer
Superclass::InputPointType InputPointType
GrayValueImageReaderType::Pointer m_MovingSegmentationReader
Superclass2::ConfigurationPointer ConfigurationPointer
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::InputVectorType InputVectorType
This class combines a B-spline transform with the diffusion/filtering of the deformation field...
BSplineTransformType::ParameterIndexArrayType ParameterIndexArrayType
IntermediaryDFTransformType::CoefficientVectorImageType VectorImageType
This class combines any itk transform with the DeformationFieldTransform.


Generated on 06-12-2013 for elastix by doxygen 1.8.5 elastix logo