Sounds like what you want is to embed this window into PyQt.  All you need
to do is define a QGraphicsView in your main window somewhere, and promote
it to an ImageView (header file should just read: pyqtgraph).

Then simply call the setImage function on it.  Here's a modified gist with
a simple example that might do what you want [1].

[1] https://gist.github.com/chrismullins/e5ce27ace4f3aa11fb564611e37698bd


On Tue, Aug 15, 2017 at 4:26 PM, Arun Shriram <[email protected]>
wrote:

> Hello,
>
> I'm trying to do some image analysis with a .tif file (that I've converted
> into a numpy.ndarray), and I'm trying to incorporate pyqtgraph with my
> current PyQt GUI. It seems that the best way to get the image analysis
> controls I need (ROI and histogramLUT) is to call pyqtgraph.image() on my
> data, as such:
>
> import pyqtgraph as pg
>
> data = tif_file.array() # assume this gives me numpy.ndarray
>
> pg.image(data)
>
> This automatically creates an ImageWindow with all the stuff I want.
> Great! However, I'm wondering how I can make all the items in this
> ImageWindow fit in my preexisting GUI. I would like the users to have the
> image and controls display in the same window they're operating on, rather
> than display in a new window. Is this possible at all? I would really
> appreciate it if someone could help me out. Please let me know if you need
> me to explain anything more clearly.
>
> Thanks,
> Arun Shriram
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyqtgraph" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/pyqtgraph/0ef2e976-939f-4224-9693-e69955c7c779%40googlegroups.com
> <https://groups.google.com/d/msgid/pyqtgraph/0ef2e976-939f-4224-9693-e69955c7c779%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/CAL1JtzDbL4Fst%2Bf%2BffmPdXbtaqzhX4C_JS3YujZhGLXOU4MDDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to