ITK  4.13.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<typename TInputVideoStream, typename TOutputVideoStream>
35 class ITK_TEMPLATE_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 
71  virtual ~FrameAverageVideoFilter() ITK_OVERRIDE {}
72 
74  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
75 
78  virtual void ThreadedGenerateData(
79  const OutputFrameSpatialRegionType& outputRegionForThread,
80  int threadId) ITK_OVERRIDE;
81 
82 private:
83  ITK_DISALLOW_COPY_AND_ASSIGN(FrameAverageVideoFilter);
84 
85 
86 }; // end class FrameAverageVideoFilter
87 
88 } // end namespace itk
89 
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "itkFrameAverageVideoFilter.hxx"
92 #endif
93 
94 #endif
Light weight base class for most itk classes.
OutputFrameType::RegionType OutputFrameSpatialRegionType
Average frames over a designated range in a video.
Implements a weak reference to an object.
FrameAverageVideoFilter< InputVideoStreamType, OutputVideoStreamType > Self
unsigned long SizeValueType
Definition: itkIntTypes.h:143
TOutputVideoStream OutputVideoStreamType
VideoToVideoFilter< InputVideoStreamType, OutputVideoStreamType > Superclass
InputFrameType::PixelType InputPixelType
TOutputVideoStream::FrameType OutputFrameType
InputFrameType::RegionType InputFrameSpatialRegionType
OutputFrameType::PixelType OutputPixelType
WeakPointer< const Self > ConstWeakPointer
SmartPointer< const Self > ConstPointer
Base class for filters that use a VideoStream as input and output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TInputVideoStream::FrameType InputFrameType
TInputVideoStream InputVideoStreamType