vil1_memory_image_impl Class Reference

#include <vil1_memory_image_impl.h>

Inheritance diagram for vil1_memory_image_impl:

vil1_image_impl List of all members.

Detailed Description

Implementation class for vil1_memory_image.

Definition at line 24 of file vil1_memory_image_impl.h.


Public Member Functions

 vil1_memory_image_impl (int planes, int w, int h, vil1_memory_image_format const &format)
 vil1_memory_image_impl (int planes, int w, int h, int components, int bits_per_component, vil1_component_format component_format)
 vil1_memory_image_impl (int planes, int w, int h, vil1_pixel_format_t pixel_format)
 vil1_memory_image_impl (int w, int h, int components, int bits_per_component, vil1_component_format component_format)
 vil1_memory_image_impl (int w, int h, vil1_pixel_format_t pixel_format)
 vil1_memory_image_impl (vil1_memory_image_impl const &)
 ~vil1_memory_image_impl ()
virtual int planes () const
 Dimensions: Planes x W x H x Components.
virtual int width () const
 Dimensions: Planes x W x H x Components.
virtual int height () const
 Dimensions: Planes x W x H x Components.
virtual int components () const
 Dimensions: Planes x W x H x Components.
virtual int bits_per_component () const
 Number of bits per component.
virtual vil1_component_format component_format () const
 Format.
virtual vil1_image get_plane (unsigned int p) const
 return the ith plane.
virtual bool get_section (void *buf, int x0, int y0, int width, int height) const
 Copy buffer of this to BUF.
virtual bool put_section (void const *buf, int x0, int y0, int width, int height)
 Copy plane PLANE of BUF to this.
virtual bool get_property (char const *tag, void *property_value=0) const
 Extra property information.
void resize (int planes, int width, int height)
void resize (int planes, int width, int height, int components, int bits_per_component, vil1_component_format format)
virtual vcl_string is_a () const
 Return the name of the class;.
virtual bool is_class (vcl_string const &) const
 Return true if the name of the class matches the argument.
 vil1_memory_image_impl (void *buf, int planes, int w, int h, vil1_memory_image_format const &format)
 Constructor from previously allocated memory.
 vil1_memory_image_impl (void *buf, int planes, int w, int h, int components, int bits_per_component, vil1_component_format component_format)
 Constructor from previously allocated memory.
 vil1_memory_image_impl (void *buf, int planes, int w, int h, vil1_pixel_format_t pixel_format)
 Constructor from previously allocated memory.
 vil1_memory_image_impl (void *buf, int w, int h, int components, int bits_per_component, vil1_component_format component_format)
 Constructor from previously allocated memory.
 vil1_memory_image_impl (void *buf, int w, int h, vil1_pixel_format_t pixel_format)
 Constructor from previously allocated memory.
virtual char const * file_format () const
 Return a string describing the file format.
virtual bool set_property (char const *tag, void const *property_value=0) const

Protected Member Functions

void init (void *buf, int planes, int w, int h, vil1_pixel_format_t pixel_format)
void init (void *buf, int planes, int w, int h, int components, int bits_per_component, vil1_component_format)

Protected Attributes

int planes_
int width_
int height_
int components_
int bits_per_component_
vil1_component_format component_format_
int bytes_per_pixel_
bool is_foreign_buf_
unsigned char * buf_
void *** rows_

Friends

class vil1_memory_image

Constructor & Destructor Documentation

vil1_memory_image_impl::vil1_memory_image_impl ( int  planes,
int  w,
int  h,
vil1_memory_image_format const &  format 
)

Definition at line 17 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( int  planes,
int  w,
int  h,
int  components,
int  bits_per_component,
vil1_component_format  component_format 
)

Definition at line 25 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( int  planes,
int  w,
int  h,
vil1_pixel_format_t  pixel_format 
)

Definition at line 33 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( int  w,
int  h,
int  components,
int  bits_per_component,
vil1_component_format  component_format 
)

Definition at line 39 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( int  w,
int  h,
vil1_pixel_format_t  pixel_format 
)

