Hi, The "missing" piece is to remember that pyqtgraph leans heavily on the Qt GraphicsView framework <https://doc.qt.io/qt-5/graphicsview.html>. The scale, translations, rotations of the raw data points are handled by the GraphicsItem transforms <https://doc.qt.io/qt-5/qgraphicsitem.html#transformations>, which are really just affine transforms performed by the rendering engine.
You can fetch the raw data from, say, a PlotItem with getData(), but I think you'd need to apply your own affine transforms to the coordinates (you can retrieve the transform matrix with transform() <https://doc.qt.io/qt-5/qgraphicsitem.html#transform>though). As an aside, I have recently profiled laser spots using OpenCV, visualised with a pyqtgraph UI. It works quite well and can do it in realtime at decent frame rates. It's part of a larger project which is still in early stages of development, but the OpenCV parts might be work looking at, found in the _do_fit() method of this file: https://gitlab.com/ptapping/trspectrometer/-/blob/develop/trspectrometer/plugins/aligncam/alignmentpanel.py Patrick On Friday, 25 June 2021 at 2:10:46 am UTC+9:30 [email protected] wrote: > Been using pyqtgraph for some time. Very happy and impressed. > > An important question I have had for some time is: > > Is it possible to get access the data held in the graphic objects? > > For example.. I can create a line item. I can plot and I can rotate it and > translate it with pyqtgraph methods. > If it translate it how do I know where the new end points are? The > plotting engine must know otherwise it couldn't work. > > I understand it is a fast plotting library. But surely the underlying data > would be of extreme value for analysis? > > I have just used the isolineItem to find the contour of a laser spot. The > visual feedback is helpful. Though I don't know how to get the array of > data to proceed with things like finding the center. > > I seem to be missing something here....? > > Cheers > Alex -- 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/4461c61a-c932-4b62-b842-aadb25a3d30en%40googlegroups.com.
