SainsburyWellcomeCentre/lasagna

tiff stack loader is pretty slow

Closed this issue · 3 comments

Much faster in MATLAB. Maybe because of the parallel read. Problems are evident with TIFFs of about 3 GB and over.

Charly's parallel reading with tifffile and multiprocessing works pretty quickly (https://github.com/adamltyson/cellfinder/blob/d311615c03c82deb54a249c931d4902a713219ff/cellfinder/tools/brain/brain_io.py#L261). I don't know how well this works on other OS's though.

Parallel reading seems to be for a series of tiffs. The issue I have right now is with tiff stacks. Charly is using tifffile.imread, which is also what I'm doing. However, it turns out the slow step isn't the loading but displaying the stack in Lasagna. It loads in under 10 seconds butt then spends the next 45 seconds displaying the image.

Fixed. It was the histogram calculations running on the full stack. b11c633