ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | List of all members
itk::vidl_itk_istream< TVideoStream > Class Template Reference

#include <vidl_itk_istream.h>

+ Inheritance diagram for itk::vidl_itk_istream< TVideoStream >:
+ Collaboration diagram for itk::vidl_itk_istream< TVideoStream >:

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

 vidl_itk_istream ()
 
 vidl_itk_istream (VideoStreamType *videoStream)
 
virtual ~vidl_itk_istream ()
 

Static Public Attributes

static constexpr unsigned int Dimensions = FrameType::ImageDimension
 
VideoStreamTypem_VideoStream
 
bool m_AdvanceCalled
 
const char * GetNameOfClass () const
 
virtual bool open (VideoStreamType *videoStream)
 
virtual void close ()
 
virtual bool is_open () const
 
virtual bool is_valid () const
 
virtual bool is_seekable () const
 
virtual int num_frames () const
 
virtual unsigned int frame_number () const
 
virtual unsigned int width () const
 
virtual unsigned int height () const
 
virtual vidl_pixel_format format () const
 
virtual double frame_rate () const
 
virtual double duration () const
 
virtual bool advance ()
 
virtual vidl_frame_sptr read_frame ()
 
virtual vidl_frame_sptr current_frame ()
 
virtual bool seek_frame (unsigned int frameNumber)
 

Detailed Description

template<typename TVideoStream>
class itk::vidl_itk_istream< TVideoStream >

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 40 of file vidl_itk_istream.h.

Member Typedef Documentation

◆ FrameOffsetType

template<typename TVideoStream >
using itk::vidl_itk_istream< TVideoStream >::FrameOffsetType = ::itk::SizeValueType

Definition at line 50 of file vidl_itk_istream.h.

◆ FrameType

template<typename TVideoStream >
using itk::vidl_itk_istream< TVideoStream >::FrameType = typename VideoStreamType::FrameType

Definition at line 49 of file vidl_itk_istream.h.

◆ PixelType

template<typename TVideoStream >
using itk::vidl_itk_istream< TVideoStream >::PixelType = typename FrameType::PixelType

Definition at line 51 of file vidl_itk_istream.h.

◆ Self

template<typename TVideoStream >
using itk::vidl_itk_istream< TVideoStream >::Self = vidl_itk_istream<VideoStreamType>

Definition at line 48 of file vidl_itk_istream.h.

◆ VideoStreamType

template<typename TVideoStream >
using itk::vidl_itk_istream< TVideoStream >::VideoStreamType = TVideoStream

-CONSTRUCTORS AND DESTRUCTOR-----------------------------------------— Typedefs

Definition at line 47 of file vidl_itk_istream.h.

Constructor & Destructor Documentation

◆ vidl_itk_istream() [1/2]

template<typename TVideoStream >
itk::vidl_itk_istream< TVideoStream >::vidl_itk_istream ( )

Constructor - default

◆ vidl_itk_istream() [2/2]

template<typename TVideoStream >
itk::vidl_itk_istream< TVideoStream >::vidl_itk_istream ( VideoStreamType videoStream)

Constructor - from a VideoStream

◆ ~vidl_itk_istream()

template<typename TVideoStream >
virtual itk::vidl_itk_istream< TVideoStream >::~vidl_itk_istream ( )
inlinevirtual

Destructor

Definition at line 61 of file vidl_itk_istream.h.

Member Function Documentation

◆ advance()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::advance ( )
virtual

-STREAM MANIPULATION-------------------------------------------------— Advance to the next frame but don't update the VideoStream

◆ close()

template<typename TVideoStream >
virtual void itk::vidl_itk_istream< TVideoStream >::close ( )
inlinevirtual

Close the stream. For our purposes, this just means set the VideoStream pointer to nullptr

Definition at line 82 of file vidl_itk_istream.h.

◆ current_frame()

template<typename TVideoStream >
virtual vidl_frame_sptr itk::vidl_itk_istream< TVideoStream >::current_frame ( )
virtual

Return the current frame (update)

◆ duration()

template<typename TVideoStream >
virtual double itk::vidl_itk_istream< TVideoStream >::duration ( ) const
virtual

Return duration in seconds

◆ format()

template<typename TVideoStream >
virtual vidl_pixel_format itk::vidl_itk_istream< TVideoStream >::format ( ) const
virtual

Return pixel type as a vidl_pixel_format

◆ frame_number()

template<typename TVideoStream >
virtual unsigned int itk::vidl_itk_istream< TVideoStream >::frame_number ( ) const
virtual

Return the current frame number. Before advance() has been called, this will return static_cast<unsigned int>(-1)

◆ frame_rate()

template<typename TVideoStream >
virtual double itk::vidl_itk_istream< TVideoStream >::frame_rate ( ) const
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 132 of file vidl_itk_istream.h.

◆ GetNameOfClass()

template<typename TVideoStream >
const char* itk::vidl_itk_istream< TVideoStream >::GetNameOfClass ( ) const
inline

ITK's type info

Definition at line 66 of file vidl_itk_istream.h.

◆ height()

template<typename TVideoStream >
virtual unsigned int itk::vidl_itk_istream< TVideoStream >::height ( ) const
virtual

Frame height

◆ is_open()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::is_open ( ) const
inlinevirtual

-STREAM INFORMATION--------------------------------------------------— Return whether or not the VideoStream is null

Definition at line 92 of file vidl_itk_istream.h.

◆ is_seekable()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::is_seekable ( ) const
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

◆ is_valid()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::is_valid ( ) const
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.

◆ num_frames()

template<typename TVideoStream >
virtual int itk::vidl_itk_istream< TVideoStream >::num_frames ( ) const
virtual

Return the nuber of frames. Returns -1 if non-seekable

◆ open()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::open ( VideoStreamType videoStream)
virtual

-OPEN CLOSE----------------------------------------------------------— Open from a VideoStream

◆ read_frame()

template<typename TVideoStream >
virtual vidl_frame_sptr itk::vidl_itk_istream< TVideoStream >::read_frame ( )
virtual

Return the next frame from the stream (advance and update)

◆ seek_frame()

template<typename TVideoStream >
virtual bool itk::vidl_itk_istream< TVideoStream >::seek_frame ( unsigned int  frameNumber)
virtual

Seek to the given frame

◆ width()

template<typename TVideoStream >
virtual unsigned int itk::vidl_itk_istream< TVideoStream >::width ( ) const
virtual

Frame width

Member Data Documentation

◆ Dimensions

template<typename TVideoStream >
constexpr unsigned int itk::vidl_itk_istream< TVideoStream >::Dimensions = FrameType::ImageDimension
staticconstexpr

Definition at line 52 of file vidl_itk_istream.h.

◆ m_AdvanceCalled

template<typename TVideoStream >
bool itk::vidl_itk_istream< TVideoStream >::m_AdvanceCalled
protected

Keep track of whether or not advance has been called yet

Definition at line 165 of file vidl_itk_istream.h.

◆ m_VideoStream

template<typename TVideoStream >
VideoStreamType* itk::vidl_itk_istream< TVideoStream >::m_VideoStream
protected

Internal VideoStream pointer

Definition at line 162 of file vidl_itk_istream.h.


The documentation for this class was generated from the following file: