ITK  6.0.0
Insight Toolkit
itkImageToVideoFilter.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 itkImageToVideoFilter_h
19#define itkImageToVideoFilter_h
20
21#include "itkImage.h"
22#include "itkVideoSource.h"
23#include "itkVideoStream.h"
24#include "itkTemporalRegion.h"
25#include "itkMacro.h"
26
27namespace itk
28{
29
50template <typename TInputImage,
51 typename TOutputVideoStream =
52 VideoStream<Image<typename TInputImage::PixelType, TInputImage::ImageDimension - 1>>>
53class ITK_TEMPLATE_EXPORT ImageToVideoFilter : public VideoSource<TOutputVideoStream>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(ImageToVideoFilter);
57
59 using InputImageType = TInputImage;
60 using OutputVideoStreamType = TOutputVideoStream;
66
70 using OutputTemporalRegionType = typename TOutputVideoStream::TemporalRegionType;
71
76 using InputImagePixelType = typename InputImageType::PixelType;
78 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
79
80 itkNewMacro(Self);
81
83 itkOverrideGetNameOfClassMacro(ImageToVideoFilter);
84
86 using Superclass::SetInput;
87 virtual void
88 SetInput(const InputImageType * image);
89
90 virtual void
91 SetInput(unsigned int idx, const InputImageType * videoStream);
92
94 const InputImageType *
95 GetInput() const;
96
97 const InputImageType *
98 GetInput(unsigned int idx) const;
99
102 itkGetMacro(FrameAxis, IndexValueType);
103 itkSetMacro(FrameAxis, IndexValueType);
106protected:
108 ~ImageToVideoFilter() override = default;
109
110 void
111 PrintSelf(std::ostream & os, Indent indent) const override;
112
118
120 GetInput(unsigned int idx);
121
125 void
127
132 void
134
138 void
140
144 void
146
148 void
149 GenerateData() override;
150
151private:
156 IndexValueType m_FrameAxis{ TInputImage::ImageDimension - 1 };
157
158}; // end class ImageToVideoFilter
159
160} // end namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkImageToVideoFilter.hxx"
164#endif
165
166#endif // itkImageToVideoFilter_h
Base class for all data objects in ITK.
Converts Image to VideoStream representation with a temporal axis.
void GenerateData() override
void UpdateOutputInformation() override
typename Superclass::OutputFrameType OutputFrameType
const InputImageType * GetInput() const
~ImageToVideoFilter() override=default
typename InputImageType::IndexType InputImageIndexType
const InputImageType * GetInput(unsigned int idx) const
typename Superclass::OutputFrameSpatialRegionType OutputFrameSpatialRegionType
void GenerateOutputInformation() override
InputImageType * GetInput()
typename TOutputVideoStream::TemporalRegionType OutputTemporalRegionType
void GenerateInputRequestedRegion() override
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::ConstPointer InputImageConstPointer
InputImageType * GetInput(unsigned int idx)
TOutputVideoStream OutputVideoStreamType
virtual void SetInput(unsigned int idx, const InputImageType *videoStream)
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
virtual void SetInput(const InputImageType *image)
void GenerateOutputRequestedRegion(DataObject *output) override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A TemporalProcessObject that produces a VideoStream.
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
typename OutputVideoStreamType::FrameType OutputFrameType
Implements a weak reference to an object.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
long IndexValueType
Definition: itkIntTypes.h:93