Hello, so I've been trying to play around the 3D image in GLImageItem.py.
My goal is to plot a 3D array of shape (r, c, t) with images (1002, 1004,
115) and dtype uint16
In an out-of-the-box solution attempt i checked the data variable in the
example shape and type and adjusted to a float 3-dimensional array yet the
output is a white image.
The initial image is not white, to get the middle image in the stack one
could use the following (excerpt of variable tex3):
>>> data[:,:,shape[2]/2]
array([[10204, 11500, 11012, ..., 10472, 10020, 11232],
[13196, 13024, 13868, ..., 12200, 13252, 12676],
[13184, 11932, 13576, ..., 12668, 12256, 13216],
...,
[14496, 13908, 13652, ..., 13816, 14204, 13384],
[14472, 14536, 13900, ..., 13960, 15312, 14460],
[15072, 14856, 14984, ..., 15440, 15528, 15888]], dtype=uint16)
>>> data[:,:,shape[2]/2].shape
(1002, 1004)
tex3 = pg.makeRGBA(data[:,:,shape[2]/2], levels=levels)[0] # xy plane
tex3 is in that case an array of shape (1004, ) which is not representative
of the xy plane due to [0].. but removing that breaks hell loose..
| shape = self.data.shape
| AttributeError: 'tuple' object has no attribute 'shape'
|==============================<<
Error while drawing item <pyqtgraph.opengl.items.GLImageItem.GLImageItem
object at 0x10e990c30>.
changing to float is done using:
from skimage import img_as_float
Appreciate any help!
--
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/c6a67a3a-6f4e-44db-9b08-a53a97fb3860%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.