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

itkWarpImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkWarpImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:00 $ 00007 Version: $Revision: 1.14 $ 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 __itkWarpImageFilter_h 00018 #define __itkWarpImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkInterpolateImageFunction.h" 00022 #include "itkLinearInterpolateImageFunction.h" 00023 #include "itkPoint.h" 00024 00025 namespace itk 00026 { 00027 00078 template < 00079 class TInputImage, 00080 class TOutputImage, 00081 class TDeformationField 00082 > 00083 class ITK_EXPORT WarpImageFilter : 00084 public ImageToImageFilter<TInputImage, TOutputImage> 00085 { 00086 public: 00088 typedef WarpImageFilter Self; 00089 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass; 00090 typedef SmartPointer<Self> Pointer; 00091 typedef SmartPointer<const Self> ConstPointer; 00092 00094 itkNewMacro(Self); 00095 00097 itkTypeMacro( WarpImageFilter, ImageToImageFilter ); 00098 00100 typedef typename TOutputImage::RegionType OutputImageRegionType; 00101 00103 typedef typename Superclass::InputImageType InputImageType; 00104 typedef typename Superclass::InputImagePointer InputImagePointer; 00105 typedef typename Superclass::OutputImageType OutputImageType; 00106 typedef typename Superclass::OutputImagePointer OutputImagePointer; 00107 typedef typename Superclass::InputImageConstPointer InputImageConstPointer; 00108 typedef typename OutputImageType::IndexType IndexType; 00109 typedef typename OutputImageType::SizeType SizeType; 00110 typedef typename OutputImageType::PixelType PixelType; 00111 00113 itkStaticConstMacro(ImageDimension, unsigned int, 00114 TOutputImage::ImageDimension ); 00115 00117 typedef TDeformationField DeformationFieldType; 00118 typedef typename DeformationFieldType::Pointer DeformationFieldPointer; 00119 typedef typename DeformationFieldType::PixelType DisplacementType; 00120 00122 typedef double CoordRepType; 00123 typedef InterpolateImageFunction<InputImageType,CoordRepType> InterpolatorType; 00124 typedef typename InterpolatorType::Pointer InterpolatorPointer; 00125 typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> 00126 DefaultInterpolatorType; 00127 00129 typedef Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType; 00130 00132 void SetDeformationField( DeformationFieldType * field ); 00133 00135 DeformationFieldType * GetDeformationField(void); 00136 00138 itkSetObjectMacro( Interpolator, InterpolatorType ); 00139 00141 itkGetObjectMacro( Interpolator, InterpolatorType ); 00142 00144 virtual void SetOutputSpacing( const double values[ImageDimension] ); 00145 00147 const double * GetOutputSpacing() 00148 { return m_OutputSpacing; } 00149 00151 virtual void SetOutputOrigin( const double values[ImageDimension] ); 00152 00154 const double * GetOutputOrigin() 00155 { return m_OutputSpacing; } 00156 00158 itkSetMacro( EdgePaddingValue, PixelType ); 00159 00161 itkGetMacro( EdgePaddingValue, PixelType ); 00162 00168 virtual void GenerateOutputInformation(); 00169 00176 virtual void GenerateInputRequestedRegion(); 00177 00180 virtual void BeforeThreadedGenerateData(); 00181 00182 protected: 00183 WarpImageFilter(); 00184 ~WarpImageFilter() {}; 00185 void PrintSelf(std::ostream& os, Indent indent) const; 00186 00190 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, 00191 int threadId ); 00192 00193 private: 00194 WarpImageFilter(const Self&); //purposely not implemented 00195 void operator=(const Self&); //purposely not implemented 00196 00197 PixelType m_EdgePaddingValue; 00198 double m_OutputSpacing[ImageDimension]; 00199 double m_OutputOrigin[ImageDimension]; 00200 00201 InterpolatorPointer m_Interpolator; 00202 00203 }; 00204 00205 } // end namespace itk 00206 00207 #ifndef ITK_MANUAL_INSTANTIATION 00208 #include "itkWarpImageFilter.txx" 00209 #endif 00210 00211 #endif

Generated at Sat Mar 31 02:34:57 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000