ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected 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 >:

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

Public Types

typedef ::itk::SizeValueType FrameOffsetType
 
typedef VideoStreamType::FrameType FrameType
 
typedef FrameType::PixelType PixelType
 
typedef vidl_itk_istream
< VideoStreamType
Self
 
typedef TVideoStream VideoStreamType
 

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 const char * GetNameOfClass () 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 ()
 

Static Public Attributes

static const unsigned int Dimensions = FrameType::ImageDimension
 

Protected Attributes

bool m_AdvanceCalled
 
VideoStreamTypem_VideoStream
 

Member Typedef Documentation

template<typename TVideoStream >
typedef ::itk::SizeValueType itk::vidl_itk_istream< TVideoStream >::FrameOffsetType

Definition at line 49 of file vidl_itk_istream.h.

template<typename TVideoStream >
typedef VideoStreamType::FrameType itk::vidl_itk_istream< TVideoStream >::FrameType

Definition at line 48 of file vidl_itk_istream.h.

template<typename TVideoStream >
typedef FrameType::PixelType itk::vidl_itk_istream< TVideoStream >::PixelType

Definition at line 50 of file vidl_itk_istream.h.

template<typename TVideoStream >
typedef vidl_itk_istream< VideoStreamType > itk::vidl_itk_istream< TVideoStream >::Self

Definition at line 47 of file vidl_itk_istream.h.

template<typename TVideoStream >
typedef TVideoStream itk::vidl_itk_istream< TVideoStream >::VideoStreamType

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

Definition at line 46 of file vidl_itk_istream.h.

Constructor & Destructor Documentation

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

Constructor - default

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

Constructor - from a VideoStream

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

Destructor

Definition at line 60 of file vidl_itk_istream.h.

Member Function Documentation

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

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 ITK_NULLPTR

Definition at line 73 of file vidl_itk_istream.h.

References itk::vidl_itk_istream< TVideoStream >::m_VideoStream.

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

Return the current frame (update)

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

Return duration in seconds

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

Return pixel type as a vidl_pixel_format

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)

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

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

ITK's type info

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

Frame height

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

References itk::vidl_itk_istream< TVideoStream >::m_VideoStream.

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

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.

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

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

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

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

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)

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

Seek to the given frame

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

Frame width

Member Data Documentation

template<typename TVideoStream >
const unsigned int itk::vidl_itk_istream< TVideoStream >::Dimensions = FrameType::ImageDimension
static

Definition at line 51 of file vidl_itk_istream.h.

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

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

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