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