ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkFrameAverageVideoFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkFrameAverageVideoFilter_h
19 #define __itkFrameAverageVideoFilter_h
20 
21 #include "itkVideoToVideoFilter.h"
22 
23 namespace itk
24 {
25 
34 template<class TInputVideoStream, class TOutputVideoStream>
35 class ITK_EXPORT FrameAverageVideoFilter :
36  public VideoToVideoFilter<TInputVideoStream, TOutputVideoStream>
37 {
38 public:
39 
41  typedef TInputVideoStream InputVideoStreamType;
42  typedef TOutputVideoStream OutputVideoStreamType;
50 
51  typedef typename TInputVideoStream::FrameType InputFrameType;
52  typedef typename InputFrameType::PixelType InputPixelType;
53  typedef typename InputFrameType::RegionType InputFrameSpatialRegionType;
54  typedef typename TOutputVideoStream::FrameType OutputFrameType;
55  typedef typename OutputFrameType::PixelType OutputPixelType;
56  typedef typename OutputFrameType::RegionType OutputFrameSpatialRegionType;
57 
58  itkNewMacro(Self);
59 
61 
63  void SetNumberOfFrames(SizeValueType numFrames);
64  SizeValueType GetNumberOfFrames();
66 
67 protected:
68 
72 
74  virtual void PrintSelf(std::ostream & os, Indent indent) const;
75 
78  virtual void ThreadedGenerateData(
79  const OutputFrameSpatialRegionType& outputRegionForThread,
80  int threadId);
81 
82 private:
83  FrameAverageVideoFilter(const Self &); // purposely not implemented
84  void operator=(const Self &); // purposely not implemented
85 
86 
87 }; // end class FrameAverageVideoFilter
88 
89 } // end namespace itk
90 
91 #if ITK_TEMPLATE_TXX
92 #include "itkFrameAverageVideoFilter.hxx"
93 #endif
94 
95 #endif
96