[ome-users] Question about Matlab Bio-Formats
Melissa Linkert
melissa at glencoesoftware.com
Thu Apr 9 17:00:42 BST 2015
Hi Qi,
> Sorry for bother. I have a question about Matlab Bio-formats. Now, I use
> openThumbBytes() function to get the thumbnail image of WSI. But the size
> of it is fixed at 128. This there any method to customized the thumbnail
> image size like (1000)? I know, I could resize it when I get.But if I
> resize it from 128 to 1000, the image will become blur.
>
> Secondly, sometime we want to get a re-scaled large part of WSI. for
> example, the whole WSI is 90000 x 90000, and we want [1:10000, 1:10000]
> area and save it to the size 500 x 500. I try to use bfgetPlane to extract
> 10000 x 10000 area from WSI and resize it by matlab. But the bfgetplane
> extraction part take a long time. Is there any quick method to do it? Thank
> you very much for your help.
If I understand correctly, you are working with files in the .ndpi
format. The files should then contain the slide at several increasingly
smaller resolutions; you might try opening the resolution closest to the
size that you want, and resizing that.
Assuming 'reader' is the result of calling bfGetReader as mentioned
previously:
%%%%
% this is the number of resolutions, along with typically one or
% two extra barcode images (which are always the last images)
numberOfImages = reader.getSeriesCount();
% show the XY dimensions of each resolution
for i = 0 : numberOfImages - 1
reader.setSeries(i);
fprintf('resolution %s: width = %s, height = %s\n', i, reader.getSizeX(), reader.getSizeY())
end
% replace the number in the next line with the most appropriate
% resolution number from the above output
reader.setSeries(2);
imageWidth = reader.getSizeX();
imageHeight = reader.getSizeY();
% bfGetPlane can now be used as explained previously,
% but be careful to use the current value of imageWidth
% and imageHeight when calculating tile sizes
%%%%
That should also be faster than opening tiles from the full resolution
image and resizing them. If that doesn't work though, please let us
know.
Regards,
-Melissa
On Thu, Apr 09, 2015 at 09:54:18AM -0400, Qi Gong wrote:
> Hello everyone,
>
> Sorry for bother. I have a question about Matlab Bio-formats. Now, I use
> openThumbBytes() function to get the thumbnail image of WSI. But the size
> of it is fixed at 128. This there any method to customized the thumbnail
> image size like (1000)? I know, I could resize it when I get.But if I
> resize it from 128 to 1000, the image will become blur.
>
> Secondly, sometime we want to get a re-scaled large part of WSI. for
> example, the whole WSI is 90000 x 90000, and we want [1:10000, 1:10000]
> area and save it to the size 500 x 500. I try to use bfgetPlane to extract
> 10000 x 10000 area from WSI and resize it by matlab. But the bfgetplane
> extraction part take a long time. Is there any quick method to do it? Thank
> you very much for your help.
>
> Sincerely,
> Qi
>
>
> --
> mobile phone: 2024060862
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
More information about the ome-users
mailing list