#include <MagickCodec.h>
This needs to be a separate class due to different template specializations for color images. This one is for gray-scale images.
Static Public Methods | |
| const char * | getColorType () |
| Return "I", since one-layer images are always intensity images. | |
| void * | getPixels (const util::Matrix< T > &mat) |
| Get the pixel data from a matrix. | |
| void | destroyPixels (void *pixels) |
| Destroy the pointer returned by getPixels(). | |
| T * | getPixels (::Image *image) throw (util::MatrixException&) |
| Get the pixel data from an ImageMagick image. | |
| size_t | getPixelSize () |
| Get the number of bytes each pixel needs for storage. | |
|
|||||||||
|
Return "I", since one-layer images are always intensity images. This value is interpreted by the underlying ImageMagick library. |
|
||||||||||
|
Get the pixel data from an ImageMagick image. This method is used to convert an ImageMagick image to a matrix. The pixel array must be deallocated by the caller with delete[], if the responsibility is not given to a matrix. An example:
Image* image = (get this somehow); int* data MagickConverter<int>getPixels(image); Matrix<int> matrix(image->rows, image->columns, data, true);
|