CellProfiler / python-bioformats

Read and write life sciences file formats
Other
125 stars 45 forks source link

bioformats.write_image pixels problem #122

Open goodjs1 opened 4 years ago

goodjs1 commented 4 years ago

FYI. 'Pixels' object has no attribute 'shape'. I tried to manually add shape parameters to it, there is still error in other functions.

AttributeError Traceback (most recent call last)

in ----> 1 bioformats.write_image(pathname, **pixels**, pixel_type, c=0, z=0, t=0, size_c=1, size_z=1, size_t=1, channel_names=None) c:\users\gqand\appdata\local\programs\python\python36\lib\site-packages\bioformats\formatwriter.py in write_image(pathname, pixels, pixel_type, c, z, t, size_c, size_z, size_t, channel_names) 75 p = omexml.image(0).Pixels 76 assert isinstance(p, ome.OMEXML.Pixels) ---> 77 p.SizeX = pixels.shape[1] 78 p.SizeY = pixels.shape[0] 79 p.SizeX = pixels.SizeX AttributeError: 'Pixels' object has no attribute 'shape'