Public Member Functions | Private Attributes
vidl_image_list_ostream Class Reference

A video output stream to a list of images. More...

#include <vidl_image_list_ostream.h>

Inheritance diagram for vidl_image_list_ostream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vidl_image_list_ostream ()
 Constructor.
 vidl_image_list_ostream (const vcl_string &directory, const vcl_string &name_format="%05d", const vcl_string &file_format="tiff", const unsigned int init_index=0)
 Constructor - opens a stream.
virtual ~vidl_image_list_ostream ()
 Destructor.
virtual bool open (const vcl_string &directory, const vcl_string &name_format="%05d", const vcl_string &file_format="tiff", const unsigned int init_index=0)
 Open the stream.
virtual void close ()
 Close the stream.
virtual bool is_open () const
 Return true if the stream is open for writing.
unsigned int index () const
 Return the current index.
virtual vcl_string next_file_name () const
 Return the next file name to be written to.
virtual bool write_frame (const vidl_frame_sptr &frame)
 Write and image to the stream.
void ref ()
 Increment reference count.
void unref ()
 Decrement reference count.
int ref_count () const
 Number of objects referring to this data.

Private Attributes

unsigned int index_
 The current index.
vcl_string dir_
 The directory to save images in.
vcl_string name_format_
 The printf-style format string for filenames.
vcl_string file_format_
 The image file format to use.

Detailed Description

A video output stream to a list of images.

Definition at line 18 of file vidl_image_list_ostream.h.


Constructor & Destructor Documentation

vidl_image_list_ostream::vidl_image_list_ostream ( )

Constructor.

Definition at line 24 of file vidl_image_list_ostream.cxx.

vidl_image_list_ostream::vidl_image_list_ostream ( const vcl_string &  directory,
const vcl_string &  name_format = "%05d",
const vcl_string &  file_format = "tiff",
const unsigned int  init_index = 0 
)

Constructor - opens a stream.

Definition at line 35 of file vidl_image_list_ostream.cxx.

virtual vidl_image_list_ostream::~vidl_image_list_ostream ( ) [inline, virtual]

Destructor.

Definition at line 32 of file vidl_image_list_ostream.h.


Member Function Documentation

void vidl_image_list_ostream::close ( void  ) [virtual]

Close the stream.

Implements vidl_ostream.

Definition at line 87 of file vidl_image_list_ostream.cxx.

unsigned int vidl_image_list_ostream::index ( ) const [inline]

Return the current index.

Definition at line 47 of file vidl_image_list_ostream.h.

bool vidl_image_list_ostream::is_open ( ) const [virtual]

Return true if the stream is open for writing.

Implements vidl_ostream.

Definition at line 99 of file vidl_image_list_ostream.cxx.

vcl_string vidl_image_list_ostream::next_file_name ( ) const [virtual]

Return the next file name to be written to.

Definition at line 108 of file vidl_image_list_ostream.cxx.

bool vidl_image_list_ostream::open ( const vcl_string &  directory,
const vcl_string &  name_format = "%05d",
const vcl_string &  file_format = "tiff",
const unsigned int  init_index = 0 
) [virtual]

Open the stream.

Definition at line 47 of file vidl_image_list_ostream.cxx.

void vidl_ostream::ref ( ) [inline, inherited]

Increment reference count.

Definition at line 45 of file vidl_ostream.h.

int vidl_ostream::ref_count ( ) const [inline, inherited]

Number of objects referring to this data.

Definition at line 51 of file vidl_ostream.h.

void vidl_ostream::unref ( ) [inline, inherited]

Decrement reference count.

Definition at line 48 of file vidl_ostream.h.

bool vidl_image_list_ostream::write_frame ( const vidl_frame_sptr frame) [virtual]

Write and image to the stream.

Return values:
falseif the image could not be written

Implements vidl_ostream.

Definition at line 120 of file vidl_image_list_ostream.cxx.


Member Data Documentation

vcl_string vidl_image_list_ostream::dir_ [private]

The directory to save images in.

Definition at line 61 of file vidl_image_list_ostream.h.

The image file format to use.

Definition at line 67 of file vidl_image_list_ostream.h.

unsigned int vidl_image_list_ostream::index_ [private]

The current index.

Definition at line 58 of file vidl_image_list_ostream.h.

The printf-style format string for filenames.

Definition at line 64 of file vidl_image_list_ostream.h.


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