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
00076
template <
00077
class TInputImage,
00078
class TOutputImage
00079 >
00080 class ITK_EXPORT VectorExpandImageFilter:
00081
public ImageToImageFilter<TInputImage,TOutputImage>
00082 {
00083
public:
00085 typedef VectorExpandImageFilter
Self;
00086 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00087 typedef SmartPointer<Self> Pointer;
00088 typedef SmartPointer<const Self> ConstPointer;
00089
00091
itkNewMacro(
Self);
00092
00094 typedef typename TInputImage::Pointer
InputImagePointer;
00095 typedef typename TOutputImage::Pointer
OutputImagePointer;
00096 typedef typename TOutputImage::RegionType
OutputImageRegionType;
00097
00099
itkTypeMacro(VectorExpandImageFilter,
ImageToImageFilter);
00100
00102
itkStaticConstMacro(ImageDimension,
unsigned int,
00103 TInputImage::ImageDimension);
00104
00106 typedef typename Superclass::InputImageType
InputImageType;
00107 typedef typename Superclass::OutputImageType
OutputImageType;
00108
00110 typedef typename OutputImageType::PixelType
OutputPixelType;
00111 typedef typename OutputPixelType::ValueType
OutputValueType;
00112 typedef typename InputImageType::PixelType
InputPixelType;
00113 typedef typename InputPixelType::ValueType
InputValueType;
00114
00116
enum { VectorDimension = InputPixelType::Dimension };
00117
00119 typedef float ExpandFactorsType;
00120
00122 typedef double CoordRepType;
00123
typedef VectorInterpolateImageFunction<InputImageType,CoordRepType>
00124 InterpolatorType;
00125 typedef typename InterpolatorType::Pointer
InterpolatorPointer;
00126
typedef VectorLinearInterpolateImageFunction<InputImageType,CoordRepType>
00127 DefaultInterpolatorType;
00128
00130
itkSetObjectMacro( Interpolator,
InterpolatorType );
00131
00133
itkGetObjectMacro( Interpolator,
InterpolatorType );
00134
00137
virtual void SetExpandFactors(
const ExpandFactorsType factors[] );
00138
virtual void SetExpandFactors(
const ExpandFactorsType factor );
00139
virtual void SetExpandFactors(
const unsigned int factors[] );
00140
00142
const ExpandFactorsType * GetExpandFactors()
const
00143 {
return m_ExpandFactors; }
00144
00146
virtual void SetEdgePaddingValue(
const OutputPixelType& value );
00147
00149
virtual const OutputPixelType& GetEdgePaddingValue()
00150 {
return m_EdgePaddingValue; }
00151
00158
virtual void GenerateOutputInformation();
00159
00165
virtual void GenerateInputRequestedRegion();
00166
00167
protected:
00168
00169 VectorExpandImageFilter();
00170 ~VectorExpandImageFilter() {};
00171 void PrintSelf(std::ostream& os,
Indent indent)
const;
00172
00181
virtual
00182
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00183
int threadId );
00184
00187
virtual void BeforeThreadedGenerateData();
00188
00189
private:
00190 VectorExpandImageFilter(
const Self&);
00191
void operator=(
const Self&);
00192
00193
ExpandFactorsType m_ExpandFactors[ImageDimension];
00194
InterpolatorPointer m_Interpolator;
00195
OutputPixelType m_EdgePaddingValue;
00196
00197 };
00198
00199 }
00200
00201
#ifndef ITK_MANUAL_INSTANTIATION
00202
#include "itkVectorExpandImageFilter.txx"
00203
#endif
00204
00205
#endif