Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrairieView 5.2 fixes and improvements #1365

Merged
merged 10 commits into from Dec 6, 2014

Conversation

ctrueden
Copy link
Member

This branch fixes bugs in the PrairieView 5.2 file format reader, as well as adding support for spectral PrairieView datasets, as discussed on the ome-devel mailing list.

@melissalinkert
Copy link
Member

Adding exclude label, as this causes http://ci.openmicroscopy.org/view/Bio-Formats/job/BIOFORMATS-5.1-merge-build/470/ to fail.

@ctrueden
Copy link
Member Author

ctrueden commented Dec 3, 2014

Anything I can do to get this merged? Without these changes, the Bio-Formats Prairie support is rather substantially broken.

@melissalinkert
Copy link
Member

All Bio-Formats merge builds currently fail with this change, so to get the exclude label removed you will need to fix the exceptions shown in https://ci.openmicroscopy.org/view/Bio-Formats/job/BIOFORMATS-5.1-merge-build/470/console (as noted above).

@ctrueden
Copy link
Member Author

ctrueden commented Dec 3, 2014

The NPE caused by null wavelengths has been fixed. Please readd to the merge build.

@melissalinkert
Copy link
Member

This no longer compiles due to units changes; see https://travis-ci.org/openmicroscopy/bioformats/jobs/42888720. There is a convenience method for creating an appropriate Length object with the default unit for emission wavelengths:

https://github.com/openmicroscopy/bioformats/blob/8a0013b67b0b21eb73295df92a205e758634533c/components/formats-api/src/loci/formats/FormatTools.java#L1256

This change fixes several metadata parsing bugs:

1) The relevant XML element is called "SubindexedValue", not
   "SubindexValue". Without this change, subindexed values are never
   read correctly, so e.g. X/Y/Z stage positions are not parsed.

2) The loop variable for subindexed values is "s", not "i".
   Without this change, an NPE is typically thrown during the
   SubindexedValues parsing loop.

3) Subindexed value table should be indexed on subindex, not index.

4) Parsing of subindexed values from old-style XML (<Key> elements)
   did not add the parsed subindexed value table to the data structure.
These tests are by no means complete, but do provide regression tests
for the bugs fixed in the previous commit.
This commit changes the behavior of the OME-TIFF reader to support
extraction of OME-XML metadata from an OME-TIFF reference via the
BinaryOnly MetadataFile attribute.

According to a38bd07, the BinaryOnly
MetadataFile is only supposed to reference an OME-XML document, not an
OME-TIFF file containing an embedded OME-XML document.

But according to the OME-TIFF specification [1], it is valid to
reference such an OME-TIFF.

Since supporting it is easy and very useful and already documented,
let's go ahead and do it!

[1] https://www.openmicroscopy.org/site/support/ome-model/ome-tiff/specification.html#storing-partial-metadata-blocks
The Prairie XML records the channel emission wavelengths, so
let's populate the OME-XML with that information as appropriate.
This makes spectral PrairieView datasets work as expected.

Previously, the reader only activated channels specifically flagged as
active in the Prairie configuration metadata. This was fragile for two
reasons:

1) The Prairie configuration metadata is subject to change
   (and in fact did change once already, from CFG to ENV).

2) PrairieView 5.2 added support for spectral datasets, where the active
   channels metadata no longer accurately reflects the actually active
   channels. Instead, the active channels are meant to be gleaned from
   the "channel" attribute of each <File> element present in the XML
   metadata.

With this change, all channels that are actually used (i.e., which
actually have one or more associated <File> elements) will affect the
final dimensional structure of each Image.
@ctrueden
Copy link
Member Author

ctrueden commented Dec 3, 2014

OK, I rebased over develop and updated the API usage. Thanks for the tip about that convenience method.

@melissalinkert
Copy link
Member

Exclude label removed.

melissalinkert added a commit that referenced this pull request Dec 6, 2014
PrairieView 5.2 fixes and improvements
@melissalinkert melissalinkert merged commit 5c95a23 into ome:develop Dec 6, 2014
@melissalinkert
Copy link
Member

--no-rebase

@sbesson sbesson added this to the 5.1.0-m3 milestone Dec 17, 2014
@ctrueden ctrueden deleted the devel/more-prairie-view-5 branch February 2, 2015 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants