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 
46 
158 template < class TElastix >
160  : public
162  itk::AdvancedCombinationTransform<
163  //BSplineCombinationTransform<
164  typename elx::TransformBase<TElastix>::CoordRepType,
165  elx::TransformBase<TElastix>::FixedImageDimension > >,
166  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >,
167  public
168  TransformBase<TElastix>
169 {
170 public:
171 
176  //BSplineCombinationTransform<
179  //elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >
182 
190 
191  typedef itk::SmartPointer<Self> Pointer;
192  typedef itk::SmartPointer<const Self> ConstPointer;
193 
195  itkNewMacro( Self );
196 
199 
204  elxClassNameMacro( "BSplineTransformWithDiffusion" );
205 
207  itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
208 
210  itkStaticConstMacro( SplineOrder, unsigned int, __VSplineOrder );
211 
224 
238 
251 
255 
257  typedef typename ElastixType::FixedImageType FixedImageELXType;
258  typedef typename ElastixType::MovingImageType MovingImageELXType;
259 
261  typedef itk::Image< short,
262  itkGetStaticConstMacro( SpaceDimension ) > DummyImageType;
263  typedef itk::ImageRegionConstIterator<
267 
269  typedef itk::ImageFileReader< VectorImageType > VectorReaderType;
270  typedef typename VectorImageType::PixelType VectorType;
271  typedef itk::ImageRegionIterator<
274  typedef typename GrayValueImageType::PixelType GrayValuePixelType;
275  typedef itk::ImageRegionIterator<
277  typedef itk::MaximumImageFilter<
282  typedef typename VectorImageType::SizeType RadiusType;
283  typedef itk::ResampleImageFilter<
286  typedef itk::ResampleImageFilter<
289  typedef itk::BSplineInterpolateImageFunction<
291  typedef itk::ImageFileReader< GrayValueImageType > GrayValueImageReaderType;
292  typedef itk::ImageFileWriter< GrayValueImageType > GrayValueImageWriterType;
293  typedef itk::ImageFileWriter< VectorImageType > DeformationFieldWriterType;
294 
300  virtual void BeforeRegistration( void );
301 
305  virtual void BeforeEachResolution( void );
306 
310  virtual void AfterEachIteration( void );
311 
315  virtual void AfterRegistration( void );
316 
318  virtual void SetInitialGrid( bool upsampleGridOption );
319 
321  virtual void IncreaseScale( void );
322 
324  virtual void ReadFromFile( void );
325 
327  virtual void WriteToFile( const ParametersType & param ) const;
328 
330  void DiffuseDeformationField( void );
331 
342  virtual OutputPointType TransformPoint( const InputPointType & point ) const;
343 
355 protected:
356 
361 
364 
365 private:
366 
368  BSplineTransformWithDiffusion( const Self& ); // purposely not implemented
370  void operator=( const Self& ); // purposely not implemented
371 
374  typename VectorImageType::Pointer m_DeformationField;
375  typename VectorImageType::Pointer m_DiffusedField;
376  typename GrayValueImageType::Pointer m_GrayValueImage1;
377  typename GrayValueImageType::Pointer m_GrayValueImage2;
378  typename GrayValueImageType::Pointer m_MovingSegmentationImage;
379  typename GrayValueImageType::Pointer m_FixedSegmentationImage;
380  typename GrayValueImageReaderType::Pointer m_MovingSegmentationReader;
381  typename GrayValueImageReaderType::Pointer m_FixedSegmentationReader;
384  typename ResamplerType1::Pointer m_Resampler1;
385  typename ResamplerType2::Pointer m_Resampler2;
386  typename InterpolatorType::Pointer m_Interpolator;
390 
398 
401 
406 
407 }; // end class BSplineTransformWithDiffusion
408 
409 
410 } // end namespace elastix
411 
412 #ifndef ITK_MANUAL_INSTANTIATION
413 #include "elxBSplineTransformWithDiffusion.hxx"
414 #endif
415 
416 #endif // end #ifndef __elxBSplineTransformWithDiffusion_H__
417 
This class combines two transforms: an &#39;initial transform&#39; with a &#39;current transform&#39;.
itk::ImageRegionIterator< GrayValueImageType > GrayValueImageIteratorType
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::DeformationFieldRegulizer< itk::AdvancedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension > > Superclass1
itk::AdvancedBSplineDeformableTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, __VSplineOrder > BSplineTransformType
itk::MaximumImageFilter< GrayValueImageType, GrayValueImageType, GrayValueImageType > MaximumImageFilterType
GrayValueImageReaderType::Pointer m_FixedSegmentationReader
itk::ImageRegionIterator< VectorImageType > VectorImageIteratorType
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
GrayValueImageReaderType::Pointer m_MovingSegmentationReader
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 04-01-2014 for elastix by doxygen 1.8.5 elastix logo