elhuhdron / pylibczi

Python module utilizing libCZI for reading Zeiss CZI files.
GNU General Public License v3.0
9 stars 8 forks source link

Error running the code #5

Closed mrymsadeghi closed 4 years ago

mrymsadeghi commented 4 years ago

Hi , I can't open the images, I run into this error.

Traceback (most recent call last): File "C:/Users/q371ms/PycharmProjects/MouseBrain/tempo5.py", line 16, in CziFile.plot_image(czifile.read_image(), figno=4, show=False) File "C:\Users\q371ms\PycharmProjects\MouseBrain\venv\lib\site-packages\pylibczi\CziFile.py", line 108, in read_image img = np.squeeze(self.czilib.CziFile(self.czi_filename).asarray()) File "C:\Users\q371ms\PycharmProjects\MouseBrain\venv\lib\site-packages\czifile\czifile.py", line 443, in asarray out = create_output(out, self.shape, self.dtype) File "C:\Users\q371ms\PycharmProjects\MouseBrain\venv\lib\site-packages\tifffile\tifffile.py", line 11044, in create_output return numpy.zeros(shape, dtype) MemoryError: Unable to allocate array with shape (6, 3, 27777, 68044, 1) and data type uint16

elhuhdron commented 4 years ago

The error means you're out of memory, i.e., the image is too large for you to view at once on your machine. Regardless, as noted in the udpated README, please try the aicspylibczi fork as it contains many new features that improve greatly on the original. This branch has a scale factor feature where you could load a downsampled version that would take less memory.