Skip to content
Snippets Groups Projects
Commit fecf60c1 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Use np.nanmin/nanmax instead of data.min/max - NIFTI images with nan

values are now displayed correctly
parent a209926e
No related branches found
No related tags found
No related merge requests found
......@@ -288,8 +288,8 @@ class ImageTexture(texture.Texture):
if self.__prefilter is not None:
data = self.__prefilter(data)
self.__dataMin = float(data.min())
self.__dataMax = float(data.max())
self.__dataMin = float(np.nanmin(data))
self.__dataMax = float(np.nanmax(data))
if refresh:
self.refresh()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment