Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyqtgraph - Is it possible to have a ImageView without histogram?

I currently have a ImageView showing a Dicom image, but i don't want that histogram on the side. And with possible,move those two buttons to another place. How can I make that?

like image 291
depaulagu Avatar asked Dec 04 '22 00:12

depaulagu


1 Answers

I know it's late, but for anybody trying to figure this out in the future who wants an imageview and NOT an imageitem:

Assuming you have an imageview labled imv and a boolean, show_histogram, you can toggle displaying the histogram (and the two buttons below it) with the following code.

if show_histogram:
    imv.ui.histogram.show()
    imv.ui.roiBtn.show()
    imv.ui.menuBtn.show()
else:
    imv.ui.histogram.hide()
    imv.ui.roiBtn.hide()
    imv.ui.menuBtn.hide()
like image 97
James Grammatikos Avatar answered Dec 06 '22 15:12

James Grammatikos