ITK
4.8.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 | |
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 |
VideoStreamType * | m_VideoStream |
typedef ::itk::SizeValueType itk::vidl_itk_istream< TVideoStream >::FrameOffsetType |
Definition at line 49 of file vidl_itk_istream.h.
typedef VideoStreamType::FrameType itk::vidl_itk_istream< TVideoStream >::FrameType |
Definition at line 48 of file vidl_itk_istream.h.
typedef FrameType::PixelType itk::vidl_itk_istream< TVideoStream >::PixelType |
Definition at line 50 of file vidl_itk_istream.h.
typedef vidl_itk_istream< VideoStreamType > itk::vidl_itk_istream< TVideoStream >::Self |
Definition at line 47 of file vidl_itk_istream.h.
typedef TVideoStream itk::vidl_itk_istream< TVideoStream >::VideoStreamType |
-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 ITK_NULLPTR
Definition at line 73 of file vidl_itk_istream.h.
References itk::vidl_itk_istream< TVideoStream >::m_VideoStream.
|
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 108 of file vidl_itk_istream.h.
|
virtual |
ITK's type info
|
virtual |
Frame height
|
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.
|
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 134 of file vidl_itk_istream.h.
|
protected |
Internal VideoStream pointer
Definition at line 131 of file vidl_itk_istream.h.
Referenced by itk::vidl_itk_istream< TVideoStream >::close(), and itk::vidl_itk_istream< TVideoStream >::is_open().