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

itkStreamingImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkStreamingImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006-03-23 15:24:22 $
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 __itkStreamingImageFilter_h
00018 #define __itkStreamingImageFilter_h
00019 
00020 #include "itkImageSource.h"
00021 #include "itkImageToImageFilter.h"
00022 #include "itkImageRegionSplitter.h"
00023 
00024 namespace itk
00025 {
00026 
00043 template <class TInputImage, class TOutputImage>
00044 class ITK_EXPORT StreamingImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
00045 {
00046 public:
00048   typedef StreamingImageFilter  Self;
00049   typedef ImageToImageFilter<TInputImage, TOutputImage>  Superclass;
00050   typedef SmartPointer<Self>  Pointer;
00051   typedef SmartPointer<const Self>  ConstPointer;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(StreamingImageFilter,ImageToImageFilter);
00058 
00060   typedef TInputImage InputImageType;
00061   typedef typename InputImageType::Pointer InputImagePointer;
00062   typedef typename InputImageType::RegionType InputImageRegionType; 
00063   typedef typename InputImageType::PixelType InputImagePixelType; 
00064   typedef TOutputImage OutputImageType;
00065   typedef typename OutputImageType::Pointer OutputImagePointer;
00066   typedef typename OutputImageType::RegionType OutputImageRegionType; 
00067   typedef typename OutputImageType::PixelType OutputImagePixelType; 
00068   typedef typename Superclass::DataObjectPointer DataObjectPointer;
00069 
00071   itkStaticConstMacro(InputImageDimension, unsigned int,
00072                       InputImageType::ImageDimension);
00073   itkStaticConstMacro(OutputImageDimension, unsigned int,
00074                       OutputImageType::ImageDimension);
00076 
00078   typedef ImageRegionSplitter<itkGetStaticConstMacro(InputImageDimension)>
00079   SplitterType;
00080   typedef typename SplitterType::Pointer RegionSplitterPointer;
00081 
00084   itkSetMacro(NumberOfStreamDivisions,unsigned int);
00085 
00088   itkGetConstReferenceMacro(NumberOfStreamDivisions,unsigned int);
00089 
00091   itkSetObjectMacro(RegionSplitter, SplitterType);
00092 
00094   itkGetObjectMacro(RegionSplitter, SplitterType);
00095 
00101   virtual void UpdateOutputData(DataObject *output);
00102 
00103 #ifdef ITK_USE_CONCEPT_CHECKING
00104 
00105   itkConceptMacro(SameDimensionCheck,
00106     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00107   itkConceptMacro(InputConvertibleToOutputCheck,
00108     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00109 
00111 #endif
00112 
00113 protected:
00114   StreamingImageFilter();
00115   ~StreamingImageFilter();
00116   void PrintSelf(std::ostream& os, Indent indent) const;
00117 
00118 private:
00119   StreamingImageFilter(const StreamingImageFilter&); //purposely not implemented
00120   void operator=(const StreamingImageFilter&); //purposely not implemented
00121 
00122   unsigned int m_NumberOfStreamDivisions;
00123   RegionSplitterPointer m_RegionSplitter;
00124 };
00125 
00126 } // end namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkStreamingImageFilter.txx"
00130 #endif
00131 
00132 #endif
00133 

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