Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkCheckerBoardImageFilter_h
00018 #define __itkCheckerBoardImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00039 template <class TImage>
00040 class ITK_EXPORT CheckerBoardImageFilter:
00041 public ImageToImageFilter<TImage, TImage>
00042 {
00043 public:
00045 typedef CheckerBoardImageFilter Self;
00046 typedef ImageToImageFilter<TImage,TImage> Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048 typedef SmartPointer<const Self> ConstPointer;
00049
00050 typedef TImage InputImageType;
00051 typedef TImage OutputImageType;
00052 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00053 typedef typename OutputImageType::Pointer OutputImagePointer;
00054 typedef typename OutputImageType::RegionType ImageRegionType;
00055
00057 itkNewMacro(Self);
00058
00060 itkTypeMacro(CheckerBoardImageFilter, ImageToImageFilter);
00061
00063 itkStaticConstMacro(ImageDimension, unsigned int,
00064 TImage::ImageDimension);
00065
00067 typedef FixedArray< unsigned int,
00068 ::itk::GetImageDimension<TImage>::ImageDimension > PatternArrayType;
00069
00071 void SetInput1( const TImage * image1);
00072
00074 void SetInput2( const TImage * image2);
00075
00077 itkSetMacro( CheckerPattern, PatternArrayType );
00078 itkGetConstReferenceMacro( CheckerPattern, PatternArrayType );
00080
00081 protected:
00082 CheckerBoardImageFilter();
00083 ~CheckerBoardImageFilter() {}
00084 void PrintSelf(std::ostream& os, Indent indent) const;
00085
00094 void ThreadedGenerateData(const ImageRegionType& outputRegionForThread,
00095 int threadId );
00096
00097 private:
00098 CheckerBoardImageFilter(const Self&);
00099 void operator=(const Self&);
00100
00101 PatternArrayType m_CheckerPattern;
00102 };
00103
00104
00105 }
00106
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkCheckerBoardImageFilter.txx"
00109 #endif
00110
00111 #endif
00112