Hey Christopher,
This is great! Yes, embedding in PyQt was exactly what I wanted. Thank you 
for helping out! However, I'm not quite exactly how to go about this. 
Sorry, I'm kind of a newbie with PyQt and pyqtgraph, so I have a few 
questions. Should I redefine QGraphicsView as a class? Is that what you're 
doing in line 43 of the UI code you attached?
Thanks again,
Arun

On Tuesday, August 15, 2017 at 2:09:34 PM UTC-7, Christopher Mullins wrote:
>
> 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] 
> <javascript:>> 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] <javascript:>.
>> 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/867d6aeb-3002-491c-89c4-2253b96ee719%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to