Discussion:
[pyqtgraph] getting latest image data in imageview
mohammad sarvi
2018-08-11 14:03:51 UTC
Permalink
I need to have a latest image data that displaying in imageview , would
you mind please helping me. thanks
--
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 pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/86d8bbd7-330d-43a9-b6ce-07edd2bb8368%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Patrick
2018-08-13 03:40:42 UTC
Permalink
You can get the ImageItem component from the ImageView, and then the image
data from the ImageItem using:

image = imageview.getImageItem().image

Not that the value can be None if the image hasn't been set yet.

(By the way, the trick to finding this is looking at the source code, by
clicking the green [source] link in the API documentation:
http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/ImageItem.html#ImageItem)
Post by mohammad sarvi
I need to have a latest image data that displaying in imageview , would
you mind please helping me. thanks
--
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 pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/480207c8-e9c7-42ad-84a5-3216c9c53eda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mohammad sarvi
2018-08-13 09:54:33 UTC
Permalink
Post by Patrick
You can get the ImageItem component from the ImageView, and then the image
image = imageview.getImageItem().image
Not that the value can be None if the image hasn't been set yet.
(By the way, the trick to finding this is looking at the source code, by
http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/ImageItem.html#ImageItem
)
Post by mohammad sarvi
I need to have a latest image data that displaying in imageview , would
you mind please helping me. thanks
Thanks for your Attention But i use viewBox inside a graphicsView and i
want the image that displaying inside
--
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 pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/eca953a9-6ed8-4355-97f1-2d6fde10319b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Patrick
2018-08-14 00:41:10 UTC
Permalink
Do you mean save an image file of the contents of the current plot window?
In that case there are exporters which can do that.
See http://www.pyqtgraph.org/documentation/exporting.html#exporting-from-the-api

(Otherwise, a ViewBox alone doesn't display an image, you must have added a
ImageItem or similar to the ViewBox to actually store and display image
data.)
Post by mohammad sarvi
Post by Patrick
You can get the ImageItem component from the ImageView, and then the
image = imageview.getImageItem().image
Not that the value can be None if the image hasn't been set yet.
(By the way, the trick to finding this is looking at the source code, by
http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/ImageItem.html#ImageItem
)
Post by mohammad sarvi
I need to have a latest image data that displaying in imageview , would
you mind please helping me. thanks
Thanks for your Attention But i use viewBox inside a graphicsView and i
want the image that displaying inside
--
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 pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/35c54115-c38a-478d-92ff-53ef06452967%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...