ITK  5.2.0
Insight Toolkit
itkFrameDifferenceVideoFilter.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  * 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 itkFrameDifferenceVideoFilter_h
19 #define itkFrameDifferenceVideoFilter_h
20 
21 #include "itkVideoToVideoFilter.h"
22 
23 namespace itk
24 {
25 
36 template <typename TInputVideoStream, typename TOutputVideoStream>
37 class ITK_TEMPLATE_EXPORT FrameDifferenceVideoFilter : public VideoToVideoFilter<TInputVideoStream, TOutputVideoStream>
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(FrameDifferenceVideoFilter);
41 
43  using InputVideoStreamType = TInputVideoStream;
44  using OutputVideoStreamType = TOutputVideoStream;
50 
51  using InputFrameType = typename TInputVideoStream::FrameType;
52  using InputPixelType = typename InputFrameType::PixelType;
54  using OutputFrameType = typename TOutputVideoStream::FrameType;
55  using OutputPixelType = typename OutputFrameType::PixelType;
57 
58  itkNewMacro(Self);
59 
61 
63  void
64  SetFrameOffset(SizeValueType numFrames);
66  GetFrameOffset();
68 
69 protected:
72  ~FrameDifferenceVideoFilter() override = default;
74 
76  void
77  PrintSelf(std::ostream & os, Indent indent) const override;
78 
81  void
82  ThreadedGenerateData(const OutputFrameSpatialRegionType & outputRegionForThread, int threadId) override;
83 
84 private:
85 }; // end class FrameDifferenceVideoFilter
86 
87 } // end namespace itk
88 
89 #ifndef ITK_MANUAL_INSTANTIATION
90 # include "itkFrameDifferenceVideoFilter.hxx"
91 #endif
92 
93 #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::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:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::VideoSource::OutputFrameSpatialRegionType
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
Definition: itkVideoSource.h:60
itk::FrameDifferenceVideoFilter::InputPixelType
typename InputFrameType::PixelType InputPixelType
Definition: itkFrameDifferenceVideoFilter.h:52
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: itkAnnulusOperator.h:24
itk::FrameDifferenceVideoFilter
Compute the squared intensity difference between frame x and frame x+n.
Definition: itkFrameDifferenceVideoFilter.h:37
itk::VideoSource::OutputVideoStreamType
TOutputVideoStream OutputVideoStreamType
Definition: itkVideoSource.h:57
itk::FrameDifferenceVideoFilter::OutputPixelType
typename OutputFrameType::PixelType OutputPixelType
Definition: itkFrameDifferenceVideoFilter.h:55
itk::VideoToVideoFilter::InputVideoStreamType
TInputVideoStream InputVideoStreamType
Definition: itkVideoToVideoFilter.h:51
itk::VideoToVideoFilter::InputFrameType
typename InputVideoStreamType::FrameType InputFrameType
Definition: itkVideoToVideoFilter.h:64
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::VideoSource::OutputFrameType
typename OutputVideoStreamType::FrameType OutputFrameType
Definition: itkVideoSource.h:59