MRaster lib 21.0.0.0
Image Processing Library
|
For a bit more detail about MRaster: http://richmit.github.io/mraster/index.html
A quick start guide: http://richmit.github.io/mraster/QuickStart.html
The code: [[https://github.com/richmit/mraster/]]
The code for this library all lives within the namespace of 'mjr' – my initials. This should help to avoid namespace conflicts.
At this time everything is implemented in header files.
As far as I know this code infringes upon no patents or other IP.
The library is template based and the primary players, canvas and color classes, are all templates. Common data types, 4 channel/24-bit color types and canvases that use them for example, all have typedefs. In addition, the various headers implementing the templates are included by headers defining the typedefs. In this way, common usage of the library requires no use of template syntax (or the extra typing).
The include files:
Color types are intended to store all color information for a single pixel. Most common image structures can be identified by the number of channels (Red, Green, and Blue for example) and the depth of each channel (8-bit for example). The most common configurations are:
|---------+---------+------+-------+------------------+-------------------------------------------------| | Channel | Bits | Data | bits | | | | Count | Per | Data | per | Common Name | Notes | | | Channel | | pixel | | | |---------+---------+------+-------+------------------+-------------------------------------------------| | 3 | 8 | RGB | 24 | 24-bit truecolor | Very common format. | | 4 | 8 | RGBA | 32 | truecolor+alpha | Very common format. | | 3 | 16 | RGB | 48 | 48-bit color | High quality digital camera sensors. | | 3 | 32 | RGB | 96 | 96-bit color | Usually a fusion from multiple CCDs | | 1 | 8 | Grey | 8 | 8-bit greyscale | Surveillance and Low Quality scientific imaging | | 1 | 16 | Grey | 16 | 16-bit greyscale | Typical scientific CCD equipment | | 1 | 32 | Grey | 32 | 32-bit greyscale | High end scientific CCD equipment | |---------+---------+------+-------+------------------+-------------------------------------------------|
Several aspects of the colorTpl template are not included in the Doxygen documentation because Doxygen has trouble with complex meta-programming constructs. In particular:
Primitive drawing functions generally come in several forms:
This library supports both the "moveTo/lineTo" paradigm (i.e. move to A, draw line to B), and the "absolute" paradigm (i.e. draw a line from A to B). Because of this, some primitive drawing functions also have forms with fewer coordinates specified. For example, we have a point drawing function that takes no arguments. Just with fewer coordinates. Some primitives, like circles, require extra parameters to describe the primitive. Such parameters right before the color arguments or last in the argument list if no color is specified.