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

itkExtractImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExtractImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-08-27 13:29:02 $
00007   Version:   $Revision: 1.13 $
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 __itkExtractImageFilter_h
00018 #define __itkExtractImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkSmartPointer.h"
00022 #include "itkExtractImageFilterRegionCopier.h"
00023 
00024 namespace itk
00025 {
00026 
00055 template <class TInputImage, class TOutputImage>
00056 class ITK_EXPORT ExtractImageFilter:
00057     public ImageToImageFilter<TInputImage,TOutputImage>
00058 {
00059 public:
00061   typedef ExtractImageFilter         Self;
00062   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00063   typedef SmartPointer<Self>  Pointer;
00064   typedef SmartPointer<const Self>  ConstPointer;
00065 
00067   itkNewMacro(Self);  
00068 
00070   itkTypeMacro(ExtractImageFilter, ImageToImageFilter);
00071 
00073   typedef TInputImage  InputImageType;
00074   typedef TOutputImage OutputImageType;
00075 
00077   typedef typename TOutputImage::RegionType OutputImageRegionType;
00078   typedef typename TInputImage::RegionType InputImageRegionType;
00079 
00081   typedef typename TOutputImage::PixelType OutputImagePixelType;
00082   typedef typename TInputImage::PixelType InputImagePixelType;
00083 
00085   typedef typename TOutputImage::IndexType OutputImageIndexType;
00086   typedef typename TInputImage::IndexType InputImageIndexType;
00087   typedef typename TOutputImage::SizeType OutputImageSizeType;
00088   typedef typename TInputImage::SizeType InputImageSizeType;
00089 
00091   itkStaticConstMacro(InputImageDimension, unsigned int,
00092                       TInputImage::ImageDimension);
00093   itkStaticConstMacro(OutputImageDimension, unsigned int,
00094                       TOutputImage::ImageDimension);
00096 
00097   typedef ImageToImageFilterDetail::ExtractImageFilterRegionCopier<
00098     itkGetStaticConstMacro(InputImageDimension), 
00099     itkGetStaticConstMacro(OutputImageDimension)> ExtractImageFilterRegionCopierType;
00100 
00106   void SetExtractionRegion(InputImageRegionType extractRegion);
00107   itkGetMacro(ExtractionRegion, InputImageRegionType);
00109 
00110 #ifdef ITK_USE_CONCEPT_CHECKING
00111 
00112   itkConceptMacro(InputCovertibleToOutputCheck,
00113     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00114 
00116 #endif
00117 
00118 protected:
00119   ExtractImageFilter();
00120   ~ExtractImageFilter() {};
00121   void PrintSelf(std::ostream& os, Indent indent) const;
00122 
00131   virtual void GenerateOutputInformation();
00132 
00143   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00144                                                  const OutputImageRegionType &srcRegion);
00145 
00155   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00156                             int threadId );
00157   InputImageRegionType m_ExtractionRegion;
00158   OutputImageRegionType m_OutputImageRegion;
00160 
00161 private:
00162   ExtractImageFilter(const Self&); //purposely not implemented
00163   void operator=(const Self&); //purposely not implemented
00164   
00165 };
00166 
00167   
00168 } // end namespace itk
00169   
00170 #ifndef ITK_MANUAL_INSTANTIATION
00171 #include "itkExtractImageFilter.txx"
00172 #endif
00173   
00174 #endif
00175 

Generated at Mon Apr 14 12:17:49 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000