00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkWrapPadImageFilter_h
00018
#define __itkWrapPadImageFilter_h
00019
00020
#include "itkPadImageFilter.h"
00021
#include <vector>
00022
00023
namespace itk
00024 {
00025
00039
template <
class TInputImage,
class TOutputImage>
00040 class ITK_EXPORT WrapPadImageFilter:
00041
public PadImageFilter<TInputImage,TOutputImage>
00042 {
00043
public:
00045 typedef WrapPadImageFilter
Self;
00046 typedef PadImageFilter<TInputImage,TOutputImage> Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048 typedef SmartPointer<const Self> ConstPointer;
00049
00051
itkNewMacro(
Self);
00052
00054
itkTypeMacro(WrapPadImageFilter,
PadImageFilter);
00055
00056 typedef typename Superclass::InputImageType
InputImageType;
00057 typedef typename Superclass::OutputImageType
OutputImageType;
00058 typedef typename Superclass::InputImagePointer
InputImagePointer;
00059 typedef typename Superclass::OutputImagePointer
OutputImagePointer;
00060 typedef typename Superclass::InputImageConstPointer
InputImageConstPointer;
00061
00063 typedef typename Superclass::OutputImageRegionType
OutputImageRegionType;
00064 typedef typename Superclass::InputImageRegionType
InputImageRegionType;
00065
00067 typedef typename Superclass::OutputImagePixelType
OutputImagePixelType;
00068 typedef typename Superclass::InputImagePixelType
InputImagePixelType;
00069
00071 typedef typename Superclass::OutputImageIndexType
OutputImageIndexType;
00072 typedef typename Superclass::InputImageIndexType
InputImageIndexType;
00073 typedef typename Superclass::OutputImageSizeType
OutputImageSizeType;
00074 typedef typename Superclass::InputImageSizeType
InputImageSizeType;
00075
00077
itkStaticConstMacro(ImageDimension,
unsigned int,
00078 TInputImage::ImageDimension );
00079
00080
protected:
00081 WrapPadImageFilter() {};
00082 ~WrapPadImageFilter() {};
00083
00094
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00095
int threadId );
00096
00100
int GenerateNextInputRegion(
long *regIndices,
long *regLimit,
00101 std::vector<long> indices[ImageDimension],
00102 std::vector<long> sizes[ImageDimension],
00103 InputImageRegionType& outputRegion);
00104
00108
int GenerateNextOutputRegion(
long *regIndices,
long *regLimit,
00109 std::vector<long> indices[ImageDimension],
00110 std::vector<long> sizes[ImageDimension],
00111 OutputImageRegionType& outputRegion);
00112
00117
int FindRegionsInArea(
long start,
long end,
long size,
long offset);
00118
00125
int BuildInterRegions(std::vector<long>& inputRegionStart,
00126 std::vector<long>& outputRegionStart,
00127 std::vector<long>& inputRegionSizes,
00128 std::vector<long>& outputRegionSizes,
00129
long inputIndex,
long outputIndex,
00130
long inputSize,
long outputSize,
int numRegs,
00131
int & regCtr);
00132
00141
int BuildPreRegions(std::vector<long>& inputRegionStart,
00142 std::vector<long>& outputRegionStart,
00143 std::vector<long>& inputRegionSizes,
00144 std::vector<long>& outputRegionSizes,
00145
long inputIndex,
long outputIndex,
00146
long inputSize,
long outputSize,
int numRegs,
00147
int & regCtr);
00148
00157
int BuildPostRegions(std::vector<long>& inputRegionStart,
00158 std::vector<long>& outputRegionStart,
00159 std::vector<long>& inputRegionSizes,
00160 std::vector<long>& outputRegionSizes,
00161
long inputIndex,
long outputIndex,
00162
long inputSize,
long outputSize,
00163
int numRegs,
int & regCtr);
00164
00171
virtual void GenerateInputRequestedRegion();
00172
00173
private:
00174 WrapPadImageFilter(
const Self&);
00175
void operator=(
const Self&);
00176
00177 };
00178
00179
00180 }
00181
00182
#ifndef ITK_MANUAL_INSTANTIATION
00183
#include "itkWrapPadImageFilter.txx"
00184
#endif
00185
00186
#endif