ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkImageFilterToVideoFilterWrapper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkImageFilterToVideoFilterWrapper_h
00019 #define __itkImageFilterToVideoFilterWrapper_h
00020 
00021 #include "itkVideoToVideoFilter.h"
00022 
00023 namespace itk
00024 {
00025 
00038 template<class TImageToImageFilter>
00039 class ITK_EXPORT ImageFilterToVideoFilterWrapper :
00040   public VideoToVideoFilter<
00041           itk::VideoStream<typename TImageToImageFilter::InputImageType>,
00042           itk::VideoStream<typename TImageToImageFilter::OutputImageType> >
00043 {
00044 public:
00045 
00047   typedef TImageToImageFilter                                ImageFilterType;
00048   typedef typename ImageFilterType::InputImageType           InputFrameType;
00049   typedef typename ImageFilterType::OutputImageType          OutputFrameType;
00050   typedef itk::VideoStream< InputFrameType >                 InputVideoStreamType;
00051   typedef itk::VideoStream< OutputFrameType >                OutputVideoStreamType;
00052 
00053   typedef ImageFilterToVideoFilterWrapper< ImageFilterType > Self;
00054   typedef VideoToVideoFilter< InputVideoStreamType,
00055                               OutputVideoStreamType >        Superclass;
00056   typedef SmartPointer< Self >                               Pointer;
00057   typedef SmartPointer< const Self >                         ConstPointer;
00058   typedef WeakPointer< const Self >                          ConstWeakPointer;
00059 
00060   itkNewMacro(Self);
00061 
00062   itkTypeMacro(ImageFilterToVideoFilterWrapper, VideoToVideoFilter);
00063 
00065   itkSetObjectMacro(ImageFilter, ImageFilterType);
00066   itkGetObjectMacro(ImageFilter, ImageFilterType);
00068 
00069 protected:
00070 
00072   ImageFilterToVideoFilterWrapper();
00073   virtual ~ImageFilterToVideoFilterWrapper() {}
00074 
00076   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00077 
00080   virtual void TemporalStreamingGenerateData();
00081 
00083   typename ImageFilterType::Pointer m_ImageFilter;
00084 
00085 private:
00086   ImageFilterToVideoFilterWrapper(const Self &); // purposely not implemented
00087   void operator=(const Self &);            // purposely not implemented
00088 
00089 
00090 };  // end class ImageFilterToVideoFilterWrapper
00091 
00092 } // end namespace itk
00093 
00094 #if ITK_TEMPLATE_TXX
00095 #include "itkImageFilterToVideoFilterWrapper.hxx"
00096 #endif
00097 
00098 #endif
00099