ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFrameAverageVideoFilter.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 __itkFrameAverageVideoFilter_h
00019 #define __itkFrameAverageVideoFilter_h
00020 
00021 #include "itkVideoToVideoFilter.h"
00022 
00023 namespace itk
00024 {
00025 
00034 template<class TInputVideoStream, class TOutputVideoStream>
00035 class ITK_EXPORT FrameAverageVideoFilter :
00036   public VideoToVideoFilter<TInputVideoStream, TOutputVideoStream>
00037 {
00038 public:
00039 
00041   typedef TInputVideoStream                                InputVideoStreamType;
00042   typedef TOutputVideoStream                               OutputVideoStreamType;
00043   typedef FrameAverageVideoFilter< InputVideoStreamType,
00044                                    OutputVideoStreamType > Self;
00045   typedef VideoToVideoFilter< InputVideoStreamType,
00046                               OutputVideoStreamType >      Superclass;
00047   typedef SmartPointer< Self >                             Pointer;
00048   typedef SmartPointer< const Self >                       ConstPointer;
00049   typedef WeakPointer< const Self >                        ConstWeakPointer;
00050 
00051   typedef typename TInputVideoStream::FrameType  InputFrameType;
00052   typedef typename InputFrameType::PixelType     InputPixelType;
00053   typedef typename InputFrameType::RegionType    InputFrameSpatialRegionType;
00054   typedef typename TOutputVideoStream::FrameType OutputFrameType;
00055   typedef typename OutputFrameType::PixelType    OutputPixelType;
00056   typedef typename OutputFrameType::RegionType   OutputFrameSpatialRegionType;
00057 
00058   itkNewMacro(Self);
00059 
00060   itkTypeMacro(FrameAverageVideoFilter, VideoToVideoFilter);
00061 
00063   void SetNumberOfFrames(SizeValueType numFrames);
00064   SizeValueType GetNumberOfFrames();
00066 
00067 protected:
00068 
00070   FrameAverageVideoFilter();
00071   virtual ~FrameAverageVideoFilter() {}
00072 
00074   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00075 
00078   virtual void ThreadedGenerateData(
00079                 const OutputFrameSpatialRegionType& outputRegionForThread,
00080                 int threadId);
00081 
00082 private:
00083   FrameAverageVideoFilter(const Self &);  // purposely not implemented
00084   void operator=(const Self &);           // purposely not implemented
00085 
00086 
00087 };  // end class FrameAverageVideoFilter
00088 
00089 } // end namespace itk
00090 
00091 #if ITK_TEMPLATE_TXX
00092 #include "itkFrameAverageVideoFilter.hxx"
00093 #endif
00094 
00095 #endif
00096