#include <vil1_memory_image_of.h>
Inheritance diagram for vil1_memory_image_of< T >:

vil1_memory_image_of<Type> provides a templated interface to a vil1_memory_image. It is assumed that the user has queried the pixel size of the image and is instantiating an ImageBuffer of the appropriate type.
This allows C-efficiency access with C++ notational convenience after the type has been ascertained. Note that this should not be used for images too large to fit in memory.
CAVEAT PROGRAMMER: Each raster (row) is stored in a contiguous chunk of memory and the operator [] method gives a pointer to the beginning of a raster. Thus image[i][j] is the element in the i-th row and j-th column. However, image(x, y) is the element in the x-th column and y-th row.
Definition at line 46 of file vil1_memory_image_of.h.
Public Types | |
| typedef T | pixel_type |
| typedef T * | iterator |
| typedef T const * | const_iterator |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| unsigned | size () const |
| vil1_memory_image_of () | |
| Empty image. | |
| vil1_memory_image_of (vil1_memory_image_of< T > const &) | |
| This is a copy constructor, but it doesn't make a new buffer. | |
| vil1_memory_image_of (vil1_image const &image) | |
| Copy given image into a memory buffer. | |
| vil1_memory_image_of (int sizex, int sizey) | |
| Construct a w x h image, pixel format is determined from T. | |
| vil1_memory_image_of (T *buf, int sizex, int sizey) | |
| Construct a w x h image, pixel format is determined from T from memory previously created and pointed to by buf. | |
| ~vil1_memory_image_of () | |
| Clearly, this will deallocate the memory buffer. | |
| vil1_memory_image_of< T > & | operator= (vil1_memory_image_of< T > const &) |
| This method hides the operator= in the base class. | |
| vil1_memory_image_of< T > & | operator= (vil1_image const &) |
| Copy a vil1_image, only if it's in an appropriate format. | |
| void | set (vil1_image const &image) |
| Load image. | |
| void | resize (int width, int height) |
| These override the methods in the base class. | |
| T & | operator() (int x, int y) |
| Return read/write reference to pixel at (x,y). | |
| T const & | operator() (int x, int y) const |
| T * | operator[] (int y) |
| Return pointer to raster y. | |
| T const * | operator[] (int y) const |
| T *const * | row_array () |
| Return pointer to array of rasters. aka known as data_array() for matrices. | |
| T const *const * | row_array () const |
| T * | get_buffer () |
| Return pointer to the memory buffer. | |
| T const * | get_buffer () const |
| bool | in_range (int x, int y) const |
| Return true if (x,y) is a valid index into this buffer. | |
| bool | in_range_window (int x, int y, int w) const |
| Return true if (x+/-w,y+/-h) are valid indices into this buffer. | |
| bool | in_range (int x, int y, unsigned w, unsigned h) const |
| Return true if the region of size w,h starting at x,y is valid in this buffer. | |
| void | fill (T const &) |
| Fill with given value. | |
| int | width () const |
| Dimensions: Planes x W x H x Components. | |
| int | height () const |
| Dimensions: Planes x W x H x Components. | |
| void | assert_size (int width, int height) const |
| void | recache_from_impl () |
| Reset this class's member variables from the image implementation. | |
| int | planes () 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. | |
| 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_impl * | impl () const |
| use "sptr.impl()" to get a pointer to the impl object. | |
Protected Attributes | |
| int | width_ |
| int | height_ |
| void ** | rows0_ |
| vil1_image_impl * | ptr |
Private Member Functions | |
| void | resize (int planes, int width, int height) |
|
|||||
|
Definition at line 57 of file vil1_memory_image_of.h. |
|
|||||
|
Definition at line 53 of file vil1_memory_image_of.h. |
|
|||||
|
Definition at line 50 of file vil1_memory_image_of.h. |
|
|||||||||
|
Empty image.
Definition at line 15 of file vil1_memory_image_of.txx. |
|
||||||||||
|
This is a copy constructor, but it doesn't make a new buffer.
Definition at line 21 of file vil1_memory_image_of.txx. |
|
||||||||||
|
Copy given image into a memory buffer. If it's already a memory image, do as the copy constructor (above) does. Definition at line 27 of file vil1_memory_image_of.txx. |
|
||||||||||||||||
|
Construct a w x h image, pixel format is determined from T.
Definition at line 38 of file vil1_memory_image_of.txx. |
|
||||||||||||||||||||
|
Construct a w x h image, pixel format is determined from T from memory previously created and pointed to by buf.
Definition at line 46 of file vil1_memory_image_of.txx. |
|
|||||||||
|
Clearly, this will deallocate the memory buffer.
Definition at line 84 of file vil1_memory_image_of.h. |
|
||||||||||||
|
Definition at line 137 of file vil1_memory_image.cxx. |
|
|||||||||
|
Definition at line 58 of file vil1_memory_image_of.h. |
|
|||||||||
|
Definition at line 54 of file vil1_memory_image_of.h. |
|
|
Format.
Definition at line 48 of file vil1_image.h. |
|
|
Number of columns.
Definition at line 83 of file vil1_image.h. |
|
|
Format.
Definition at line 51 of file vil1_image.h. |
|
|
Dimensions: Planes x W x H x Components.
Definition at line 45 of file vil1_image.h. |
|
|||||||||
|
Definition at line 59 of file vil1_memory_image_of.h. |
|
|||||||||
|
Definition at line 55 of file vil1_memory_image_of.h. |
|
|
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. |
|
||||||||||
|
Fill with given value.
Definition at line 102 of file vil1_memory_image_of.txx. |
|
|||||||||
|
Definition at line 120 of file vil1_memory_image_of.h. |
|
|||||||||
|
Return pointer to the memory buffer.
Reimplemented from vil1_memory_image. Definition at line 119 of file vil1_memory_image_of.h. |
|
|
return the ith plane.
Definition at line 55 of file vil1_image.h. |
|
||||||||||||
|
Getting property information.
Definition at line 66 of file vil1_image.h. |
|
||||||||||||||||||||||||
|
Copy from image to buf.
Definition at line 58 of file vil1_image.h. |
|
|
return size in bytes.
Definition at line 37 of file vil1_image.cxx. |
|
|
Dimensions: Planes x W x H x Components.
Reimplemented from vil1_image. Definition at line 60 of file vil1_memory_image.h. |
|
|
use "sptr.impl()" to get a pointer to the impl object.
Definition at line 150 of file vil1_image.h. |
|
||||||||||||||||||||||||
|
Return true if the region of size w,h starting at x,y is valid in this buffer.
Definition at line 131 of file vil1_memory_image_of.h. |
|
||||||||||||||||
|
Return true if (x,y) is a valid index into this buffer.
Definition at line 123 of file vil1_memory_image_of.h. |
|
||||||||||||||||||||
|
Return true if (x+/-w,y+/-h) are valid indices into this buffer.
Definition at line 126 of file vil1_memory_image_of.h. |
|
|
conversion to bool.
Definition at line 142 of file vil1_image.h. |
|
|
inverse conversion to bool.
Definition at line 146 of file vil1_image.h. |
|
||||||||||||||||
|
Definition at line 108 of file vil1_memory_image_of.h. |
|
||||||||||||||||
|
Return read/write reference to pixel at (x,y).
Definition at line 107 of file vil1_memory_image_of.h. |
|
|
needed for sorted containers of images.
Definition at line 137 of file vil1_image.h. |
|
||||||||||
|
Copy a vil1_image, only if it's in an appropriate format. This routine does not try to guess how to convert images which are not compatible with T. Reimplemented from vil1_image. Definition at line 78 of file vil1_memory_image_of.txx. |
|
||||||||||
|
This method hides the operator= in the base class.
Definition at line 71 of file vil1_memory_image_of.txx. |
|
|
equality means equality of implementation, not pixels.
Definition at line 132 of file vil1_image.h. |
|
||||||||||
|
Definition at line 112 of file vil1_memory_image_of.h. |
|
||||||||||
|
Return pointer to raster y.
Definition at line 111 of file vil1_memory_image_of.h. |
|
|
Dimensions: Planes x W x H x Components.
Definition at line 36 of file vil1_image.h. |
|
|
Print a 1-line summary of contents.
Definition at line 13 of file vil1_image.cxx. |
|
||||||||||||||||||||||||
|
Copy from buf to image.
Definition at line 62 of file vil1_image.h. |
|
|
Reset this class's member variables from the image implementation. This is is useful if the impl object has been modified outside the control of this object. Definition at line 189 of file vil1_memory_image.cxx. |
|
||||||||||||||||||||
|
Reimplemented from vil1_memory_image. Definition at line 95 of file vil1_memory_image_of.txx. |
|
||||||||||||||||
|
These override the methods in the base class.
Reimplemented from vil1_memory_image. Definition at line 86 of file vil1_memory_image_of.txx. |
|
|||||||||
|
Definition at line 116 of file vil1_memory_image_of.h. |
|
|||||||||
|
Return pointer to array of rasters. aka known as data_array() for matrices.
Definition at line 115 of file vil1_memory_image_of.h. |
|
|
Number of rows.
Definition at line 81 of file vil1_image.h. |
|
||||||||||
|
Load image.
Definition at line 64 of file vil1_memory_image_of.txx. |
|
||||||||||||
|
Setting property information.
Definition at line 70 of file vil1_image.h. |
|
|||||||||
|
Definition at line 61 of file vil1_memory_image_of.h. |
|
|
Dimensions: Planes x W x H x Components.
Reimplemented from vil1_image. Definition at line 59 of file vil1_memory_image.h. |
|
|
Definition at line 70 of file vil1_memory_image.h. |
|
|
Definition at line 155 of file vil1_image.h. |
|
|
Definition at line 71 of file vil1_memory_image.h. |
|
|
Definition at line 69 of file vil1_memory_image.h. |
1.4.4