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

itkTileImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTileImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/04/03 15:07:52 $
00007   Version:   $Revision: 1.4 $
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 __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   // Define a tile structure 
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&); //purposely not implemented
00134   void operator=(const Self&); //purposely not implemented
00135 
00136 
00137   typename TileImageType::Pointer m_TileImage;
00138   OutputPixelType m_DefaultPixelValue;
00139   LayoutArrayType m_Layout;
00140 
00141 } ; // end of class
00142 
00143 } // end namespace itk
00144   
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkTileImageFilter.txx"
00147 #endif
00148 
00149 #endif
00150 

Generated at Tue Jul 29 22:54:57 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000