vil1_image Class Reference

#include <vil1_image.h>

Inheritance diagram for vil1_image:

vil1_file_image vil1_image_proxy vil1_memory_image vil1_memory_image_of< T > List of all members.

Detailed Description

A smart pointer to an actual image.

All operations are delegated to the vil1_image_impl object, which uses class inheritance to make various file images etc. For fuller documentation on any method, see vil1_image_impl

Imagine that vil1_image is a class derived from vbl_smart_ptr<vil1_image_impl>, but with some extra convenience methods. These methods might traditionally be attached to the abstract base class vil1_image_impl, but this avoids cluttering that interface.

You should not derive from vil1_image to make a new image type. Derive from vil1_image_impl instead.

Definition at line 28 of file vil1_image.h.


Public Member Functions

int planes () const
 Dimensions: Planes x W x H x Components.
int width () const
 Dimensions: Planes x W x H x Components.
int height () const
 Dimensions: Planes x W x H x Components.
int components () const
 Dimensions: Planes x W x H x Components.
int bits_per_component () const
 Format.
enum vil1_component_format component_format () const
 Format.
vil1_image get_plane (unsigned int p) const
 return the ith plane.
bool get_section (void *buf, int x0, int y0, int wd, int ht) const
 Copy from image to buf.
bool put_section (void const *buf, int x0, int y0, int wd, int ht)
 Copy from buf to image.
bool get_property (char const *tag, void *property_value=0) const
 Getting property information.
bool set_property (char const *tag, void const *property_value=0)
 Setting property information.
char const * file_format () const
 Return a string describing the file format.
int rows () const
 Number of rows.
int cols () const
 Number of columns.
int get_size_bytes () const
 return size in bytes.
vcl_ostream & print (vcl_ostream &) const
 Print a 1-line summary of contents.
 vil1_image (vil1_image_impl *p=0)
 vil1_image (vil1_image const &that)
 ~vil1_image ()
 Destructor.
vil1_imageoperator= (vil1_image const &that)
vil1_imageoperator= (vil1_image_impl *p)
bool operator== (vil1_image const &that) const
 equality means equality of implementation, not pixels.
bool operator< (vil1_image const &that) const
 needed for sorted containers of images.
 operator safe_bool () const
 conversion to bool.
bool operator! () const
 inverse conversion to bool.
vil1_image_implimpl () const
 use "sptr.impl()" to get a pointer to the impl object.

Protected Attributes

vil1_image_implptr

Private Attributes

 VCL_SAFE_BOOL_DEFINE

Constructor & Destructor Documentation

vil1_image::vil1_image ( vil1_image_impl p = 0  )  [inline]

Definition at line 93 of file vil1_image.h.

vil1_image::vil1_image ( vil1_image const &  that  )  [inline]

Definition at line 99 of file vil1_image.h.

vil1_image::~vil1_image (  )  [inline]

Destructor.

Definition at line 105 of file vil1_image.h.


Member Function Documentation

int vil1_image::planes (  )  const [inline]

Dimensions: Planes x W x H x Components.

Definition at line 36 of file vil1_image.h.

int vil1_image::width (  )  const [inline]

Dimensions: Planes x W x H x Components.

Reimplemented in vil1_memory_image.

Definition at line 39 of file vil1_image.h.

int vil1_image::height (  )  const [inline]

Dimensions: Planes x W x H x Components.

Reimplemented in vil1_memory_image.

Definition at line 42 of file vil1_image.h.

int vil1_image::components (  )  const [inline]

Dimensions: Planes x W x H x Components.

Definition at line 45 of file vil1_image.h.

int vil1_image::bits_per_component (  )  const [inline]

Format.

Definition at line 48 of file vil1_image.h.

enum vil1_component_format vil1_image::component_format (  )  const [inline]

Format.

Definition at line 51 of file vil1_image.h.

vil1_image vil1_image::get_plane ( unsigned int  p  )  const [inline]

return the ith plane.

Definition at line 55 of file vil1_image.h.

bool vil1_image::get_section ( void *  buf,
int  x0,
int  y0,
int  wd,
int  ht 
) const [inline]

Copy from image to buf.

Definition at line 58 of file vil1_image.h.

bool vil1_image::put_section ( void const *  buf,
int  x0,
int  y0,
int  wd,
int  ht 
) [inline]

Copy from buf to image.

Definition at line 62 of file vil1_image.h.

bool vil1_image::get_property ( char const *  tag,
void *  property_value = 0 
) const [inline]

Getting property information.

Definition at line 66 of file vil1_image.h.

bool vil1_image::set_property ( char const *  tag,
void const *  property_value = 0 
) [inline]

Setting property information.

Definition at line 70 of file vil1_image.h.

char const* vil1_image::file_format (  )  const [inline]

Return a string describing the file format.

Only file images have a format, others return 0

Definition at line 75 of file vil1_image.h.

int vil1_image::rows (  )  const [inline]

Number of rows.

Definition at line 81 of file vil1_image.h.

int vil1_image::cols (  )  const [inline]

Number of columns.

Definition at line 83 of file vil1_image.h.

int vil1_image::get_size_bytes (  )  const

return size in bytes.

Definition at line 37 of file vil1_image.cxx.

vcl_ostream & vil1_image::print ( vcl_ostream &   )  const

Print a 1-line summary of contents.

Definition at line 13 of file vil1_image.cxx.

vil1_image& vil1_image::operator= ( vil1_image const &  that  )  [inline]

Reimplemented in vil1_memory_image_of< T >, and vil1_memory_image_of< vxl_byte >.

Definition at line 111 of file vil1_image.h.

vil1_image& vil1_image::operator= ( vil1_image_impl p  )  [inline]

Definition at line 122 of file vil1_image.h.

bool vil1_image::operator== ( vil1_image const &  that  )  const [inline]

equality means equality of implementation, not pixels.

Definition at line 132 of file vil1_image.h.

bool vil1_image::operator< ( vil1_image const &  that  )  const [inline]

needed for sorted containers of images.

Definition at line 137 of file vil1_image.h.

vil1_image::operator safe_bool (  )  const [inline]

conversion to bool.

Definition at line 142 of file vil1_image.h.

bool vil1_image::operator! (  )  const [inline]

inverse conversion to bool.

Definition at line 146 of file vil1_image.h.

vil1_image_impl* vil1_image::impl (  )  const [inline]

use "sptr.impl()" to get a pointer to the impl object.

Definition at line 150 of file vil1_image.h.


Member Data Documentation

vil1_image::VCL_SAFE_BOOL_DEFINE [private]

Definition at line 30 of file vil1_image.h.

vil1_image_impl* vil1_image::ptr [protected]

Definition at line 155 of file vil1_image.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 7 05:09:13 2009 for core/vil1 by  doxygen 1.5.1