00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkExpandImageFilter_h
00018
#define __itkExpandImageFilter_h
00019
00020
#include "itkImageToImageFilter.h"
00021
#include "itkInterpolateImageFunction.h"
00022
#include "itkLinearInterpolateImageFunction.h"
00023
00024
namespace itk
00025 {
00026
00071
template <
00072
class TInputImage,
00073
class TOutputImage
00074 >
00075 class ITK_EXPORT ExpandImageFilter:
00076
public ImageToImageFilter<TInputImage,TOutputImage>
00077 {
00078
public:
00080 typedef ExpandImageFilter
Self;
00081 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00082 typedef SmartPointer<Self> Pointer;
00083 typedef SmartPointer<const Self> ConstPointer;
00084
00086
itkNewMacro(
Self);
00087
00089
itkTypeMacro(ExpandImageFilter,
ImageToImageFilter);
00090
00092 typedef typename TOutputImage::RegionType
OutputImageRegionType;
00093
00095
itkStaticConstMacro(ImageDimension,
unsigned int,
00096 TInputImage::ImageDimension);
00097
00099 typedef typename Superclass::InputImageType
InputImageType;
00100 typedef typename Superclass::OutputImageType
OutputImageType;
00101 typedef typename OutputImageType::PixelType
OutputPixelType;
00102 typedef typename InputImageType::Pointer
InputImagePointer;
00103 typedef typename OutputImageType::Pointer
OutputImagePointer;
00104
00106 typedef double CoordRepType;
00107
typedef InterpolateImageFunction<InputImageType,CoordRepType>
00108 InterpolatorType;
00109 typedef typename InterpolatorType::Pointer
InterpolatorPointer;
00110
typedef LinearInterpolateImageFunction<InputImageType,CoordRepType>
00111 DefaultInterpolatorType;
00112
00114
itkSetObjectMacro( Interpolator,
InterpolatorType );
00115
00117
itkGetObjectMacro( Interpolator,
InterpolatorType );
00118
00121
virtual void SetExpandFactors(
const unsigned int factors[] );
00122
virtual void SetExpandFactors(
const unsigned int factor );
00123
00125
virtual const unsigned int * GetExpandFactors()
const
00126 {
return m_ExpandFactors; }
00127
00129
itkSetMacro( EdgePaddingValue, OutputPixelType );
00130
00132
itkGetMacro( EdgePaddingValue, OutputPixelType );
00133
00140
virtual void GenerateOutputInformation();
00141
00147
virtual void GenerateInputRequestedRegion();
00148
00149
protected:
00150 ExpandImageFilter();
00151 ~ExpandImageFilter() {}
00152 void PrintSelf(std::ostream& os,
Indent indent)
const;
00153
00163
virtual
00164
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00165
int threadId );
00166
00169
virtual void BeforeThreadedGenerateData();
00170
00171
private:
00172 ExpandImageFilter(
const Self&);
00173
void operator=(
const Self&);
00174
00175
unsigned int m_ExpandFactors[ImageDimension];
00176
InterpolatorPointer m_Interpolator;
00177
OutputPixelType m_EdgePaddingValue;
00178
00179 };
00180
00181 }
00182
00183
#ifndef ITK_MANUAL_INSTANTIATION
00184
#include "itkExpandImageFilter.txx"
00185
#endif
00186
00187
#endif