ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFrameDifferenceVideoFilter.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 itkFrameDifferenceVideoFilter_h
19 #define itkFrameDifferenceVideoFilter_h
20 
21 #include "itkVideoToVideoFilter.h"
22 
23 namespace itk
24 {
25 
35 template<typename TInputVideoStream, typename TOutputVideoStream>
36 class ITK_TEMPLATE_EXPORT FrameDifferenceVideoFilter :
37  public VideoToVideoFilter<TInputVideoStream, TOutputVideoStream>
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(FrameDifferenceVideoFilter);
41 
43  using InputVideoStreamType = TInputVideoStream;
44  using OutputVideoStreamType = TOutputVideoStream;
52 
53  using InputFrameType = typename TInputVideoStream::FrameType;
54  using InputPixelType = typename InputFrameType::PixelType;
56  using OutputFrameType = typename TOutputVideoStream::FrameType;
57  using OutputPixelType = typename OutputFrameType::PixelType;
59 
60  itkNewMacro(Self);
61 
63 
65  void SetFrameOffset(SizeValueType numFrames);
66  SizeValueType GetFrameOffset();
68 
69 protected:
70 
73  ~FrameDifferenceVideoFilter() override = default;
75 
77  void PrintSelf(std::ostream & os, Indent indent) const override;
78 
81  void ThreadedGenerateData(
82  const OutputFrameSpatialRegionType& outputRegionForThread,
83  int threadId) override;
84 
85 private:
86 
87 }; // end class FrameDifferenceVideoFilter
88 
89 } // end namespace itk
90 
91 #ifndef ITK_MANUAL_INSTANTIATION
92 #include "itkFrameDifferenceVideoFilter.hxx"
93 #endif
94 
95 #endif
Light weight base class for most itk classes.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
typename InputVideoStreamType::FrameType InputFrameType
Implements a weak reference to an object.
TOutputVideoStream OutputVideoStreamType
typename OutputVideoStreamType::FrameType OutputFrameType
Compute the squared intensity difference between frame x and frame x+n.
typename InputFrameType::PixelType InputPixelType
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
typename OutputFrameType::PixelType OutputPixelType
TInputVideoStream InputVideoStreamType