Closed santicolom closed 9 months ago
Not all tiff files support lazy loading, you will have to convert them to be lazy-loadable if it doesn't work. You can use tiffit: https://github.com/EricThomson/tiffit
Yes, that worked, thank you.
I noticed there was a typo in the cell immediately after, tiffile.memmap should be tifffile.memmap. Thank you and hopefully this helps you.
Hi, I'm in the Visualize Results section of this code and I can't seem to get the visualization of the results.
https://github.com/nel-lab/mesmerize-core/blob/master/notebooks/cnmfe.ipynb
Code:
a = LazyTiff(df.iloc[0].caiman.get_input_movie_path()) a.shape
Error:
AttributeError Traceback (most recent call last) Cell In[25], line 1 ----> 1 a = LazyTiff(df.iloc[0].caiman.get_input_movie_path()) 2 a.shape
File ~\anaconda3\envs\mescore\lib\site-packages\mesmerize_core\arrays_tiff.py:27, in LazyTiff.init(self, path, shape) 13 """ 14 Lazy reader for tiff files. WIP, works for some tiff files. 15 Try
tifffile.memmap
first before tryingLazyTiff
(...) 23 manually set shape 24 """ 26 self._tif = tifffile.TiffFile(path) ---> 27 tiffseries = self._tif.series[0].levels[0] 29 if shape is None: 30 # TODO: someone who's better with tiff can help on this 31 if len(self._tif.pages) == 1:AttributeError: 'TiffPageSeries' object has no attribute 'levels'
Thank you in advance.