google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.02k stars 283 forks source link

Fix: automatic range computation in transfer functions for float32 datasets no longer fails for one point #596

Closed seankmartin closed 3 weeks ago

seankmartin commented 1 month ago

Previously, the auto range could get computed as [point_x_value, 1] where point_x_value > 1 with only one point, which would cause incorrect transfer function calculations. This could only happen for float32 datasets. This is to correct for this, by setting the range to [point_x_value, point_x_value + 1] for single point transfer functions and float32 data.