We're Hiring!

MATLAB and reading data from multiple series

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

MATLAB and reading data from multiple series

Postby fordanic » Thu Aug 29, 2013 1:28 pm

In the current implementation of bfopen.m it is possible, and probably preferable, to input the parameters x, y, w, h to set an arbitrary image tile to be read from the file.

However, given that the file contains several series, e.g. both subsampled versions of the original image but also label, macro and thumbnail images, the parameters are not relevant for the other series contained in the file. For subsampled images the parameters could simply be scaled according to the scale factor and for label, macro and thumbnail images they should not be applied at all. So far so good.

When I have been playing around with a couple of images from Apeiro and Hamamatsu, download from openslide.org, I don't seem to find any metadata that I can use to determine what kind of image that is contained in the current series. So far it seems that the first series is the original image, and then comes a number of subsampled images and finally the label, macro and thumbnail images. But I cannot determine the number of subsampled images.

Any suggestions?

/Daniel
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm

Re: MATLAB and reading data from multiple series

Postby sbesson » Thu Aug 29, 2013 8:02 pm

Hi Daniel,

you are right. The propagation of the optional (x,y,w,h) tile input is not working well in the case of multi-series images. The main problem here is that the relationship between images in a multi-series file is very dependent of the image format.

You may be able to access information on the type of image using retrieval methods on the populated OME metadata. For instance, looking at the SVS specifications, you should be able to retrieve this information using getImageDescription():

Code: Select all
bfCheckJavaPath();
r = bfGetReader('CMU-1.svs')
r.getMetadataStore().getImageDescription(0)
r.getMetadataStore().getImageDescription(1)
r.getMetadataStore().getImageDescription(2)
r.getMetadataStore().getImageDescription(3)
r.getMetadataStore().getImageDescription(4)
r.getMetadataStore().getImageDescription(5)


or for VMS images, using the getImageName() method:

Code: Select all
bfCheckJavaPath();
r = bfGetReader('CMU-1-40x - 2010-01-12 13.24.05.vms')
r.getMetadataStore().getImageName(1)
r.getMetadataStore().getImageName(2)
r.getMetadataStore().getImageName(3)


Hope this helps,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: MATLAB and reading data from multiple series

Postby fordanic » Wed Sep 04, 2013 12:37 pm

Ok, it seems to provide some sort of information that can be used. Cheers.

You refer to the specification of SVS as way of finding out which metadata to use. Is this something that is available for others or how can I know which tags to look at when working with various images?

Best,
Daniel
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm

Re: MATLAB and reading data from multiple series

Postby sbesson » Thu Sep 05, 2013 7:37 am

Hi Daniel,

generally, the Supported formats section of the Bio-Formats documentation should contain some valuable information in terms of the available metadata.

For instance in the case of the Aperio SVS TIFF format, the Aperio SVS TIFF page gives you an overview of the format including the supported versions and the SVS Reader page lists all the metadata that can be retrieved from the MetadataStore.

Hope this answers your question,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: MATLAB and reading data from multiple series

Postby fordanic » Thu Sep 05, 2013 7:52 am

Once again, thank you so much for your help.

/Danne
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest