libcvd
|
A full image which manages its own data. More...
#include <image.h>
Public Types | |
typedef T | value_type |
The data type of the pixels in the image. | |
Public Member Functions | |
Image & | copy_from (const SubImage< T > &other) |
Image (const SubImage< T > &i) | |
Copy-ish constructor: new allocation and copy the data. More... | |
Image (const Image &i) | |
Copy constructor: new allocation and copy the data. More... | |
Image (Image &&move_from) | |
Move constructor: steal the pointer. | |
Image & | operator= (const Image &i) |
Copy the data. More... | |
Image & | operator= (Image &&move_from) |
template<class C > | |
const Image & | operator= (Internal::ImagePromise< C > p) |
template<class C > | |
Image (Internal::ImagePromise< C > p) | |
Image () | |
Default constructor: everything set to zero. | |
Image (const ImageRef &size) | |
Create an empty image of a given size. More... | |
Image (const ImageRef &size, const T &val) | |
Create a filled image of a given size. More... | |
void | resize (const ImageRef &size) |
Resize the image (destroying the data). More... | |
void | resize (const ImageRef &size, const T &val) |
Resize the image (destroying the data). More... | |
~Image () | |
The destructor removes the image data. | |
![]() | |
virtual | ~BasicImage () |
The image data is not destroyed when a BasicImage is destroyed. | |
ConstPointerType | data () const |
Returns the raw image data. | |
PointerType | data () |
Returns the raw image data. | |
void | copy_from (const BasicImage< C > &other) |
ImageRef | size () const |
What is the size of this image? | |
void | zero () |
Set image data to all zero bytes. More... | |
void | fill (const C d) |
Set all the pixels in the image to a value. More... | |
BasicImage (const BasicImage ©of)=default | |
Copy constructor. More... | |
BasicImage & | operator= (const BasicImage ©of)=default |
Assignment operator. More... | |
![]() | |
ImageData (const ImageData &)=default | |
ImageData (void *data, size_t len, ImageRef sz) | |
ImageData (void *data, ImageRef sz) | |
ImageData & | operator= (const ImageData &)=default |
size_t | datalength () const |
What is the row stride of the image? | |
Additional Inherited Members | |
![]() | |
using | PointerType = void * |
using | ConstPointerType = const void * |
![]() | |
void * | my_data |
ImageRef | my_size |
size_t | data_length |
A full image which manages its own data.
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. |
The images behave much like 2D STL vectors. Iterators iterate over the pixels.
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.
|
inline |
Copy-ish constructor: new allocation and copy the data.
copy | The image to copy |
|
inline |
Copy constructor: new allocation and copy the data.
copy | The image to copy |
|
inline |
Create an empty image of a given size.
size | The size of image to create |
|
inline |
Create a filled image of a given size.
size | The size of image to create |
val | The value to fill the image with |
|
inline |
Copy the data.
copyof | The image to copy |
|
inline |
Resize the image (destroying the data).
size | The new size of the image |
|
inline |
Resize the image (destroying the data).
size | The new size of the image |
val | The value to fill the image with |