Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::ColourMap Class Reference

Applies a colour map to an image. More...

#include <Utils/ColourMap.hh>

Public Member Functions

void Apply (const Image< float > &imageIn, Image< unsigned char > &imageOut)
 Applies the current ColourMap to the given image and returns the result. More...
 
 ColourMap (const ColourGradient< unsigned char > &mapGradient)
 Constructor. More...
 
 ColourMap (ColourGradient< unsigned char >::ColourGradientType gradientType=ColourGradient< unsigned char >::Gray)
 Constructor. More...
 

Detailed Description

Applies a colour map to an image.

Todo:
so far only float images are supported
Author
rwulff
Date
07/2013

Definition at line 43 of file ColourMap.hh.

Constructor & Destructor Documentation

BIAS::ColourMap::ColourMap ( const ColourGradient< unsigned char > &  mapGradient)
inline

Constructor.

Creates a ColourMap with the given gradient.

Parameters
mapGradientthe gradient to use for colouring the image

Definition at line 55 of file ColourMap.hh.

BIAS::ColourMap::ColourMap ( ColourGradient< unsigned char >::ColourGradientType  gradientType = ColourGradient<unsigned char>::Gray)
inline

Constructor.

Creates a ColourMap with one of the preset gradients.

Parameters
gradientTypethe gradient preset type

Definition at line 66 of file ColourMap.hh.

Member Function Documentation

void ColourMap::Apply ( const Image< float > &  imageIn,
Image< unsigned char > &  imageOut 
)

Applies the current ColourMap to the given image and returns the result.

A copy of the image is normalised to [0, 1] before the map is applied.

Parameters
[in]imageIninput image to apply colour map on. must be single-channel
[out]imageOutthe coloured image

Definition at line 31 of file ColourMap.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), and BIAS::Image< StorageType >::Init().


The documentation for this class was generated from the following files: