ITK  4.13.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 
42  typedef TInputVideoStream InputVideoStreamType;
43  typedef TOutputVideoStream OutputVideoStreamType;
51 
52  typedef typename TInputVideoStream::FrameType InputFrameType;
53  typedef typename InputFrameType::PixelType InputPixelType;
54  typedef typename InputFrameType::RegionType InputFrameSpatialRegionType;
55  typedef typename TOutputVideoStream::FrameType OutputFrameType;
56  typedef typename OutputFrameType::PixelType OutputPixelType;
57  typedef typename OutputFrameType::RegionType OutputFrameSpatialRegionType;
58 
59  itkNewMacro(Self);
60 
62 
64  void SetFrameOffset(SizeValueType numFrames);
65  SizeValueType GetFrameOffset();
67 
68 protected:
69 
72  virtual ~FrameDifferenceVideoFilter() ITK_OVERRIDE {}
73 
75  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
76 
79  virtual void ThreadedGenerateData(
80  const OutputFrameSpatialRegionType& outputRegionForThread,
81  int threadId) ITK_OVERRIDE;
82 
83 private:
84  ITK_DISALLOW_COPY_AND_ASSIGN(FrameDifferenceVideoFilter);
85 
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.
TInputVideoStream::FrameType InputFrameType
TOutputVideoStream::FrameType OutputFrameType
Implements a weak reference to an object.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
OutputFrameType::RegionType OutputFrameSpatialRegionType
TOutputVideoStream OutputVideoStreamType
Compute the squared intensity difference between frame x and frame x+n.
Base class for filters that use a VideoStream as input and output.
FrameDifferenceVideoFilter< InputVideoStreamType, OutputVideoStreamType > Self
VideoToVideoFilter< InputVideoStreamType, OutputVideoStreamType > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InputFrameType::RegionType InputFrameSpatialRegionType
TInputVideoStream InputVideoStreamType