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: 2008-10-17 16:30:51 $
00007   Version:   $Revision: 1.8 $
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 
00047 template <class TInputImage, class TOutputImage>
00048 class ITK_EXPORT RegionOfInterestImageFilter:
00049     public ImageToImageFilter<TInputImage,TOutputImage>
00050 {
00051 public:
00053   typedef RegionOfInterestImageFilter                   Self;
00054   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00055   typedef SmartPointer<Self>                            Pointer;
00056   typedef SmartPointer<const Self>                      ConstPointer;
00057   typedef typename Superclass::InputImageRegionType     InputImageRegionType;
00058 
00060   itkNewMacro(Self);  
00061 
00063   itkTypeMacro(RegionOfInterestImageFilter, ImageToImageFilter);
00064 
00066   typedef typename TInputImage::RegionType   RegionType;
00067   typedef typename TInputImage::IndexType    IndexType;
00068   typedef typename TInputImage::SizeType     SizeType;
00069 
00071   typedef typename TOutputImage::PixelType OutputImagePixelType;
00072   typedef typename TInputImage::PixelType  InputImagePixelType;
00073 
00075   itkSetMacro(RegionOfInterest, RegionType);
00076   itkGetMacro(RegionOfInterest, RegionType);
00078 
00080   itkStaticConstMacro(ImageDimension, unsigned int,
00081                       TInputImage::ImageDimension);
00082   itkStaticConstMacro(OutputImageDimension, unsigned int,
00083                       TOutputImage::ImageDimension);
00085 
00086 #ifdef ITK_USE_CONCEPT_CHECKING
00087 
00088   itkConceptMacro(SameDimensionCheck,
00089     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00090   itkConceptMacro(InputConvertibleToOutputCheck,
00091     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00092 
00094 #endif
00095 
00096 protected:
00097   RegionOfInterestImageFilter();
00098   ~RegionOfInterestImageFilter() {};
00099   void PrintSelf(std::ostream& os, Indent indent) const;
00100 
00101 
00102   virtual void GenerateInputRequestedRegion();
00103   virtual void EnlargeOutputRequestedRegion(DataObject *output);
00104   
00113   virtual void GenerateOutputInformation();
00114 
00115 
00125   void ThreadedGenerateData(const RegionType& outputRegionForThread,
00126                             int threadId );
00127 
00128 private:
00129   RegionOfInterestImageFilter(const Self&); //purposely not implemented
00130   void operator=(const Self&); //purposely not implemented
00131   
00132   RegionType      m_RegionOfInterest;
00133 };
00134 
00135   
00136 } // end namespace itk
00137   
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkRegionOfInterestImageFilter.txx"
00140 #endif
00141   
00142 #endif
00143 

Generated at Sat Feb 28 13:27:04 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000