To use colormaps other than: ['viridis', 'plasma', 'inferno', 'magma'], please install matplotlib.
Traceback (most recent call last):
File "C:\Users\lhe97136\Work\GitHub\CCPi-Users-Antikythera\Visualization\resample-ui.py", line 635, in <module>
window = AntikitheraGUI()
File "C:\Users\lhe97136\Work\GitHub\CCPi-Users-Antikythera\Visualization\resample-ui.py", line 91, in __init__
self._plane_clipping()
File "C:\Users\lhe97136\Work\GitHub\CCPi-Users-Antikythera\Visualization\resample-ui.py", line 199, in _plane_clipping
observePlaneClipping(viewer1, viewer1.getInteractor(), "KeyPress")
File "C:\Users\lhe97136\Work\GitHub\CCPi-Users-Antikythera\Visualization\plane_clip_slice.py", line 44, in observePlaneClipping
transfer_function = CILColorMaps.get_color_transfer_function('gray',
File "C:\Users\lhe97136\AppData\Local\miniconda3\envs\cilviewer\lib\site-packages\ccpi\viewer\utils\colormaps.py", line 460, in get_color_transfer_function
colors = cls.get_color_map(cmap)
File "C:\Users\lhe97136\AppData\Local\miniconda3\envs\cilviewer\lib\site-packages\ccpi\viewer\utils\colormaps.py", line 453, in get_color_map
return colors
UnboundLocalError: local variable 'colors' referenced before assignment
The first line of the error (actually its just a print) is the useful part - the rest is not useful.
We should either make sure it returns nothing if matplotlib not found, or make it raise an exceptio rather than just doing a print.
If we don't have matplotlib we get an error like
The first line of the error (actually its just a print) is the useful part - the rest is not useful.
We should either make sure it returns nothing if matplotlib not found, or make it raise an exceptio rather than just doing a print.
CILViewer/Wrappers/Python/ccpi/viewer/utils/colormaps.py
Lines 432 to 451 in 65c5949