ITK  6.0.0
Insight Toolkit
itkFileListVideoIO.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 itkFileListVideoIO_h
19#define itkFileListVideoIO_h
20
21#include "itkVideoIOBase.h"
22#include "ITKVideoIOExport.h"
23
24namespace itk
25{
40class ITKVideoIO_EXPORT FileListVideoIO : public VideoIOBase
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(FileListVideoIO);
44
50
52 itkNewMacro(Self);
53
55 itkOverrideGetNameOfClassMacro(FileListVideoIO);
56
58 itkGetConstObjectMacro(ImageIO, ImageIOBase);
59
61 itkGetConstMacro(FileNames, std::vector<std::string>);
62
64 void
65 SetFileName(const std::string & fileList) override;
66 void
67 SetFileName(const char * fileList) override;
71 void
73
77 static std::vector<std::string>
78 SplitFileNames(const std::string & fileList);
79
81 void
82 SetReadFromFile() override;
83
85 void
87
90 bool
91 CanReadFile(const char *) override;
92
94 bool
95 CanReadCamera(CameraIDType cameraID) const override;
96
98 void
100
102 void
103 Read(void * buffer) override;
104
107 bool
108 SetNextFrameToRead(FrameOffsetType frameNumber) override;
109
112 GetPositionInMSec() const override
113 {
114 return this->m_PositionInMSec;
115 }
116 TemporalOffsetType
117 GetRatio() const override
118 {
119 return this->m_Ratio;
120 }
121 FrameOffsetType
122 GetFrameTotal() const override
123 {
124 return this->m_FrameTotal;
125 }
126 TemporalRatioType
127 GetFramesPerSecond() const override
128 {
129 return this->m_FramesPerSecond;
130 }
131 FrameOffsetType
132 GetCurrentFrame() const override
133 {
134 return this->m_CurrentFrame;
135 }
136 itkGetConstMacro(IFrameInterval, FrameOffsetType);
138 GetLastIFrame() const override
139 {
140 return this->m_LastIFrame;
141 }
145 double
146 GetSpacing(unsigned int i) const override;
147
148 double
149 GetOrigin(unsigned int i) const override;
150
151 std::vector<double>
152 GetDirection(unsigned int i) const override;
153
156 bool
157 CanWriteFile(const char *) override;
158
161 void
163
166 void
167 Write(const void * buffer) override;
168
170 void
172 const std::vector<SizeValueType> & dim,
173 const char * fourCC,
174 unsigned int nChannels,
175 IOComponentEnum componentType) override;
176
177protected:
180
181 void
182 PrintSelf(std::ostream & os, Indent indent) const override;
183
185 void
187
189 void
191
193 void
195
197 bool
198 VerifyExtensions(const std::vector<std::string> & fileList) const;
199
200private:
202
203 std::vector<std::string> m_FileNames{};
204};
205} // end namespace itk
206
207#endif // itkFileListVideoIO_h
VideoIO object for reading and writing videos as a sequence of frame files.
void SetWriterParameters(TemporalRatioType framesPerSecond, const std::vector< SizeValueType > &dim, const char *fourCC, unsigned int nChannels, IOComponentEnum componentType) override
TemporalOffsetType GetRatio() const override
void Write(const void *buffer) override
double GetSpacing(unsigned int i) const override
void FinishReadingOrWriting() override
void SetReadFromCamera() override
double GetOrigin(unsigned int i) const override
void Read(void *buffer) override
void SetFileName(const std::string &fileList) override
FrameOffsetType GetFrameTotal() const override
FrameOffsetType GetLastIFrame() const override
TemporalOffsetType GetPositionInMSec() const override
static std::vector< std::string > SplitFileNames(const std::string &fileList)
FrameOffsetType GetCurrentFrame() const override
void SetFileName(const char *fileList) override
void ReadImageInformation() override
bool SetNextFrameToRead(FrameOffsetType frameNumber) override
void SetReadFromFile() override
~FileListVideoIO() override
void WriteImageInformation() override
bool VerifyExtensions(const std::vector< std::string > &fileList) const
bool CanReadCamera(CameraIDType cameraID) const override
void PrintSelf(std::ostream &os, Indent indent) const override
bool CanReadFile(const char *) override
TemporalRatioType GetFramesPerSecond() const override
std::vector< double > GetDirection(unsigned int i) const override
bool CanWriteFile(const char *) override
Abstract superclass defines image IO interface.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
Abstract superclass defines video IO interface.
SizeValueType CameraIDType
SizeValueType FrameOffsetType
double TemporalRatioType
double TemporalOffsetType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....