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: 2006/03/17 14:22:26 $
00007   Version:   $Revision: 1.12 $
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 
00054 template <class TInputImage, class TOutputImage>
00055 class ITK_EXPORT ExtractImageFilter:
00056     public ImageToImageFilter<TInputImage,TOutputImage>
00057 {
00058 public:
00060   typedef ExtractImageFilter         Self;
00061   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00062   typedef SmartPointer<Self>  Pointer;
00063   typedef SmartPointer<const Self>  ConstPointer;
00064 
00066   itkNewMacro(Self);  
00067 
00069   itkTypeMacro(ExtractImageFilter, ImageToImageFilter);
00070 
00072   typedef TInputImage  InputImageType;
00073   typedef TOutputImage OutputImageType;
00074 
00076   typedef typename TOutputImage::RegionType OutputImageRegionType;
00077   typedef typename TInputImage::RegionType InputImageRegionType;
00078 
00080   typedef typename TOutputImage::PixelType OutputImagePixelType;
00081   typedef typename TInputImage::PixelType InputImagePixelType;
00082 
00084   typedef typename TOutputImage::IndexType OutputImageIndexType;
00085   typedef typename TInputImage::IndexType InputImageIndexType;
00086   typedef typename TOutputImage::SizeType OutputImageSizeType;
00087   typedef typename TInputImage::SizeType InputImageSizeType;
00088 
00090   itkStaticConstMacro(InputImageDimension, unsigned int,
00091                       TInputImage::ImageDimension);
00092   itkStaticConstMacro(OutputImageDimension, unsigned int,
00093                       TOutputImage::ImageDimension);
00095 
00096   typedef 
00097   ImageToImageFilterDetail::ExtractImageFilterRegionCopier<itkGetStaticConstMacro(InputImageDimension), 
00098                                                            itkGetStaticConstMacro(OutputImageDimension)> ExtractImageFilterRegionCopierType;
00099 
00105   void SetExtractionRegion(InputImageRegionType extractRegion);
00106   itkGetMacro(ExtractionRegion, InputImageRegionType);
00108 
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110 
00111   itkConceptMacro(InputCovertibleToOutputCheck,
00112     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00113 
00115 #endif
00116 
00117 protected:
00118   ExtractImageFilter();
00119   ~ExtractImageFilter() {};
00120   void PrintSelf(std::ostream& os, Indent indent) const;
00121 
00130   virtual void GenerateOutputInformation();
00131 
00142   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00143                                                  const OutputImageRegionType &srcRegion);
00144 
00154   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00155                             int threadId );
00156   InputImageRegionType m_ExtractionRegion;
00157   OutputImageRegionType m_OutputImageRegion;
00159 
00160 private:
00161   ExtractImageFilter(const Self&); //purposely not implemented
00162   void operator=(const Self&); //purposely not implemented
00163   
00164 };
00165 
00166   
00167 } // end namespace itk
00168   
00169 #ifndef ITK_MANUAL_INSTANTIATION
00170 #include "itkExtractImageFilter.txx"
00171 #endif
00172   
00173 #endif
00174 

Generated at Mon Mar 12 00:10:15 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000