pyplati / platipy

Processing Library and Analysis Toolkit for Medical Imaging in Python
https://pyplati.github.io/platipy/
Apache License 2.0
105 stars 24 forks source link

ImageVisualiser Window level #84

Closed pchlap closed 2 years ago

pchlap commented 2 years ago

Hey @rnfinnegan ,

I was having a few issues setting the intensity range nicely using the image visualiser. My images are scaled to the range of -1, 1 so I tried passing [-1, 1] to window. However I was getting some strange output.

I looked into the code, and I saw that internally the window was being used like this:

https://github.com/pyplati/platipy/blob/d2d67d419f2be856bb1e7ec550c58bfcbf51f289/platipy/imaging/visualisation/visualiser.py#L523

and when I changed it to simply:

clim=self.__window,

it looks much better for my images. Am I missing something here?

Thanks.