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: 2004/07/12 15:44:13 $
00007   Version:   $Revision: 1.2 $
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   };
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&); //purposely not implemented
00120   void operator=(const Self&); //purposely not implemented
00121 
00122 
00123   typename TileImageType::Pointer m_TileImage;
00124   OutputPixelType m_DefaultPixelValue;
00125   LayoutArrayType m_Layout;
00126 
00127 } ; // end of class
00128 
00129 } // end namespace itk
00130   
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkTileImageFilter.txx"
00133 #endif
00134 
00135 #endif

Generated at Thu May 25 00:09:03 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000