ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVideoToVideoFilter.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 itkVideoToVideoFilter_h
19 #define itkVideoToVideoFilter_h
20 
21 #include "itkVideoSource.h"
22 #include "itkVideoStream.h"
23 
24 namespace itk
25 {
26 
43 template< typename TInputVideoStream, typename TOutputVideoStream >
44 class ITK_TEMPLATE_EXPORT VideoToVideoFilter : public VideoSource< TOutputVideoStream >
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(VideoToVideoFilter);
48 
50  using InputVideoStreamType = TInputVideoStream;
51  using OutputVideoStreamType = TOutputVideoStream;
58 
60  using OutputFrameType = typename Superclass::OutputFrameType;
61  using OutputFrameSpatialRegionType = 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  itkTypeMacro(VideoToVideoFilter, VideoSource);
77 
79  using Superclass::SetInput;
80  virtual void SetInput( const InputVideoStreamType* videoStream);
81 
82  virtual void SetInput( unsigned int idx, const InputVideoStreamType* videoStream);
83 
85  const InputVideoStreamType* GetInput() const;
86 
87  const InputVideoStreamType* GetInput(unsigned int idx) const;
88 
95  void UpdateOutputInformation() override;
96 
97 protected:
98 
102  InputVideoStreamType* GetInput();
103 
104  InputVideoStreamType* GetInput(unsigned int idx);
105 
110  void GenerateOutputRequestedRegion(DataObject* output) override;
111 
117  void GenerateInputRequestedRegion() override;
118 
122  void BeforeTemporalStreamingGenerateData() override;
123 
125  ~VideoToVideoFilter() override = default;
126 
127  void PrintSelf(std::ostream & os, Indent indent) const override;
128 
129 private:
130 
131 }; // end class VideoToVideoFilter
132 
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkVideoToVideoFilter.hxx"
137 #endif
138 
139 #endif
Light weight base class for most itk classes.
typename InputVideoStreamType::SpacingType InputFrameSpacingType
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
typename InputVideoStreamType::SizeType InputFrameSizeType
typename InputVideoStreamType::FrameType InputFrameType
Implements a weak reference to an object.
A TemporalProcessObject that produces a VideoStream.
typename OutputVideoStreamType::FrameType OutputFrameType
typename InputVideoStreamType::IndexType InputFrameIndexType
typename InputVideoStreamType::PixelType InputFramePixelType
typename InputVideoStreamType::PointType InputFramePointType
Base class for filters that use a VideoStream as input and output.
typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType
typename InputVideoStreamType::DirectionType InputFrameDirectionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all data objects in ITK.