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

Dimension order issues when writing ome-tiff files... #3199

Open
markehammons opened this issue Aug 15, 2018 · 2 comments
Open

Dimension order issues when writing ome-tiff files... #3199

markehammons opened this issue Aug 15, 2018 · 2 comments

Comments

@markehammons
Copy link

markehammons commented Aug 15, 2018

As per the minimal writer example, I'm using this code to populate my OME-TIFF metadata:

    MetadataTools.populateMetadata(meta,0, output.getName, true, "XYZCT",
      FormatTools.getPixelTypeString(pixelType), dimensionality.xDimension, dimensionality.yDimension, dimensionality.zDimension, 1, 1, 1)

Everything else is being recorded properly, except the dimension order is being reported by the bioformats importer included in fiji as "XYCZT".

The odd thing is that when I do meta.getPixelsDimensionOrder(0).getValue, it returns XYZCT as I wrote it initially. What's going on here? Is the dimension order of ome-tiff files set in stone to be XYCZT?

@melissalinkert
Copy link
Member

Everything else is being recorded properly, except the dimension order is being reported by the bioformats importer included in fiji as "XYCZT".

Do you see XYCZT only in the Stack order option of the Bio-Formats Import Options window (as in http://docs.openmicroscopy.org/bio-formats/5.9.1/users/imagej/load-images.html#opening-files)?
If so, that is expected behavior. The Stack order option indicates the order in which planes will be read by the plugin, not the order in which planes are actually stored in the file. ImageJ's Hyperstack feature expects planes in XYCZT order, so the plugin automatically translates from whatever order is present in the file to XYCZT. If you check the Display OME-XML metadata option, you should see the original XYZCT value, which represents how the planes are actually stored in the OME-TIFF.

The odd thing is that when I do meta.getPixelsDimensionOrder(0).getValue, it returns XYZCT as I wrote it initially. What's going on here? Is the dimension order of ome-tiff files set in stone to be XYCZT?

OME-TIFF definitely allows any dimension order indicated in the OME-XML schema, not just XYCZT. If you see an incorrect dimension order anywhere other than the Stack order option, then that's something we'll need to investigate further.

@markehammons
Copy link
Author

markehammons commented Aug 16, 2018

@melissalinkert Yeah, i just realized it was importing into fiji with xyczt order. Sorry, I'm dumb.

If you check the Display OME-XML metadata option, you should see the original XYZCT value, which represents how the planes are actually stored in the OME-TIFF.

well, that's the odd thing:
screenshot_20180816_143838
screenshot_20180816_144058
This file is in XYZCT order, but the metadata viewer shows XYCZT. The same thing happened when I made an OME-TIFF instead of a tiff.

It's only when I load in XYZCT order that the metadata viewer reports that it's XYZCT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants