Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVectorExpandImageFilter_h
00018 #define __itkVectorExpandImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkVectorInterpolateImageFunction.h"
00022 #include "itkVectorLinearInterpolateImageFunction.h"
00023
00024 namespace itk
00025 {
00026
00083 template <class TInputImage, class TOutputImage>
00084 class ITK_EXPORT VectorExpandImageFilter:
00085 public ImageToImageFilter<TInputImage,TOutputImage>
00086 {
00087 public:
00089 typedef VectorExpandImageFilter Self;
00090 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00091 typedef SmartPointer<Self> Pointer;
00092 typedef SmartPointer<const Self> ConstPointer;
00093
00095 itkNewMacro(Self);
00096
00098 typedef typename TInputImage::Pointer InputImagePointer;
00099 typedef typename TOutputImage::Pointer OutputImagePointer;
00100 typedef typename TOutputImage::RegionType OutputImageRegionType;
00101
00103 itkTypeMacro(VectorExpandImageFilter, ImageToImageFilter);
00104
00106 itkStaticConstMacro(ImageDimension, unsigned int,
00107 TInputImage::ImageDimension);
00108
00110 typedef typename Superclass::InputImageType InputImageType;
00111 typedef typename Superclass::OutputImageType OutputImageType;
00112
00114 typedef typename OutputImageType::PixelType OutputPixelType;
00115 typedef typename OutputPixelType::ValueType OutputValueType;
00116 typedef typename InputImageType::PixelType InputPixelType;
00117 typedef typename InputPixelType::ValueType InputValueType;
00118
00120 enum { VectorDimension = InputPixelType::Dimension };
00121
00123 typedef float ExpandFactorsType;
00124
00126 typedef double CoordRepType;
00127 typedef VectorInterpolateImageFunction<InputImageType,CoordRepType>
00128 InterpolatorType;
00129 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00130 typedef VectorLinearInterpolateImageFunction<InputImageType,CoordRepType>
00131 DefaultInterpolatorType;
00132
00134 itkSetObjectMacro( Interpolator, InterpolatorType );
00135
00137 itkGetObjectMacro( Interpolator, InterpolatorType );
00138
00141 virtual void SetExpandFactors( const ExpandFactorsType factors[] );
00142 virtual void SetExpandFactors( const ExpandFactorsType factor );
00143 virtual void SetExpandFactors( const unsigned int factors[] );
00145
00147 const ExpandFactorsType * GetExpandFactors() const
00148 { return m_ExpandFactors; }
00149
00151 virtual void SetEdgePaddingValue( const OutputPixelType& value );
00152
00154 virtual const OutputPixelType& GetEdgePaddingValue()
00155 { return m_EdgePaddingValue; }
00156
00163 virtual void GenerateOutputInformation();
00164
00170 virtual void GenerateInputRequestedRegion();
00171
00172 #ifdef ITK_USE_CONCEPT_CHECKING
00173
00174 itkConceptMacro(InputHasNumericTraitsCheck,
00175 (Concept::HasNumericTraits<InputValueType>));
00176 itkConceptMacro(OutputHasNumericTraitsCheck,
00177 (Concept::HasNumericTraits<OutputValueType>));
00178
00180 #endif
00181
00182 protected:
00183
00184 VectorExpandImageFilter();
00185 ~VectorExpandImageFilter() {};
00186 void PrintSelf(std::ostream& os, Indent indent) const;
00187
00196 virtual
00197 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00198 int threadId );
00199
00202 virtual void BeforeThreadedGenerateData();
00203
00204 private:
00205 VectorExpandImageFilter(const Self&);
00206 void operator=(const Self&);
00207
00208 ExpandFactorsType m_ExpandFactors[ImageDimension];
00209 InterpolatorPointer m_Interpolator;
00210 OutputPixelType m_EdgePaddingValue;
00211
00212 };
00213
00214 }
00215
00216 #ifndef ITK_MANUAL_INSTANTIATION
00217 #include "itkVectorExpandImageFilter.txx"
00218 #endif
00219
00220 #endif
00221