00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkTileImageFilter_h
00018 #define __itkTileImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkFixedArray.h"
00022
00023 namespace itk {
00024
00043 template<class TInputImage, class TOutputImage>
00044 class ITK_EXPORT TileImageFilter :
00045 public ImageToImageFilter<TInputImage, TOutputImage>
00046 {
00047 public:
00049 typedef TileImageFilter Self;
00050 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 itkNewMacro(Self);
00056
00058 itkTypeMacro(TileImageFilter, ImageToImageFilter);
00059
00061 typedef typename TInputImage::PixelType InputPixelType;
00062 typedef typename TOutputImage::PixelType OutputPixelType;
00063
00065 typedef typename TInputImage::Pointer InputImagePointer;
00066 typedef typename TOutputImage::Pointer OutputImagePointer;
00067
00068 typedef typename TInputImage::SizeType InputSizeType;
00069 typedef typename TInputImage::IndexType InputIndexType;
00070 typedef typename TInputImage::RegionType InputImageRegionType;
00071 typedef typename TOutputImage::SizeType OutputSizeType;
00072 typedef typename TOutputImage::IndexType OutputIndexType;
00073 typedef typename TOutputImage::RegionType OutputImageRegionType;
00074
00075
00077 itkStaticConstMacro(InputImageDimension, unsigned int,
00078 TInputImage::ImageDimension ) ;
00079 itkStaticConstMacro(OutputImageDimension, unsigned int,
00080 TOutputImage::ImageDimension ) ;
00081
00082 class TileInfo {
00083 public:
00084 int m_ImageNumber;
00085 OutputImageRegionType m_Region;
00086 TileInfo() : m_ImageNumber(-1) {}
00087 };
00088
00089 typedef Image<TileInfo,itkGetStaticConstMacro(OutputImageDimension)> TileImageType;
00090
00092 typedef FixedArray<unsigned int, itkGetStaticConstMacro(OutputImageDimension)> LayoutArrayType;
00093
00097 itkSetMacro(Layout,LayoutArrayType);
00098 itkGetMacro(Layout,LayoutArrayType);
00099
00102 itkSetMacro(DefaultPixelValue,OutputPixelType);
00103
00106 itkGetMacro(DefaultPixelValue,OutputPixelType);
00107
00108 protected:
00109 TileImageFilter();
00110 ~TileImageFilter(){};
00111 void PrintSelf(std::ostream& os, Indent indent) const;
00112
00113 void GenerateInputRequestedRegion();
00114 void GenerateOutputInformation();
00115
00116 void GenerateData ();
00117
00118 private:
00119 TileImageFilter(const Self&);
00120 void operator=(const Self&);
00121
00122
00123 typename TileImageType::Pointer m_TileImage;
00124 OutputPixelType m_DefaultPixelValue;
00125 LayoutArrayType m_Layout;
00126
00127 } ;
00128
00129 }
00130
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkTileImageFilter.txx"
00133 #endif
00134
00135 #endif