ITK  6.0.0
Insight Toolkit
itkVideoFileWriter.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
19#ifndef itkVideoFileWriter_h
20#define itkVideoFileWriter_h
21
23#include "itkVideoIOFactory.h"
24
25namespace itk
26{
27
39template <typename TInputVideoStream>
40class ITK_TEMPLATE_EXPORT VideoFileWriter : public TemporalProcessObject
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(VideoFileWriter);
44
49
54
55 using VideoStreamType = TInputVideoStream;
57 using FrameType = typename VideoStreamType::FrameType;
58 using PixelType = typename FrameType::PixelType;
59
61 itkNewMacro(Self);
62
64 itkOverrideGetNameOfClassMacro(VideoFileWriter);
65
66
68 itkSetStringMacro(FileName);
69 itkGetStringMacro(FileName);
73 itkSetMacro(FramesPerSecond, TemporalRatioType);
74 itkGetMacro(FramesPerSecond, TemporalRatioType);
81 itkSetStringMacro(FourCC);
82 itkGetStringMacro(FourCC);
86 itkSetMacro(OutputTemporalRegion, TemporalRegion);
87 itkGetMacro(OutputTemporalRegion, TemporalRegion);
91 using Superclass::SetInput;
92 void
93 SetInput(const VideoStreamType * input);
94 const VideoStreamType *
99 void
101
105 void
107
109 void
111
114 void
115 Update() override;
116
119 void
121
122protected:
125 void
126 PrintSelf(std::ostream & os, Indent indent) const override;
127
129 bool
131
135 bool
137
139 void
141
142private:
144 std::string m_FileName{};
145
147 IOBasePointer m_VideoIO{};
148
150 TemporalRegion m_OutputTemporalRegion{};
151
153 TemporalRatioType m_FramesPerSecond{ 24 };
154 std::string m_FourCC{};
155 std::vector<SizeValueType> m_Dimensions{};
156 SizeValueType m_NumberOfComponents{ 0 };
157 IOComponentEnum m_ComponentType{};
158};
159
160} // end namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkVideoFileWriter.hxx"
164#endif
165
166#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
TemporalProcessObject implements a ProcessObject for the itk pipeline with the notion of a temporal r...
Region subclass that holds a region in time.
Writer that takes in a VideoStream and writes the frames to a file.
typename IOBaseType::TemporalRatioType TemporalRatioType
typename IOBaseType::SizeValueType SizeValueType
void SetVideoIO(IOBasePointer videoIO)
typename VideoIOBase::Pointer IOBasePointer
~VideoFileWriter() override
bool InitializeOutputParameters()
void SetInput(const VideoStreamType *input)
typename VideoStreamType::Pointer VideoStreamPointer
void UpdateLargestPossibleRegion() override
void Update() override
TInputVideoStream VideoStreamType
void PrintSelf(std::ostream &os, Indent indent) const override
typename FrameType::PixelType PixelType
const VideoStreamType * GetInput()
typename VideoStreamType::FrameType FrameType
void TemporalStreamingGenerateData() override
Abstract superclass defines video IO interface.
SmartPointer< Self > Pointer
double TemporalRatioType
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86