Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewer does not display non-zero pixels #39

Open
vgenty opened this issue Jul 13, 2016 · 2 comments
Open

Viewer does not display non-zero pixels #39

vgenty opened this issue Jul 13, 2016 · 2 comments
Assignees
Labels

Comments

@vgenty
Copy link
Member

vgenty commented Jul 13, 2016

Yikes! Ariana found that the viewer may not display all non-zero pixels in the image when using user-controlled thresholding. Here is an example of a Nu in plane 1, with auto pyqtgraph intensity scale (that's why is looks like shit)

alt text

Set the imin threshold a little higher than 0, and there are non-zero pixels in the image if you slice on it the values are...
[ 2.50050282 2.87391782 2.25792432 3.22080231 3.17725968 1.86988342 1.64758134 3.24257207 2.84999657 2.88998723 3.7988553 1.76502311 1.17307568 4.05927277 1.23509991 1.21503234 4.26263475 4.66946697 1.23992372 4.14212132 2.64220333 3.4762044 3.35693979 3.57622218 3.47608447 3.77681541 3.72539306 4.3190136 3.80827284 1.18566716 5.65644979 3.04839444 2.34159589 8.38000679 1.78434169 1.01273596]

but the image is blank...
alt text

quick fix is to artificially boost the pixel values by 100 with
self.plot_mat*=100.0 placed on line 124 in

https://github.com/LArbys/LArCV/blob/master/mac/pyrgb/lib/image_types/plotimage.py

Now with an appropriate threshold, we see the pixels appear
alt text

I see 7 non zero pixels and it's confirmed on the slice
[ 4.05927277 4.26263475 4.66946697 4.14212132 4.3190136 5.65644979 8.38000679]

I've tried a number of things to get the pixels to scale which include

  • pyqtgraph.ImageItem.setLevels
  • opacity=1.0 in setImage function
  • setCompositionMode to QtGui.QPainter.CompositionMode_Plus (Both the alpha and color of the image and background pixels are added together.)

but so far an arbitrary scaling has resolved this. I will leave this open until I find a better way to address.

@vgenty vgenty added the bug label Jul 13, 2016
@vgenty vgenty self-assigned this Jul 13, 2016
@vgenty vgenty changed the title Viewer doesn't display non-zero pixels Viewer does not display non-zero pixels Jul 13, 2016
@twongjirad
Copy link
Member

This is definitely a strange bug. I see that, at least on my computers, the version of pyqtgraph I am using 0.9.8 is old. There is 0.9.10. In version 0.9.9 there are options for downsampling techniques. Maybe this miraculously addresses this.

@vgenty
Copy link
Member Author

vgenty commented Jul 28, 2016

@ahack379 did we get this resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants