ITK  6.0.0
Insight Toolkit
itkFrameAverageVideoFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 
35 template <typename TInputVideoStream, typename TOutputVideoStream>
36 class ITK_TEMPLATE_EXPORT FrameAverageVideoFilter : public VideoToVideoFilter<TInputVideoStream, TOutputVideoStream>
37 {
38 public:
39  ITK_DISALLOW_COPY_AND_MOVE(FrameAverageVideoFilter);
40 
42  using InputVideoStreamType = TInputVideoStream;
43  using OutputVideoStreamType = TOutputVideoStream;
49 
50  using InputFrameType = typename TInputVideoStream::FrameType;
51  using InputPixelType = typename InputFrameType::PixelType;
53  using OutputFrameType = typename TOutputVideoStream::FrameType;
54  using OutputPixelType = typename OutputFrameType::PixelType;
56 
57  itkNewMacro(Self);
58 
59  itkOverrideGetNameOfClassMacro(FrameAverageVideoFilter);
60 
62  void
63  SetNumberOfFrames(SizeValueType numFrames);
65  GetNumberOfFrames();
68 protected:
71  ~FrameAverageVideoFilter() override = default;
75  void
76  PrintSelf(std::ostream & os, Indent indent) const override;
77 
80  void
81  ThreadedGenerateData(const OutputFrameSpatialRegionType & outputRegionForThread, int threadId) override;
82 
83 private:
84 }; // end class FrameAverageVideoFilter
85 
86 } // end namespace itk
87 
88 #ifndef ITK_MANUAL_INSTANTIATION
89 # include "itkFrameAverageVideoFilter.hxx"
90 #endif
91 
92 #endif
itk::VideoToVideoFilter::InputFrameSpatialRegionType
typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType
Definition: itkVideoToVideoFilter.h:65
itk::VideoToVideoFilter
Base class for filters that use a VideoStream as input and output.
Definition: itkVideoToVideoFilter.h:45
itkVideoToVideoFilter.h
itk::FrameAverageVideoFilter::InputPixelType
typename InputFrameType::PixelType InputPixelType
Definition: itkFrameAverageVideoFilter.h:51
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::FrameAverageVideoFilter
Average frames over a designated range in a video.
Definition: itkFrameAverageVideoFilter.h:36
itk::VideoSource::OutputFrameSpatialRegionType
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
Definition: itkVideoSource.h:60
itk::WeakPointer
Implements a weak reference to an object.
Definition: itkWeakPointer.h:44
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::VideoSource::OutputVideoStreamType
TOutputVideoStream OutputVideoStreamType
Definition: itkVideoSource.h:57
itk::VideoToVideoFilter::InputVideoStreamType
TInputVideoStream InputVideoStreamType
Definition: itkVideoToVideoFilter.h:51
itk::VideoToVideoFilter::InputFrameType
typename InputVideoStreamType::FrameType InputFrameType
Definition: itkVideoToVideoFilter.h:64
itk::FrameAverageVideoFilter::OutputPixelType
typename OutputFrameType::PixelType OutputPixelType
Definition: itkFrameAverageVideoFilter.h:54
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86
itk::VideoSource::OutputFrameType
typename OutputVideoStreamType::FrameType OutputFrameType
Definition: itkVideoSource.h:59