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