Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkWarpVectorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkWarpVectorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/04/18 12:48:23 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkWarpVectorImageFilter_h
00018 #define __itkWarpVectorImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkVectorInterpolateImageFunction.h"
00022 #include "itkVectorLinearInterpolateImageFunction.h"
00023 #include "itkPoint.h"
00024 #include "itkFixedArray.h"
00025 
00026 namespace itk
00027 {
00028 
00082 template <
00083   class TInputImage,
00084   class TOutputImage,
00085   class TDeformationField
00086   >
00087 class ITK_EXPORT WarpVectorImageFilter :
00088     public ImageToImageFilter<TInputImage, TOutputImage>
00089 {
00090 public:
00092   typedef WarpVectorImageFilter      Self;
00093   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00094   typedef SmartPointer<Self>         Pointer;
00095   typedef SmartPointer<const Self>   ConstPointer;
00096 
00098   itkNewMacro(Self);
00099 
00101   itkTypeMacro( WarpVectorImageFilter, ImageToImageFilter );
00102 
00104   typedef typename TOutputImage::RegionType OutputImageRegionType;
00105 
00107   typedef typename Superclass::InputImageType        InputImageType;
00108   typedef typename Superclass::InputImagePointer     InputImagePointer;
00109   typedef typename Superclass::OutputImageType       OutputImageType;
00110   typedef typename Superclass::OutputImagePointer    OutputImagePointer;
00111   typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00112   typedef typename OutputImageType::IndexType        IndexType;
00113   typedef typename OutputImageType::SizeType         SizeType;
00114   typedef typename OutputImageType::PixelType        PixelType;
00115   typedef typename OutputImageType::SpacingType      SpacingType;
00116   typedef typename OutputImageType::PixelType::ValueType        ValueType;
00117 
00119   itkStaticConstMacro(ImageDimension, unsigned int,
00120                       TOutputImage::ImageDimension );
00121 
00123   typedef TDeformationField    DeformationFieldType;
00124   typedef typename DeformationFieldType::Pointer  DeformationFieldPointer;
00125   typedef typename DeformationFieldType::PixelType DisplacementType;
00126 
00128   typedef double CoordRepType;
00129   typedef VectorInterpolateImageFunction<InputImageType,CoordRepType>   InterpolatorType;
00130   typedef typename InterpolatorType::Pointer   InterpolatorPointer;
00131   typedef VectorLinearInterpolateImageFunction<InputImageType,CoordRepType>
00132   DefaultInterpolatorType;
00133 
00135   typedef Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType;
00136 
00138   void SetDeformationField( DeformationFieldType * field );
00139 
00141   DeformationFieldType * GetDeformationField(void);
00142 
00144   itkSetObjectMacro( Interpolator, InterpolatorType );
00145 
00147   itkGetObjectMacro( Interpolator, InterpolatorType );
00148 
00150   itkSetMacro(OutputSpacing, SpacingType);
00151   virtual void SetOutputSpacing( const double values[ImageDimension] );
00152 
00154   itkGetConstReferenceMacro(OutputSpacing, SpacingType);
00155 
00157   itkSetMacro(OutputOrigin, PointType);
00158   virtual void SetOutputOrigin( const double values[ImageDimension] );
00159 
00161   itkGetConstReferenceMacro(OutputOrigin, PointType);
00162 
00164   itkSetMacro( EdgePaddingValue, PixelType );
00165 
00167   itkGetMacro( EdgePaddingValue, PixelType );
00168 
00174   virtual void GenerateOutputInformation();
00175 
00182   virtual void GenerateInputRequestedRegion();
00183 
00186   virtual void BeforeThreadedGenerateData();
00187 
00188 protected:
00189   WarpVectorImageFilter();
00190   ~WarpVectorImageFilter() {};
00191   void PrintSelf(std::ostream& os, Indent indent) const;
00192 
00196   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00197                             int threadId );
00198 
00199 private:
00200   WarpVectorImageFilter(const Self&); //purposely not implemented
00201   void operator=(const Self&); //purposely not implemented
00202 
00203   PixelType                  m_EdgePaddingValue;
00204   SpacingType                m_OutputSpacing;
00205   PointType                  m_OutputOrigin;
00206 
00207   InterpolatorPointer        m_Interpolator;
00208   
00209 };
00210 
00211 } // end namespace itk
00212 
00213 #ifndef ITK_MANUAL_INSTANTIATION
00214 #include "itkWarpVectorImageFilter.txx"
00215 #endif
00216 
00217 #endif

Generated at Wed Mar 30 00:16:26 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000