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: 2005/07/27 15:21:12 $
00007   Version:   $Revision: 1.15 $
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 protected:
00086   WrapPadImageFilter() {};
00087   ~WrapPadImageFilter() {};
00088   
00099   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00100                             int threadId );
00101 
00105   int GenerateNextInputRegion(long *regIndices, long *regLimit, 
00106                               std::vector<long>* indices, 
00107                               std::vector<long>* sizes, 
00108                               InputImageRegionType& outputRegion);
00109 
00113   int GenerateNextOutputRegion(long *regIndices, long *regLimit, 
00114                                std::vector<long>* indices, 
00115                                std::vector<long>* sizes, 
00116                                OutputImageRegionType& outputRegion);
00117 
00122   int FindRegionsInArea(long start, long end, long size, long offset);
00123 
00130   int BuildInterRegions(std::vector<long>& inputRegionStart, 
00131                         std::vector<long>& outputRegionStart,
00132                         std::vector<long>& inputRegionSizes, 
00133                         std::vector<long>& outputRegionSizes,
00134                         long inputIndex, long outputIndex,
00135                         long inputSize, long outputSize, int numRegs, 
00136                         int & regCtr);
00137 
00146   int BuildPreRegions(std::vector<long>& inputRegionStart, 
00147                       std::vector<long>& outputRegionStart,
00148                       std::vector<long>& inputRegionSizes, 
00149                       std::vector<long>& outputRegionSizes,
00150                       long inputIndex, long outputIndex,
00151                       long inputSize, long outputSize, int numRegs, 
00152                       int & regCtr);
00153 
00162   int BuildPostRegions(std::vector<long>& inputRegionStart, 
00163                        std::vector<long>& outputRegionStart,
00164                        std::vector<long>& inputRegionSizes, 
00165                        std::vector<long>& outputRegionSizes,
00166                        long inputIndex, long outputIndex,
00167                        long inputSize, long outputSize, 
00168                        int numRegs, int & regCtr);
00169 
00176   virtual void GenerateInputRequestedRegion();
00177 
00178 private:
00179   WrapPadImageFilter(const Self&); //purposely not implemented
00180   void operator=(const Self&); //purposely not implemented
00181   
00182 };
00183   
00184 
00185 } // end namespace itk
00186 
00187 #ifndef ITK_MANUAL_INSTANTIATION
00188 #include "itkWrapPadImageFilter.txx"
00189 #endif
00190 
00191 #endif

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