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 };
00089
00090 typedef Image<TileInfo,itkGetStaticConstMacro(OutputImageDimension)> TileImageType;
00091
00093 typedef FixedArray<unsigned int, itkGetStaticConstMacro(OutputImageDimension)> LayoutArrayType;
00094
00098 itkSetMacro(Layout,LayoutArrayType);
00099 itkGetMacro(Layout,LayoutArrayType);
00101
00104 itkSetMacro(DefaultPixelValue,OutputPixelType);
00105
00108 itkGetMacro(DefaultPixelValue,OutputPixelType);
00109
00110 #ifdef ITK_USE_CONCEPT_CHECKING
00111
00112 itkConceptMacro(OutputEqualityComparableCheck,
00113 (Concept::EqualityComparable<OutputPixelType>));
00114 itkConceptMacro(SameTypeCheck,
00115 (Concept::SameType<InputPixelType, OutputPixelType>));
00116 itkConceptMacro(OutputOStreamWritableCheck,
00117 (Concept::OStreamWritable<OutputPixelType>));
00118
00120 #endif
00121
00122 protected:
00123 TileImageFilter();
00124 ~TileImageFilter(){};
00125 void PrintSelf(std::ostream& os, Indent indent) const;
00126
00127 void GenerateInputRequestedRegion();
00128 void GenerateOutputInformation();
00129
00130 void GenerateData ();
00131
00132 private:
00133 TileImageFilter(const Self&);
00134 void operator=(const Self&);
00135
00136
00137 typename TileImageType::Pointer m_TileImage;
00138 OutputPixelType m_DefaultPixelValue;
00139 LayoutArrayType m_Layout;
00140
00141 } ;
00142
00143 }
00144
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkTileImageFilter.txx"
00147 #endif
00148
00149 #endif
00150