Code Monkey home page Code Monkey logo

Comments (6)

hinerm avatar hinerm commented on July 24, 2024

Hello again!

That trac ticket looks pretty outdated.. it perhaps should have been closed already.

What you're describing actually already exists! :) SCIFIO has a TIFFFormat with its own Metadata implementation.

This is basically the pattern for all formats now that IJ2 is using SCIFIO. We have a Metadata implementation that preserves the format-specific image metadata, and then also knows how to convert it to some common metadata model. By default this is just an ImageMetadata - so there is no core dependence on the OME model.

However, SCIFIO still gives us that option via plugins (like OME-Formats with its OMETIFFFormat, that does generate OME-XML).

And because TIFF is such a critical format, we intend to give it some special capacities with its own set of services, for example.

If you take a look at the TIFFFormat, its class hierarchy, and its Metadata and it seems to be lacking some API you think would be useful, or don't think it will be suitable for your needs, it would be great if you posted suggestions as SCIFIO tickets (and of course, IJ2 will get any of those improvements as well, since it uses SCIFIO for its I/O core).

Thanks for looking at these issues. Let us know if you have any more questions!

from imagej2.

hadim avatar hadim commented on July 24, 2024

Thank you to make all these things clear Mark.

However my main question (I didnt explain it well) was : How do you store metadata in the Tiff file using TIFFFormat ? (I'd like to know if I can easly read, with Python for example, such metadata)

I use OME Tiff when I can but sometime I have to deal with "normal" tiff and I would like to know if you're still using old IJ1 binary format to store metadata in Tiff file ?

Another question: let's imagine I open an .nd2 Tiff file (Nikon Tiff format) with IJ2. So SCIFIO will understand .nd2 metadata (because it's supported by SCIFIO/Bioformats). What happen in these two cases (.nd2 writer does not exist from what I know) :

  • I Use File>Save : will IJ2 still save .nd2 metadata ? will it add any other metadata (from TIFFFormat for example) ?
  • I crop the image and then use File>Save : same question as above. Other question: Will File>Save as>OME Tiff will work well converting .nd2 metadata to OME ?

So to be clear and open the question to a general one : Will IJ2/SCIFIO I/O sytem be intelligent ?

from imagej2.

hinerm avatar hinerm commented on July 24, 2024

so both writing cases should function the same way - cropping doesn't matter here, just the input and output formats.

the metadata you write out ultimately depends on the richness of the output format. in this case you will get an nd2 reader which will parse in the complete nd2 metadata. when you go to save it will be translated to the output metadata, I.e. ome-tiff.

so assuming nd2 maps fully into omexml then it will be completely preserved.

does that answer your question better? also, using the plug-in framework of ij2 and scifio, it would be very easy to drop in a specialized nd2 to omexml translator if needed for some any reason.

as for getting the metadata in python, there should be explicit java api for getting all the tiff metadata fields, so it should be quite easy.

let me know if that doesn't fully answer your questions!

from imagej2.

hadim avatar hadim commented on July 24, 2024

Perfect. Thank you for the answer Mark !

from imagej2.

ctrueden avatar ctrueden commented on July 24, 2024

@hadim: In general, please take the ImageJ Trac with a big grain of salt, since it has not been updated well in the past 6 months. We are (slowly, unfortunately) migrating fully to GitHub Issues, and I plan to go through the Trac and migrate tickets as time allows (automating the process as much as possible of course), but there are more urgent priorities first.

from imagej2.

hadim avatar hadim commented on July 24, 2024

Ok got it !

from imagej2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.