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: 2009-04-25 12:27:21 $
00007   Version:   $Revision: 1.16 $
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 
00062 template <class TInputImage, class TOutputImage>
00063 class ITK_EXPORT ExtractImageFilter:
00064     public ImageToImageFilter<TInputImage,TOutputImage>
00065 {
00066 public:
00068   typedef ExtractImageFilter                            Self;
00069   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00070   typedef SmartPointer<Self>                            Pointer;
00071   typedef SmartPointer<const Self>                      ConstPointer;
00072 
00074   itkNewMacro(Self);  
00075 
00077   itkTypeMacro(ExtractImageFilter, ImageToImageFilter);
00078 
00080   typedef TInputImage  InputImageType;
00081   typedef TOutputImage OutputImageType;
00082 
00084   typedef typename TOutputImage::RegionType OutputImageRegionType;
00085   typedef typename TInputImage::RegionType  InputImageRegionType;
00086 
00088   typedef typename TOutputImage::PixelType OutputImagePixelType;
00089   typedef typename TInputImage::PixelType  InputImagePixelType;
00090 
00092   typedef typename TOutputImage::IndexType OutputImageIndexType;
00093   typedef typename TInputImage::IndexType  InputImageIndexType;
00094   typedef typename TOutputImage::SizeType  OutputImageSizeType;
00095   typedef typename TInputImage::SizeType   InputImageSizeType;
00096 
00098   itkStaticConstMacro(InputImageDimension, unsigned int,
00099                       TInputImage::ImageDimension);
00100   itkStaticConstMacro(OutputImageDimension, unsigned int,
00101                       TOutputImage::ImageDimension);
00103 
00104   typedef ImageToImageFilterDetail::ExtractImageFilterRegionCopier<
00105     itkGetStaticConstMacro(InputImageDimension), 
00106     itkGetStaticConstMacro(OutputImageDimension)> ExtractImageFilterRegionCopierType;
00107 
00113   void SetExtractionRegion(InputImageRegionType extractRegion);
00114   itkGetConstMacro(ExtractionRegion, InputImageRegionType);
00116 
00117 #ifdef ITK_USE_CONCEPT_CHECKING
00118 
00119   itkConceptMacro(InputCovertibleToOutputCheck,
00120     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00121 
00123 #endif
00124 
00125 protected:
00126   ExtractImageFilter();
00127   ~ExtractImageFilter() {};
00128   void PrintSelf(std::ostream& os, Indent indent) const;
00129 
00138   virtual void GenerateOutputInformation();
00139 
00150   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00151                                                  const OutputImageRegionType &srcRegion);
00152 
00162   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00163                             int threadId );
00164   InputImageRegionType  m_ExtractionRegion;
00165   OutputImageRegionType m_OutputImageRegion;
00167 
00168 private:
00169   ExtractImageFilter(const Self&); //purposely not implemented
00170   void operator=(const Self&); //purposely not implemented
00171   
00172 };
00173 
00174   
00175 } // end namespace itk
00176   
00177 #ifndef ITK_MANUAL_INSTANTIATION
00178 #include "itkExtractImageFilter.txx"
00179 #endif
00180   
00181 #endif
00182 

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