imread issues when loading large TIFF's

4 visualizaciones (últimos 30 días)
Mark Buckup
Mark Buckup el 21 de Oct. de 2019
Comentada: Ashish Uthama el 10 de Mayo de 2024
I have large TIFF image files that I am loading (i.e. 80k by 60k by 3 arrays) and when I call portions of them using 'PixelRegion', there seems to be inconsistency when I run it every time. In other words, sometimes I run a y range of 1:1500 and x range of 1:1500 and the program outputs the bottom right of the image, whereas it should output the top left. Sometimes when I do this repeatedly, other portions of the image are outputted. I am not redefining any variables and am simply playing with this in the command line. Has anyone ever had this issue?
  2 comentarios
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 30 de Abr. de 2024
I am having the same problem. I have whole slide images and the location specified by PixelRegion does not match what would be the region if you load the whole image.
Did you find a way around for this?
Obviously I can read the whole image and then crop, but the point is reading only a small region for speed and to avoid memory problems.
Ashish Uthama
Ashish Uthama el 10 de Mayo de 2024
This smells like a bug! Please do contact technical support to report it.

Iniciar sesión para comentar.

Respuestas (1)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 1 de Mayo de 2024
Hello
I have found a way around this. Instead of using imread, I used blockedImage
bim= blockedImage(nameOfYourFile);
imLevel1 = getRegion(bim,[1200 900],[1600 1800],Level=2);
And this works well for tiff images with many levels. Hope this helps.
More details here

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by