ITK  6.0.0
Insight Toolkit
itkVideoToVideoFilter.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 itkVideoToVideoFilter_h
19 #define itkVideoToVideoFilter_h
20 
21 #include "itkVideoSource.h"
22 #include "itkVideoStream.h"
23 
24 namespace itk
25 {
26 
44 template <typename TInputVideoStream, typename TOutputVideoStream>
45 class ITK_TEMPLATE_EXPORT VideoToVideoFilter : public VideoSource<TOutputVideoStream>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(VideoToVideoFilter);
49 
51  using InputVideoStreamType = TInputVideoStream;
52  using OutputVideoStreamType = TOutputVideoStream;
58 
60  using typename Superclass::OutputFrameType;
61  using typename Superclass::OutputFrameSpatialRegionType;
62 
64  using InputFrameType = typename InputVideoStreamType::FrameType;
65  using InputFrameSpatialRegionType = typename InputVideoStreamType::SpatialRegionType;
67  using InputFramePixelType = typename InputVideoStreamType::PixelType;
69  using InputFrameSpacingType = typename InputVideoStreamType::SpacingType;
72 
73  itkNewMacro(Self);
74 
76  itkOverrideGetNameOfClassMacro(VideoToVideoFilter);
77 
79  using Superclass::SetInput;
80  virtual void
81  SetInput(const InputVideoStreamType * videoStream);
82 
83  virtual void
84  SetInput(unsigned int idx, const InputVideoStreamType * videoStream);
85 
87  const InputVideoStreamType *
88  GetInput() const;
89 
90  const InputVideoStreamType *
91  GetInput(unsigned int idx) const;
92 
99  void
100  UpdateOutputInformation() override;
101 
102 protected:
107  GetInput();
108 
110  GetInput(unsigned int idx);
111 
116  void
117  GenerateOutputRequestedRegion(DataObject * output) override;
118 
124  void
125  GenerateInputRequestedRegion() override;
126 
130  void
131  BeforeTemporalStreamingGenerateData() override;
132 
134  ~VideoToVideoFilter() override = default;
135 
136  void
137  PrintSelf(std::ostream & os, Indent indent) const override;
138 
139 private:
140 }; // end class VideoToVideoFilter
141 
142 } // end namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 # include "itkVideoToVideoFilter.hxx"
146 #endif
147 
148 #endif
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameSpatialRegionType
typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType
Definition: itkVideoToVideoFilter.h:65
itk::GTest::TypedefsAndConstructors::Dimension2::DirectionType
ImageBaseType::DirectionType DirectionType
Definition: itkGTestTypedefsAndConstructors.h:52
itkVideoStream.h
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameDirectionType
typename InputVideoStreamType::DirectionType InputFrameDirectionType
Definition: itkVideoToVideoFilter.h:71
itk::VideoToVideoFilter
Base class for filters that use a VideoStream as input and output.
Definition: itkVideoToVideoFilter.h:45
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFramePixelType
typename InputVideoStreamType::PixelType InputFramePixelType
Definition: itkVideoToVideoFilter.h:67
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameSizeType
typename InputVideoStreamType::SizeType InputFrameSizeType
Definition: itkVideoToVideoFilter.h:70
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFramePointType
typename InputVideoStreamType::PointType InputFramePointType
Definition: itkVideoToVideoFilter.h:68
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameIndexType
typename InputVideoStreamType::IndexType InputFrameIndexType
Definition: itkVideoToVideoFilter.h:66
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< TVideoStream >::OutputVideoStreamType
TVideoStream OutputVideoStreamType
Definition: itkVideoSource.h:57
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputVideoStreamType
TVideoStream InputVideoStreamType
Definition: itkVideoToVideoFilter.h:51
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameType
typename InputVideoStreamType::FrameType InputFrameType
Definition: itkVideoToVideoFilter.h:64
itkVideoSource.h
itk::VideoToVideoFilter< TVideoStream, TVideoStream >::InputFrameSpacingType
typename InputVideoStreamType::SpacingType InputFrameSpacingType
Definition: itkVideoToVideoFilter.h:69
itk::VideoSource
A TemporalProcessObject that produces a VideoStream.
Definition: itkVideoSource.h:44
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293