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

itkWrapPadImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkWrapPadImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-09 15:31:37 $
00007   Version:   $Revision: 1.17 $
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 __itkWrapPadImageFilter_h
00018 #define __itkWrapPadImageFilter_h
00019 
00020 #include "itkPadImageFilter.h"
00021 #include <vector>
00022 
00023 namespace itk
00024 {
00025 
00044 template <class TInputImage, class TOutputImage>
00045 class ITK_EXPORT WrapPadImageFilter:
00046     public PadImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050   typedef WrapPadImageFilter                        Self;
00051   typedef PadImageFilter<TInputImage,TOutputImage>  Superclass;
00052   typedef SmartPointer<Self>                        Pointer;
00053   typedef SmartPointer<const Self>                  ConstPointer;
00054 
00056   itkNewMacro(Self); 
00057 
00059   itkTypeMacro(WrapPadImageFilter, PadImageFilter);
00060 
00061   typedef typename Superclass::InputImageType         InputImageType;
00062   typedef typename Superclass::OutputImageType        OutputImageType;
00063   typedef typename Superclass::InputImagePointer      InputImagePointer;
00064   typedef typename Superclass::OutputImagePointer     OutputImagePointer;
00065   typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00066   
00068   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00069   typedef typename Superclass::InputImageRegionType  InputImageRegionType;
00070 
00072   typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00073   typedef typename Superclass::InputImagePixelType  InputImagePixelType;
00074 
00076   typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
00077   typedef typename Superclass::InputImageIndexType  InputImageIndexType;
00078   typedef typename Superclass::OutputImageSizeType  OutputImageSizeType;
00079   typedef typename Superclass::InputImageSizeType   InputImageSizeType;
00080 
00082   itkStaticConstMacro(ImageDimension, unsigned int,
00083                       TInputImage::ImageDimension );
00084 
00085 #ifdef ITK_USE_CONCEPT_CHECKING
00086 
00087   itkConceptMacro(InputConvertibleToOutputCheck,
00088     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00089 
00091 #endif
00092 
00093 protected:
00094   WrapPadImageFilter() {};
00095   ~WrapPadImageFilter() {};
00096   
00107   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00108                             int threadId );
00109 
00113   int GenerateNextInputRegion(long *regIndices, long *regLimit, 
00114                               std::vector<long>* indices, 
00115                               std::vector<long>* sizes, 
00116                               InputImageRegionType& outputRegion);
00117 
00121   int GenerateNextOutputRegion(long *regIndices, long *regLimit, 
00122                                std::vector<long>* indices, 
00123                                std::vector<long>* sizes, 
00124                                OutputImageRegionType& outputRegion);
00125 
00130   int FindRegionsInArea(long start, long end, long size, long offset);
00131 
00138   int BuildInterRegions(std::vector<long>& inputRegionStart, 
00139                         std::vector<long>& outputRegionStart,
00140                         std::vector<long>& inputRegionSizes, 
00141                         std::vector<long>& outputRegionSizes,
00142                         long inputIndex, long outputIndex,
00143                         long inputSize, long outputSize, int numRegs, 
00144                         int & regCtr);
00145 
00154   int BuildPreRegions(std::vector<long>& inputRegionStart, 
00155                       std::vector<long>& outputRegionStart,
00156                       std::vector<long>& inputRegionSizes, 
00157                       std::vector<long>& outputRegionSizes,
00158                       long inputIndex, long outputIndex,
00159                       long inputSize, long outputSize, int numRegs, 
00160                       int & regCtr);
00161 
00170   int BuildPostRegions(std::vector<long>& inputRegionStart, 
00171                        std::vector<long>& outputRegionStart,
00172                        std::vector<long>& inputRegionSizes, 
00173                        std::vector<long>& outputRegionSizes,
00174                        long inputIndex, long outputIndex,
00175                        long inputSize, long outputSize, 
00176                        int numRegs, int & regCtr);
00177 
00184   virtual void GenerateInputRequestedRegion();
00185 
00186 private:
00187   WrapPadImageFilter(const Self&); //purposely not implemented
00188   void operator=(const Self&); //purposely not implemented
00189   
00190 };
00191   
00192 
00193 } // end namespace itk
00194 
00195 #ifndef ITK_MANUAL_INSTANTIATION
00196 #include "itkWrapPadImageFilter.txx"
00197 #endif
00198 
00199 #endif
00200 

Generated at Mon Jul 12 2010 20:20:33 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000