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/12/10 15:22:32 $ 00007 Version: $Revision: 1.17 $ 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 #include "itkFixedArray.h" 00025 00026 namespace itk 00027 { 00028 00079 template < 00080 class TInputImage, 00081 class TOutputImage, 00082 class TDeformationField 00083 > 00084 class ITK_EXPORT WarpImageFilter : 00085 public ImageToImageFilter<TInputImage, TOutputImage> 00086 { 00087 public: 00089 typedef WarpImageFilter Self; 00090 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass; 00091 typedef SmartPointer<Self> Pointer; 00092 typedef SmartPointer<const Self> ConstPointer; 00093 00095 itkNewMacro(Self); 00096 00098 itkTypeMacro( WarpImageFilter, ImageToImageFilter ); 00099 00101 typedef typename TOutputImage::RegionType OutputImageRegionType; 00102 00104 typedef typename Superclass::InputImageType InputImageType; 00105 typedef typename Superclass::InputImagePointer InputImagePointer; 00106 typedef typename Superclass::OutputImageType OutputImageType; 00107 typedef typename Superclass::OutputImagePointer OutputImagePointer; 00108 typedef typename Superclass::InputImageConstPointer InputImageConstPointer; 00109 typedef typename OutputImageType::IndexType IndexType; 00110 typedef typename OutputImageType::SizeType SizeType; 00111 typedef typename OutputImageType::PixelType PixelType; 00112 typedef typename OutputImageType::SpacingType SpacingType; 00113 00115 itkStaticConstMacro(ImageDimension, unsigned int, 00116 TOutputImage::ImageDimension ); 00117 00119 typedef TDeformationField DeformationFieldType; 00120 typedef typename DeformationFieldType::Pointer DeformationFieldPointer; 00121 typedef typename DeformationFieldType::PixelType DisplacementType; 00122 00124 typedef double CoordRepType; 00125 typedef InterpolateImageFunction<InputImageType,CoordRepType> InterpolatorType; 00126 typedef typename InterpolatorType::Pointer InterpolatorPointer; 00127 typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> 00128 DefaultInterpolatorType; 00129 00131 typedef Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType; 00132 00134 void SetDeformationField( DeformationFieldType * field ); 00135 00137 DeformationFieldType * GetDeformationField(void); 00138 00140 itkSetObjectMacro( Interpolator, InterpolatorType ); 00141 00143 itkGetObjectMacro( Interpolator, InterpolatorType ); 00144 00146 itkSetMacro(OutputSpacing, SpacingType); 00147 virtual void SetOutputSpacing( const double values[ImageDimension] ); 00148 00150 itkGetConstReferenceMacro(OutputSpacing, SpacingType); 00151 00153 itkSetMacro(OutputOrigin, PointType); 00154 virtual void SetOutputOrigin( const double values[ImageDimension] ); 00155 00157 itkGetConstReferenceMacro(OutputOrigin, PointType); 00158 00160 itkSetMacro( EdgePaddingValue, PixelType ); 00161 00163 itkGetMacro( EdgePaddingValue, PixelType ); 00164 00170 virtual void GenerateOutputInformation(); 00171 00178 virtual void GenerateInputRequestedRegion(); 00179 00182 virtual void BeforeThreadedGenerateData(); 00183 00184 protected: 00185 WarpImageFilter(); 00186 ~WarpImageFilter() {}; 00187 void PrintSelf(std::ostream& os, Indent indent) const; 00188 00192 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, 00193 int threadId ); 00194 00195 private: 00196 WarpImageFilter(const Self&); //purposely not implemented 00197 void operator=(const Self&); //purposely not implemented 00198 00199 PixelType m_EdgePaddingValue; 00200 SpacingType m_OutputSpacing; 00201 PointType m_OutputOrigin; 00202 00203 InterpolatorPointer m_Interpolator; 00204 00205 }; 00206 00207 } // end namespace itk 00208 00209 #ifndef ITK_MANUAL_INSTANTIATION 00210 #include "itkWarpImageFilter.txx" 00211 #endif 00212 00213 #endif

Generated at Sun Apr 1 02:47:50 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000