|
mmcfilters
Public API documentation
|
Utility functions for basic image conversion and manipulation. More...
#include <Image.hpp>
Static Public Member Functions | |
| static PixelId | to1D (int row, int column, int numColumns) noexcept |
Converts (row, column) to a row-major linear index. | |
| static std::pair< int, int > | to2D (PixelId index, int numColumns) noexcept |
Converts a row-major linear index to (row, column). | |
| static ImageUInt8Ptr | createRandomColor (int *img, int numRowsOfImage, int numColumnsOfImage) |
| Creates a random-colour visualisation from an integer-labelled image. | |
Utility functions for basic image conversion and manipulation.
Groups helpers for converting between 1D/2D coordinates and for generating colour visualisations from integer labels.
|
inlinestatic |
Creates a random-colour visualisation from an integer-labelled image.
The output is a row-major uint8_t image with three adjacent columns per input pixel, storing RGB triples as (R, G, B). Labels are used as array indices and therefore must be non-negative.
| img | Pointer to numRowsOfImage * numColumnsOfImage integer labels. |
| numRowsOfImage | Number of input rows. |
| numColumnsOfImage | Number of input columns. |
numColumnsOfImage * 3 columns.