ITK  5.0.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  ITK_DISALLOW_COPY_AND_ASSIGN(FrameAverageVideoFilter);
40 
42  using InputVideoStreamType = TInputVideoStream;
43  using OutputVideoStreamType = TOutputVideoStream;
51 
52  using InputFrameType = typename TInputVideoStream::FrameType;
53  using InputPixelType = typename InputFrameType::PixelType;
55  using OutputFrameType = typename TOutputVideoStream::FrameType;
56  using OutputPixelType = typename OutputFrameType::PixelType;
58 
59  itkNewMacro(Self);
60 
62 
64  void SetNumberOfFrames(SizeValueType numFrames);
65  SizeValueType GetNumberOfFrames();
67 
68 protected:
69 
72  ~FrameAverageVideoFilter() override = default;
74 
76  void PrintSelf(std::ostream & os, Indent indent) const override;
77 
80  void ThreadedGenerateData(
81  const OutputFrameSpatialRegionType& outputRegionForThread,
82  int threadId) override;
83 
84 private:
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.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
Average frames over a designated range in a video.
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
typename InputVideoStreamType::FrameType InputFrameType
Implements a weak reference to an object.
TOutputVideoStream OutputVideoStreamType
typename OutputVideoStreamType::FrameType OutputFrameType
typename OutputFrameType::PixelType OutputPixelType
Base class for filters that use a VideoStream as input and output.
typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TInputVideoStream InputVideoStreamType
typename InputFrameType::PixelType InputPixelType