00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00075 typedef ImageRegionSplitter<itkGetStaticConstMacro(InputImageDimension)>
00076 SplitterType;
00077 typedef typename SplitterType::Pointer RegionSplitterPointer;
00078
00081 itkSetMacro(NumberOfStreamDivisions,unsigned int);
00082
00085 itkGetConstReferenceMacro(NumberOfStreamDivisions,unsigned int);
00086
00088 itkSetObjectMacro(RegionSplitter, SplitterType);
00089
00091 itkGetObjectMacro(RegionSplitter, SplitterType);
00092
00098 virtual void UpdateOutputData(DataObject *output);
00099
00100 protected:
00101 StreamingImageFilter();
00102 ~StreamingImageFilter();
00103 void PrintSelf(std::ostream& os, Indent indent) const;
00104
00105 private:
00106 StreamingImageFilter(const StreamingImageFilter&);
00107 void operator=(const StreamingImageFilter&);
00108
00109 unsigned int m_NumberOfStreamDivisions;
00110 RegionSplitterPointer m_RegionSplitter;
00111 };
00112
00113 }
00114
00115 #ifndef ITK_MANUAL_INSTANTIATION
00116 #include "itkStreamingImageFilter.txx"
00117 #endif
00118
00119 #endif