titusjan / argos

Argos: a data viewer that can read HDF5, NetCDF4, and other file formats.
GNU General Public License v3.0
178 stars 26 forks source link

levels argument is required for float input types #18

Closed Grumium closed 3 years ago

Grumium commented 3 years ago

Short description

fn.makeARGB() requires a levels argument why is not given. No backward compatibility. In case of floats, if no levels argument is provided, the 'min,max' values should be determined automatically from the image. In my case and image with integer values transitions to floats and raises the exception upon redrawing it.

Exception: levels argument is required for float input types Traceback (most recent call last): File "C:\XXX\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", line 834, in paint self.render() File "C:\XXX\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", line 561, in render fn.makeARGB(image, lut=lut, levels=levels, output=self._processingBuffer) File "C:\XXX\lib\site-packages\pyqtgraph\functions.py", line 1401, in makeARGB raise Exception('levels argument is required for float input types')

Tested environment(s)

PyQtGraph version: 0.12.1 (works)
PyQtGraph version: 0.12.2 (fails)
Qt Python binding: PyQt5