labsyspharm / minerva-author

Tool to create images and configuration files for Minerva-Story
MIT License
15 stars 14 forks source link

Add back-end support for floating point images #29

Closed jmuhlich closed 3 years ago

jmuhlich commented 3 years ago

This changes the internal representation of the Low/High thresholds to the same [0, 1]-based range that's stored in the JSON, instead of scaling them to [0, 65535] as before. These thresholds are scaled to the range of representable values for integer image types only when calling the rendering code (they are left unchanged for float image types).

The conversion from float rendered image to uint8 image for JPEG encoding now includes a rounding step to improve accuracy.