Request for Changes-76: Single band color-mapping in Monteverdi

From OTBWiki
Jump to: navigation, search

Status

Summary

This RFC brings new shader effects in Monteverdi, for global and local color-mapping of a single image band.

Rationale

Color-mapping enhances perception of details in single band mode. It is very usefull when viewing DSM images for instance.

Implementation details

Classes and files

Colormaps were imported from ITK (see this Insight Journal paper). Imported colormaps are Jet, Hot, Cool, Summer and Winter. Other colormaps from the paper could be easily imported, as well as colormaps from other sources, as long as mapping formula is provided. Note that mapping is not done through LUT interpolation but using an explicit formula.

Visualization/Ice

StandardShader class has been updated to provide the new effects :

  • SHADER_LUT_JET
  • SHADER_LUT_HOT
  • SHADER_LUT_WINTER
  • SHADER_LUT_SUMMER
  • SHADER_LUT_COOL

Mapping is applied after shader range normalization and gamma correction.

Local version using local contrast range are also implemented :

  • SHADER_LUT_LOCAL_JET
  • SHADER_LUT_LOCAL_HOT
  • SHADER_LUT_LOCAL_WINTER
  • SHADER_LUT_LOCAL_SUMMER
  • SHADER_LUT_LOCAL_COOL
Visualisation/MonteverdiCore and Visualization/MonteverdiGui

Various classes have been modified so as to :

  • Add the new effects to the shader toolbar,
  • Filter available effects depending on visualization mode :
    • RGB: No LUT shaders,
    • Grayscale: No spectral angle