ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <vidl_itk_istream.h>
implementation of VXL's vidl_istream using an itk VideoStream
This implementation of VXL's vidl_istream can be placed at the end of an ITK video pipeline and allow the processed frames to be accessed in the standard VXL istream pattern.
TODO: Move this to Video-Core-VXL
Definition at line 39 of file vidl_itk_istream.h.
Public Types | |
using | FrameOffsetType = ::itk::SizeValueType |
using | FrameType = typename VideoStreamType::FrameType |
using | PixelType = typename FrameType::PixelType |
using | Self = vidl_itk_istream< VideoStreamType > |
using | VideoStreamType = TVideoStream |
Public Member Functions | |
virtual bool | advance () |
virtual void | close () |
virtual vidl_frame_sptr | current_frame () |
virtual double | duration () const |
virtual vidl_pixel_format | format () const |
virtual unsigned int | frame_number () const |
virtual double | frame_rate () const |
virtual unsigned int | height () const |
virtual bool | is_open () const |
virtual bool | is_seekable () const |
virtual bool | is_valid () const |
virtual int | num_frames () const |
virtual bool | open (VideoStreamType *videoStream) |
virtual vidl_frame_sptr | read_frame () |
virtual bool | seek_frame (unsigned int frameNumber) |
vidl_itk_istream () | |
vidl_itk_istream (VideoStreamType *videoStream) | |
virtual unsigned int | width () const |
virtual | ~vidl_itk_istream () |
const char * | GetNameOfClass () const |
Static Public Attributes | |
static constexpr unsigned int | Dimensions = FrameType::ImageDimension |
Protected Attributes | |
bool | m_AdvanceCalled |
VideoStreamType * | m_VideoStream |
using itk::vidl_itk_istream< TVideoStream >::FrameOffsetType = ::itk::SizeValueType |
Definition at line 49 of file vidl_itk_istream.h.
using itk::vidl_itk_istream< TVideoStream >::FrameType = typename VideoStreamType::FrameType |
Definition at line 48 of file vidl_itk_istream.h.
using itk::vidl_itk_istream< TVideoStream >::PixelType = typename FrameType::PixelType |
Definition at line 50 of file vidl_itk_istream.h.
using itk::vidl_itk_istream< TVideoStream >::Self = vidl_itk_istream< VideoStreamType > |
Definition at line 47 of file vidl_itk_istream.h.
using itk::vidl_itk_istream< TVideoStream >::VideoStreamType = TVideoStream |
-CONSTRUCTORS AND DESTRUCTOR--------------------------------------—— Typedefs
Definition at line 46 of file vidl_itk_istream.h.
itk::vidl_itk_istream< TVideoStream >::vidl_itk_istream | ( | ) |
Constructor - default
itk::vidl_itk_istream< TVideoStream >::vidl_itk_istream | ( | VideoStreamType * | videoStream | ) |
Constructor - from a VideoStream
|
inlinevirtual |
Destructor
Definition at line 60 of file vidl_itk_istream.h.
|
virtual |
-STREAM MANIPULATION----------------------------------------------—— Advance to the next frame but don't update the VideoStream
|
inlinevirtual |
Close the stream. For our purposes, this just means set the VideoStream pointer to nullptr
Definition at line 78 of file vidl_itk_istream.h.
|
virtual |
Return the current frame (update)
|
virtual |
Return duration in seconds
|
virtual |
Return pixel type as a vidl_pixel_format
|
virtual |
Return the current frame number. Before advance() has been called, this will return static_cast<unsigned int>(-1)
|
inlinevirtual |
Return frame rate. For use this will always return 0.0 since we don't use a fixed framerate for VideoStream
Definition at line 113 of file vidl_itk_istream.h.
|
inline |
ITK's type info
Definition at line 64 of file vidl_itk_istream.h.
|
virtual |
Frame height
|
inlinevirtual |
-STREAM INFORMATION-----------------------------------------------—— Return whether or not the VideoStream is null
Definition at line 84 of file vidl_itk_istream.h.
|
virtual |
Return whether or not the stream is seekable. For us, it is only not seekable if the largest possible temporal region has infinite duration
|
virtual |
Return true if the stream is in a valid state. To comply with vxl's standard, this will return false until advance() has been called at least once.
|
virtual |
Return the nuber of frames. Returns -1 if non-seekable
|
virtual |
-OPEN CLOSE-------------------------------------------------------—— Open from a VideoStream
|
virtual |
Return the next frame from the stream (advance and update)
|
virtual |
Seek to the given frame
|
virtual |
Frame width
|
static |
Definition at line 51 of file vidl_itk_istream.h.
|
protected |
Keep track of whether or not advance has been called yet
Definition at line 139 of file vidl_itk_istream.h.
|
protected |
Internal VideoStream pointer
Definition at line 136 of file vidl_itk_istream.h.