ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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
73 using InputImagePointer = typename InputImageType::Pointer;
74 using InputImageConstPointer = typename InputImageType::ConstPointer;
75 using InputImageRegionType = typename InputImageType::RegionType;
76 using InputImagePixelType = typename InputImageType::PixelType;
77 using InputImageIndexType = typename InputImageType::IndexType;
78 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
79
80 itkNewMacro(Self);
81
83 itkOverrideGetNameOfClassMacro(ImageToVideoFilter);
84
87 virtual void
88 SetInput(const InputImageType * image);
89
90 virtual void
91 SetInput(unsigned int idx, const InputImageType * image);
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);
105
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.
void GenerateData() override
void UpdateOutputInformation() override
const InputImageType * GetInput() const
~ImageToVideoFilter() override=default
virtual void SetInput(unsigned int idx, const InputImageType *image)
const InputImageType * GetInput(unsigned int idx) const
typename Superclass::OutputFrameSpatialRegionType OutputFrameSpatialRegionType
void GenerateOutputInformation() override
InputImageType * GetInput()
typename OutputVideoStreamType::TemporalRegionType OutputTemporalRegionType
void GenerateInputRequestedRegion() override
void PrintSelf(std::ostream &os, Indent indent) const override
InputImageType * GetInput(unsigned int idx)
TOutputVideoStream OutputVideoStreamType
ImageToVideoFilter< InputImageType, OutputVideoStreamType > Self
virtual void SetInput(const InputImageType *image)
void GenerateOutputRequestedRegion(DataObject *output) override
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
Implements transparent reference counting.
A TemporalProcessObject that produces a VideoStream.
typename OutputVideoStreamType::SpatialRegionType OutputFrameSpatialRegionType
typename OutputVideoStreamType::FrameType OutputFrameType
A DataObject that holds a buffered portion of a video.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
long IndexValueType
Definition itkIntTypes.h:93