Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkCheckerBoardImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCheckerBoardImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/24 12:45:32 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   typedef TImage InputImageType;
00050   typedef TImage OutputImageType;
00051   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00052   typedef typename OutputImageType::Pointer     OutputImagePointer;
00053   typedef typename OutputImageType::RegionType  ImageRegionType;
00054 
00056   itkNewMacro(Self);  
00057 
00059   itkTypeMacro(CheckerBoardImageFilter, ImageToImageFilter);
00060 
00062   itkStaticConstMacro(ImageDimension, unsigned int,
00063                       TImage::ImageDimension);
00064 
00066   typedef FixedArray< unsigned int, 
00067       ::itk::GetImageDimension<TImage>::ImageDimension >  PatternArrayType;
00068 
00070   void SetInput1( const TImage * image1);
00071 
00073   void SetInput2( const TImage * image2);
00074 
00076   itkSetMacro( CheckerPattern, PatternArrayType );
00077   itkGetConstReferenceMacro( CheckerPattern, PatternArrayType );
00079 
00080 protected:
00081   CheckerBoardImageFilter();
00082   ~CheckerBoardImageFilter() {}
00083   void PrintSelf(std::ostream& os, Indent indent) const;
00084 
00093   void ThreadedGenerateData(const ImageRegionType& outputRegionForThread,
00094                             int threadId );
00095 
00096 private:
00097   CheckerBoardImageFilter(const Self&); //purposely not implemented
00098   void operator=(const Self&); //purposely not implemented
00099 
00100   PatternArrayType  m_CheckerPattern;
00101 };
00102 
00103   
00104 } // end namespace itk
00105   
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkCheckerBoardImageFilter.txx"
00108 #endif
00109   
00110 #endif
00111 

Generated at Sun Sep 23 12:10:09 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000