Definition at line 46 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( vil1_memory_image_impl const &   ) 

Definition at line 52 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::~vil1_memory_image_impl (  ) 

Definition at line 115 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( void *  buf,
int  planes,
int  w,
int  h,
vil1_memory_image_format const &  format 
)

Constructor from previously allocated memory.

This memory is not deallocated on destruction.

Definition at line 230 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( void *  buf,
int  planes,
int  w,
int  h,
int  components,
int  bits_per_component,
vil1_component_format  component_format 
)

Constructor from previously allocated memory.

This memory is not deallocated on destruction.

Definition at line 237 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( void *  buf,
int  planes,
int  w,
int  h,
vil1_pixel_format_t  pixel_format 
)

Constructor from previously allocated memory.

This memory is not deallocated on destruction.

Definition at line 244 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( void *  buf,
int  w,
int  h,
int  components,
int  bits_per_component,
vil1_component_format  component_format 
)

Constructor from previously allocated memory.

This memory is not deallocated on destruction.

Definition at line 250 of file vil1_memory_image_impl.cxx.

vil1_memory_image_impl::vil1_memory_image_impl ( void *  buf,
int  w,
int  h,
vil1_pixel_format_t  pixel_format 
)

Constructor from previously allocated memory.

This memory is not deallocated on destruction.

Definition at line 257 of file vil1_memory_image_impl.cxx.


Member Function Documentation

virtual int vil1_memory_image_impl::planes (  )  const [inline, virtual]

Dimensions: Planes x W x H x Components.

Implements vil1_image_impl.

Definition at line 41 of file vil1_memory_image_impl.h.

virtual int vil1_memory_image_impl::width (  )  const [inline, virtual]

Dimensions: Planes x W x H x Components.

Implements vil1_image_impl.

Definition at line 42 of file vil1_memory_image_impl.h.

virtual int vil1_memory_image_impl::height (  )  const [inline, virtual]

Dimensions: Planes x W x H x Components.

Implements vil1_image_impl.

Definition at line 43 of file vil1_memory_image_impl.h.

virtual int vil1_memory_image_impl::components (  )  const [inline, virtual]

Dimensions: Planes x W x H x Components.

Implements vil1_image_impl.

Definition at line 44 of file vil1_memory_image_impl.h.

virtual int vil1_memory_image_impl::bits_per_component (  )  const [inline, virtual]

Number of bits per component.

Size (in bits) for the smallest entity of the image.

Implements vil1_image_impl.

Definition at line 45 of file vil1_memory_image_impl.h.

virtual vil1_component_format vil1_memory_image_impl::component_format (  )  const [inline, virtual]

Format.

A standard RGB RGB RGB image has

Implements vil1_image_impl.

Definition at line 46 of file vil1_memory_image_impl.h.

vil1_image vil1_memory_image_impl::get_plane ( unsigned int  p  )  const [virtual]

return the ith plane.

Reimplemented from vil1_image_impl.

Definition at line 200 of file vil1_memory_image_impl.cxx.

bool vil1_memory_image_impl::get_section ( void *  buf,
int  x0,
int  y0,
int  width,
int  height 
) const [virtual]

Copy buffer of this to BUF.

The buffer is stored like this for each pixel: component0(plane0,plane1,plane2,...),component1(plane0,plane1,plane2,...),...
total size of BUF in bytes should be (bits_per_component * components + 7) / 8 i.e. rounding to the next multiple of 8 bits (only correct if 1 byte = 8 bits)

Implements vil1_image_impl.

Definition at line 154 of file vil1_memory_image_impl.cxx.

bool vil1_memory_image_impl::put_section ( void const *  buf,
int  x0,
int  y0,
int  width,
int  height 
) [virtual]

Copy plane PLANE of BUF to this.

The buffer should look like this for each pixel: component0(plane0,plane1,plane2,...),component1(plane0,plane1,plane2,...),...
total size of BUF in bytes should be (bits_per_component * components + 7) / 8 i.e. rounding to the next multiple of 8 bits (only correct if 1 byte = 8 bits)

