|
MorphologicalAttributeFilters
Public API documentation
|
Utility functions for basic image conversion and manipulation. More...
#include <Image.hpp>
Static Public Member Functions | |
| static int | to1D (int row, int col, int numCols) noexcept |
Converts (row, col) to a row-major linear index. | |
| static std::pair< int, int > | to2D (int index, int numCols) noexcept |
Converts a row-major linear index to (row, col). | |
| static ImageUInt8Ptr | createRandomColor (int *img, int numRowsOfImage, int numColsOfImage) |
| 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 * numColsOfImage integer labels. |
| numRowsOfImage | Number of input rows. |
| numColsOfImage | Number of input columns. |
numColsOfImage * 3 columns.