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

itkRegionOfInterestImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkRegionOfInterestImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/03/22 16:26:44 $
00007   Version:   $Revision: 1.6 $
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 __itkRegionOfInterestImageFilter_h
00018 #define __itkRegionOfInterestImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkSmartPointer.h"
00022 
00023 namespace itk
00024 {
00025 
00045 template <class TInputImage, class TOutputImage>
00046 class ITK_EXPORT RegionOfInterestImageFilter:
00047     public ImageToImageFilter<TInputImage,TOutputImage>
00048 {
00049 public:
00051   typedef RegionOfInterestImageFilter         Self;
00052   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00053   typedef SmartPointer<Self>  Pointer;
00054   typedef SmartPointer<const Self>  ConstPointer;
00055   typedef typename Superclass::InputImageRegionType InputImageRegionType;
00056 
00058   itkNewMacro(Self);  
00059 
00061   itkTypeMacro(RegionOfInterestImageFilter, ImageToImageFilter);
00062 
00064   typedef typename TInputImage::RegionType   RegionType;
00065   typedef typename TInputImage::IndexType    IndexType;
00066   typedef typename TInputImage::SizeType     SizeType;
00067 
00069   typedef typename TOutputImage::PixelType OutputImagePixelType;
00070   typedef typename TInputImage::PixelType  InputImagePixelType;
00071 
00073   itkSetMacro(RegionOfInterest, RegionType);
00074   itkGetMacro(RegionOfInterest, RegionType);
00076 
00078   itkStaticConstMacro(ImageDimension, unsigned int,
00079                       TInputImage::ImageDimension);
00080   itkStaticConstMacro(OutputImageDimension, unsigned int,
00081                       TOutputImage::ImageDimension);
00083 
00084 #ifdef ITK_USE_CONCEPT_CHECKING
00085 
00086   itkConceptMacro(SameDimensionCheck,
00087     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00088   itkConceptMacro(InputConvertibleToOutputCheck,
00089     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00090 
00092 #endif
00093 
00094 protected:
00095   RegionOfInterestImageFilter();
00096   ~RegionOfInterestImageFilter() {};
00097   void PrintSelf(std::ostream& os, Indent indent) const;
00098 
00099 
00100   virtual void GenerateInputRequestedRegion();
00101   virtual void EnlargeOutputRequestedRegion(DataObject *output);
00102   
00111   virtual void GenerateOutputInformation();
00112 
00113 
00123   void ThreadedGenerateData(const RegionType& outputRegionForThread,
00124                             int threadId );
00125 
00126 private:
00127   RegionOfInterestImageFilter(const Self&); //purposely not implemented
00128   void operator=(const Self&); //purposely not implemented
00129   
00130   RegionType      m_RegionOfInterest;
00131 };
00132 
00133   
00134 } // end namespace itk
00135   
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "itkRegionOfInterestImageFilter.txx"
00138 #endif
00139   
00140 #endif
00141 

Generated at Mon Mar 12 02:43:50 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000