|
| Image (const Image ©) |
|
| Image (const CopyPlaceHolder &c) |
|
CopyPlaceHolder | copy_from_me () const |
|
void | copy_from (const BasicImage< T > ©) |
|
void | copy_from (const SubImage< T > ©) |
|
void | make_unique () |
| Make this image independent of any copies (i.e. force a copy of the image data). More...
|
|
const Image & | operator= (const Image ©of) |
|
template<class C > |
const Image & | operator= (Internal::ImagePromise< C > p) |
|
template<class C > |
| Image (Internal::ImagePromise< C > p) |
|
| Image () |
| Default constructor. More...
|
|
| Image (const ImageRef &size) |
|
| Image (const ImageRef &size, const T &val) |
|
| Image (const std::pair< ImageRef, T > &p) |
|
void | resize (const ImageRef &size) |
|
void | resize (const ImageRef &size, const T &val) |
|
| ~Image () |
| The destructor removes the image data. More...
|
|
| BasicImage (T *data, const ImageRef &size) |
|
| BasicImage (const BasicImage ©of) |
|
void | operator= (const BasicImage ©of) |
|
| ~BasicImage () |
| The image data is not destroyed when a BasicImage is destroyed. More...
|
|
const_iterator | begin () const |
|
iterator | begin () |
|
const_iterator | end () const |
|
iterator | end () |
|
| SubImage (T *data, const ImageRef &size, int stride) |
|
bool | in_image (const ImageRef &ir) const |
|
bool | in_image_with_border (const ImageRef &ir, int border) const |
|
| ~SubImage () |
| The image data is not destroyed when a BasicImage is destroyed. More...
|
|
T & | operator[] (const ImageRef &pos) |
|
const T & | operator[] (const ImageRef &pos) const |
|
T * | operator[] (int row) |
|
const T * | operator[] (int row) const |
|
ImageRef | pos (const T *ptr) const |
| Given a pointer, this returns the image position as an ImageRef. More...
|
|
const T * | data () const |
| Returns the raw image data. More...
|
|
T * | data () |
| Returns the raw image data. More...
|
|
iterator | begin () |
| Returns an iterator referencing the first (top-left) pixel in the image. More...
|
|
const_iterator | begin () const |
| Returns a const iterator referencing the first (top-left) pixel in the image. More...
|
|
iterator | end () |
| Returns an iterator pointing to one past the end of the image. More...
|
|
const_iterator | end () const |
| Returns a const iterator pointing to one past the end of the image. More...
|
|
void | copy_from (const SubImage< T > &other) |
|
ImageRef | size () const |
| What is the size of this image? More...
|
|
int | row_stride () const |
| What is the row stride of the image? More...
|
|
int | totalsize () const |
| What is the total number of elements in the image (i.e. size().x * size().y ), including padding. More...
|
|
void | zero () |
| Set all the pixels in the image to zero. This is a relatively fast operation, using memset . More...
|
|
void | fill (const T d) |
|
| SubImage (const SubImage ©of) |
|
SubImage | sub_image (const ImageRef &start, const ImageRef &size) |
|
const SubImage | sub_image (const ImageRef &start, const ImageRef &size) const |
|
SubImage & | ref () |
| Return a reference to a SubImage. Useful for passing anonymous SubImages to functions. More...
|
|
template<class T>
class CVD::Image< T >
A full image which manages its own data.
- Parameters
-
T | The pixel type for this image. Typically either CVD::byte or CVD::Rgb<CVD::byte> > are used, but images could be constructed of any available type. |
Images do reference counting on the data, so multiple images can point to one block of data. This means that copying an image is like copying a pointer (so use the same care); to further the analogy, operator[]() dereferences images. Copy constructing is quite fast (a 16-byte copy and an increment), so images can be efficiently passed back in functions or used in containers like std::vector
Loading and saving, format conversion and some copying functionality is provided by external functions rather than as part of this class. See the Image loading and saving, and format conversion module for documentation of these functions.
Definition at line 617 of file image.h.