Implements vil1_image_impl.

Definition at line 176 of file vil1_memory_image_impl.cxx.

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

Extra property information.

Reimplemented from vil1_image_impl.

Definition at line 206 of file vil1_memory_image_impl.cxx.

void vil1_memory_image_impl::resize ( int  planes,
int  width,
int  height 
)

Definition at line 138 of file vil1_memory_image_impl.cxx.

void vil1_memory_image_impl::resize ( int  planes,
int  width,
int  height,
int  components,
int  bits_per_component,
vil1_component_format  format 
)

Definition at line 126 of file vil1_memory_image_impl.cxx.

vcl_string vil1_memory_image_impl::is_a (  )  const [virtual]

Return the name of the class;.

Reimplemented from vil1_image_impl.

Definition at line 264 of file vil1_memory_image_impl.cxx.

bool vil1_memory_image_impl::is_class ( vcl_string const &   )  const [virtual]

Return true if the name of the class matches the argument.

Reimplemented from vil1_image_impl.

Definition at line 271 of file vil1_memory_image_impl.cxx.

void vil1_memory_image_impl::init ( void *  buf,
int  planes,
int  w,
int  h,
vil1_pixel_format_t  pixel_format 
) [protected]

Definition at line 100 of file vil1_memory_image_impl.cxx.

void vil1_memory_image_impl::init ( void *  buf,
int  planes,
int  w,
int  h,
int  components,
int  bits_per_component,
vil1_component_format   
) [protected]

Definition at line 59 of file vil1_memory_image_impl.cxx.

virtual char const* vil1_image_impl::file_format (  )  const [inline, virtual, inherited]

Return a string describing the file format.

Only file images have a format, others return 0

Reimplemented in vil1_bmp_generic_image, vil1_gen_generic_image, vil1_gif_loader_saver, vil1_gif_loader_saver_proxy, vil1_iris_generic_image, vil1_jpeg_generic_image, vil1_mit_generic_image, vil1_png_generic_image, vil1_pnm_generic_image, vil1_ras_generic_image, vil1_tiff_generic_image, vil1_viff_generic_image, and vil1_image_proxy_impl.

Definition at line 134 of file vil1_image_impl.h.

bool vil1_image_impl::set_property ( char const *  tag,
void const *  property_value = 0 
) const [virtual, inherited]

Reimplemented in vil1_tiff_generic_image, and vil1_image_proxy_impl.

Definition at line 28 of file vil1_image_impl.cxx.


Friends And Related Function Documentation

friend class vil1_memory_image [friend]

Definition at line 86 of file vil1_memory_image_impl.h.


Member Data Documentation

int vil1_memory_image_impl::planes_ [protected]

Definition at line 93 of file vil1_memory_image_impl.h.

int vil1_memory_image_impl::width_ [protected]

Definition at line 94 of file vil1_memory_image_impl.h.

int vil1_memory_image_impl::height_ [protected]

Definition at line 95 of file vil1_memory_image_impl.h.

int vil1_memory_image_impl::components_ [protected]

Definition at line 96 of file vil1_memory_image_impl.h.

int vil1_memory_image_impl::bits_per_component_ [protected]

Definition at line 97 of file vil1_memory_image_impl.h.

vil1_component_format vil1_memory_image_impl::component_format_ [protected]

Definition at line 98 of file vil1_memory_image_impl.h.

int vil1_memory_image_impl::bytes_per_pixel_ [protected]

Definition at line 100 of file vil1_memory_image_impl.h.

bool vil1_memory_image_impl::is_foreign_buf_ [protected]

Definition at line 101 of file vil1_memory_image_impl.h.

unsigned char* vil1_memory_image_impl::buf_ [protected]

Definition at line 103 of file vil1_memory_image_impl.h.

void*** vil1_memory_image_impl::rows_ [protected]

Definition at line 104 of file vil1_memory_image_impl.h.


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