<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Qi,
<div class=""><br class="">
</div>
<div class="">In the Bio-Formats developer documentation we have a section on handling whole slide images which may be of interest to you:<a href="https://docs.openmicroscopy.org/bio-formats/5.7.2/developers/wsi.html" class="">Working with whole slide images</a></div>
<div class="">There is also a short example on reading sub resolutions: <a href="https://github.com/openmicroscopy/bioformats/blob/develop/components/formats-gpl/utils/SubResolutionExample.java" class="">https://github.com/openmicroscopy/bioformats/blob/develop/components/formats-gpl/utils/SubResolutionExample.java</a></div>
<div class=""><br class="">
</div>
<div class="">More generally, in Bio-Formats access to metadata is provided via the MetadataStore and MetadataRetrieve interfaces. In this instance we would use MetadataRetrieve to access getters for all of the available metadata in the OME-XML model objects.</div>
<div class="">MetadataRetrieve can be used as below and a full list of the available getters can be found at <a href="https://downloads.openmicroscopy.org/bio-formats/5.7.2/api/loci/formats/meta/MetadataRetrieve.html" class="">https://downloads.openmicroscopy.org/bio-formats/5.7.2/api/loci/formats/meta/MetadataRetrieve.html</a></div>
<div class="">
<pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(236, 239, 241); color: rgb(69, 90, 100); line-height: 15.6px; border-top-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-width: 1px; border-bottom-color: rgb(170, 204, 153); orphans: 2; widows: 2;" class="">ServiceFactory factory = new ServiceFactory();
OMEXMLService service = factory.getInstance(OMEXMLService.class);
MetadataRetrieve retrieve = service.asRetrieve(reader.getMetadataStore());</pre>
</div>
<div class=""><br class="">
</div>
<div class="">Additionally Bio-Formats also stores original metadata which is not a part of the OME-XML model as key value pairs. The metadata stored here will differ depending on the specific format being read. These values can be accessed using the FormatReader
interface as shown below:</div>
<div class="">
<pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(236, 239, 241); color: rgb(69, 90, 100); line-height: 15.6px; border-top-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-width: 1px; border-bottom-color: rgb(170, 204, 153); orphans: 2; widows: 2;" class="">// to retrieve original metadata specific to the current series
<span style="font-family: Menlo;" class="">Hashtable<String, Object> seriesMetadata = reader.getSeriesMetadata();</span>
// to retrieve original metadata not unique to the series
Hashtable<String, Object> globalMetadata = reader.getGlobalMetadata();</pre>
<div class=""><br class="">
</div>
<div class="">I hope that is of help as a starting point but if there is still specific metadata fields which you are still unsure how to access please do let us know along with the format you are using and we can help further.</div>
</div>
<div class=""><br class="">
</div>
<div class="">With Thanks,</div>
<div class="">David Gault</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 4 Dec 2017, at 21:36, Qi Gong <<a href="mailto:qigong@gwmail.gwu.edu" class="">qigong@gwmail.gwu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello everyone,
<div class=""><br class="">
</div>
<div class="">We use Bioformats to load whole slide imaging. Does anyone know what function we can use to get all WSI information (e.g. each level image size, apparent magnification, MMP, Image Type, Image Depth, Compression Type, Compression Ratio, Organization...).
Thank you.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Qi<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature">mobile phone: 2024060862</div>
</div>
</div>
_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>