Public Member Functions | Static Public Member Functions
vimt3d_vil3d_v3m_format Class Reference

Reader/Writer for v3m format images, specialised for label or mask images. More...

#include <vimt3d_vil3d_v3m.h>

Inheritance diagram for vimt3d_vil3d_v3m_format:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vimt3d_vil3d_v3m_format ()
virtual ~vimt3d_vil3d_v3m_format ()
 The destructor must be virtual so that the memory chunk is destroyed.
virtual vil3d_image_resource_sptr make_input_image (const char *) const
virtual vil3d_image_resource_sptr make_output_image (const char *filename, unsigned ni, unsigned nj, unsigned nk, unsigned nplanes, enum vil_pixel_format) const
 Make a "generic_image" on which put_section may be applied.
virtual const char * tag () const
 default filename tag for this image.

Static Public Member Functions

static unsigned magic_number ()
 The magic number to identify a vsl stream as a v3m image.
static void add_format (vil3d_file_format *new_format)
static unsigned n_formats ()
static const vil3d_file_formatformat (unsigned i)

Detailed Description

Reader/Writer for v3m format images, specialised for label or mask images.

To use the v3m format with vil3d_load, vil3d_save, etc add the following code at the start of your program

    vil3d_file_format::add_format(new vimt3d_vil3d_v3m_format);
   

Definition at line 43 of file vimt3d_vil3d_v3m.h.


Constructor & Destructor Documentation

vimt3d_vil3d_v3m_format::vimt3d_vil3d_v3m_format ( ) [inline]

Definition at line 46 of file vimt3d_vil3d_v3m.h.

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

The destructor must be virtual so that the memory chunk is destroyed.

Definition at line 48 of file vimt3d_vil3d_v3m.h.


Member Function Documentation

unsigned vimt3d_vil3d_v3m_format::magic_number ( ) [static]

The magic number to identify a vsl stream as a v3m image.

You can create/read a v3m image using vsl by opening the stream, reading/writing magic_number(), then reading/writing a pointer to a vimt_image.

Definition at line 29 of file vimt3d_vil3d_v3m.cxx.

vil3d_image_resource_sptr vimt3d_vil3d_v3m_format::make_input_image ( const char *  filename) const [virtual]

Implements vil3d_file_format.

Definition at line 34 of file vimt3d_vil3d_v3m.cxx.

vil3d_image_resource_sptr vimt3d_vil3d_v3m_format::make_output_image ( const char *  filename,
unsigned  ni,
unsigned  nj,
unsigned  nk,
unsigned  nplanes,
enum  vil_pixel_format 
) const [virtual]

Make a "generic_image" on which put_section may be applied.

The file may be opened immediately for writing so that a header can be written.

The file may be opened immediately for writing so that a header can be written. The width/height etc are explicitly specified, so that file_format implementors know what they need to do...

Implements vil3d_file_format.

Definition at line 59 of file vimt3d_vil3d_v3i.cxx.

virtual const char* vimt3d_vil3d_v3m_format::tag ( ) const [inline, virtual]

default filename tag for this image.

Implements vil3d_file_format.

Definition at line 62 of file vimt3d_vil3d_v3m.h.


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