Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
mvl2_image_format_plugin Class Reference

A base class for vil_image_view_base_sptr loading. More...

#include <mvl2_image_format_plugin.h>

Inheritance diagram for mvl2_image_format_plugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mvl2_image_format_plugin ()
 Default constructor.
virtual ~mvl2_image_format_plugin ()
 Destructor.
virtual vcl_string is_a () const
 Name of the class.
virtual bool load_the_image (vil_image_view_base_sptr &image, vcl_string const &path, vcl_string const &filetype, vcl_string const &colour="")
 Attempt to load image from named file.
virtual bool load_the_image (vil_image_view_base_sptr &image, vcl_string const &path)
virtual bool can_be_loaded (const vcl_string &filename)
 Check whether a filename is a potential candidate for loading and if it is available.
virtual vil_pixel_format pixel_format () const
virtual unsigned ni () const
virtual unsigned nj () const
virtual unsigned nplanes () const
virtual bool get_property (char const *, void *=0) const
virtual vil_image_view_base_sptr get_copy_view (unsigned, unsigned, unsigned, unsigned) const
vil_image_view_base_sptr get_copy_view () const
virtual bool put_view (vil_image_view_base const &, unsigned, unsigned)
virtual bool put_view (const vil_image_view_base &im)
virtual void set_size (int width, int height)
void set_colour (const vcl_string &colour)
void set_filetype (const vcl_string &filetype)
virtual vil_image_view_base_sptr get_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) const
vil_image_view_base_sptr get_view () const
virtual bool view_fits (const vil_image_view_base &im, unsigned i0, unsigned j0)
virtual char const * file_format () const
vil_image_resource_sptr vil_convolve_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, int k_lo, int k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option)
vil_image_resource_sptr vil_correlate_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option)
vil_image_resource_sptr vil_clamp (const vil_image_resource_sptr &src, double low, double hi)
bool vil_copy_deep (const vil_image_resource_sptr &src, vil_image_resource_sptr &dest)
vil_image_resource_sptr vil_crop (const vil_image_resource_sptr &src, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
vil_image_resource_sptr vil_decimate (const vil_image_resource_sptr &src, unsigned i_factor, unsigned j_factor=0)
vil_image_resource_sptr vil_flip_lr (const vil_image_resource_sptr &src)
vil_image_resource_sptr vil_flip_ud (const vil_image_resource_sptr &src)
vil_image_resource_sptr vil_load_image_resource (char const *filename, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_raw (vil_stream *, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_raw (char const *, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_plugin (char const *)
vil_image_resource_sptr vil_new_image_resource (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
vil_image_resource_sptr vil_new_image_resource (unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype)
vil_image_resource_sptr vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format)
vil_image_resource_sptr vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format)
vil_image_resource_sptr vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format)
vil_image_resource_sptr vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format)
vil_image_resource_sptr vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *format=0)
vil_image_resource_sptr vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *file_format=0)
vil_image_resource_sptr vil_new_image_resource_interleaved (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
vil_image_resource_sptr vil_new_image_resource_of_view (vil_image_view_base const &view)
vil_image_resource_sptr vil_plane (const vil_image_resource_sptr &src, unsigned p)
bool vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename, char const *file_format)
bool vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename)
vil_image_resource_sptr vil_transpose (const vil_image_resource_sptr &src)

Static Public Member Functions

static void register_plugin (vil_image_resource_plugin *plugin)
static void delete_all_plugins ()

Protected Member Functions

bool get_frame_number_and_filename (vcl_string &filename, int &frame_number, const vcl_string &path)
 Compute the real file name and extract the frame number from the path.
void ref ()
void unref ()

Protected Attributes

vcl_map< vcl_string,
mvl2_video_reader * > 
mvl2_list_
vcl_string filetype_
vcl_string colour_
vil_pixel_format pixel_format_
unsigned int ni_
unsigned int nj_
unsigned int nplanes_
int width_
int height_
vcl_atomic_count reference_count_

Friends

friend class vil_smart_ptr

Detailed Description

A base class for vil_image_view_base_sptr loading.

This class provides an interface for loading images in new formats

Definition at line 23 of file mvl2_image_format_plugin.h.


Constructor & Destructor Documentation

mvl2_image_format_plugin::mvl2_image_format_plugin ( )

Default constructor.

Definition at line 27 of file mvl2_image_format_plugin.cxx.

mvl2_image_format_plugin::~mvl2_image_format_plugin ( ) [virtual]

Destructor.

Definition at line 33 of file mvl2_image_format_plugin.cxx.


Member Function Documentation

bool mvl2_image_format_plugin::can_be_loaded ( const vcl_string &  filename) [virtual]

Check whether a filename is a potential candidate for loading and if it is available.

Reimplemented from vil_image_resource_plugin.

Definition at line 166 of file mvl2_image_format_plugin.cxx.

bool mvl2_image_format_plugin::get_frame_number_and_filename ( vcl_string &  filename,
int &  frame_number,
const vcl_string &  path 
) [protected]

Compute the real file name and extract the frame number from the path.

The result is true if the file that will be used exists.

Definition at line 57 of file mvl2_image_format_plugin.cxx.

vcl_string mvl2_image_format_plugin::is_a ( ) const [virtual]

Name of the class.

Reimplemented from vil_image_resource_plugin.

Definition at line 50 of file mvl2_image_format_plugin.cxx.

bool mvl2_image_format_plugin::load_the_image ( vil_image_view_base_sptr image,
vcl_string const &  path,
vcl_string const &  filetype,
vcl_string const &  colour = "" 
) [virtual]

Attempt to load image from named file.

Parameters:
filetypeString hinting at what image format is (currently unused)
colourdefine whether to load images as colour or grey-scale Options are '' (ie rely on image), 'Grey' or 'RGB'
Returns:
true if successful

Reimplemented from vil_image_resource_plugin.

Definition at line 93 of file mvl2_image_format_plugin.cxx.

virtual bool mvl2_image_format_plugin::load_the_image ( vil_image_view_base_sptr image,
vcl_string const &  path 
) [inline, virtual]

Reimplemented from vil_image_resource_plugin.

Definition at line 46 of file mvl2_image_format_plugin.h.


Member Data Documentation

vcl_map<vcl_string,mvl2_video_reader*> mvl2_image_format_plugin::mvl2_list_ [protected]

Definition at line 55 of file mvl2_image_format_plugin.h.


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