Giter Site home page Giter Site logo

Missing metadata about nd2reader HOT 3 OPEN

open-science-tools avatar open-science-tools commented on August 11, 2024
Missing metadata

from nd2reader.

Comments (3)

rbnvrw avatar rbnvrw commented on August 11, 2024 2

I'm not sure which metadata exactly you're after. You can access the raw_metadata object like this:
reader.parser._raw_metadata where reader is your ND2Reader object.

The RawMetadata object has a property called image_text_info which might contain what you are looking for. For an example file, reader.parser._raw_metadata.image_text_info returns:

{
  b'SLxImageTextInfo': {
    b'TextInfoItem_0': b'',
    b'TextInfoItem_1': b'',
    b'TextInfoItem_2': b'',
    b'TextInfoItem_3': b'',
    b'TextInfoItem_4': b'',
    b'TextInfoItem_5': b'Metadata:\r\nDimensions: T(597)\r\nCamera Name: DS-Qi1Mc-U3  12 bit\r\nNumerical Aperture: 1.2\r\nRefractive Index: 1.333\r\n Name: R BF 60xWI-1x\r\n Component Count: 1\r\n Modality: Widefield Fluorescence\r\n Camera Settings:   \r\n  Format: 1280x1024 no binning\r\n  Exposure: 5.4 ms\r\n  AnalogGain: 2.00\r\n  CoolingMode: -5 deg\r\n  AEQuantilTypes: Relative\r\n  AETargetIntensities: 95\r\n  AEQuantilPromile: 1.00\r\n  AEQuantilPixels: 100\r\n  EnableLiveAccel: 0\r\n\r\n Microscope Settings:   Microscope: Ti Microscope\r\n  Nikon Ti, FilterChanger(Turret1): 2\r\n  Nikon Ti, Illuminator(Illuminator-DIA): Remote Switch On\r\n  Nikon Ti, Illuminator(Illuminator-DIA): On\r\n  Nikon Ti, Illuminator(Illuminator-DIA) Voltage: 5.0\r\n  LightPath: R100\r\n  PFS-S, state: On\r\n  PFS-S, offset: 6166\r\n  PFS-S, mirror: Inserted\r\n  Zoom: 1.00x\r\nTime Loop: 597\r\n- Equidistant (Period 200 ms)',
    b'TextInfoItem_6': b'DS-Qi1Mc-U3  12 bit\r\n\r\nFormat: 1280x1024 no binning\r\nExposure: 5.4 ms\r\nAnalogGain: 2.00\r\nCoolingMode: -5 deg\r\nAEQuantilTypes: Relative\r\nAETargetIntensities: 95\r\nAEQuantilPromile: 1.00\r\nAEQuantilPixels: 100\r\nEnableLiveAccel: 0\r\n',
    b'TextInfoItem_7': b'',
    b'TextInfoItem_8': b'',
    b'TextInfoItem_9': b'10/01/2019  10:02:07',
    b'TextInfoItem_10': b'',
    b'TextInfoItem_11': b'',
    b'TextInfoItem_12': b'',
    b'TextInfoItem_13': b'Plan Apo VC 60x WI DIC N2'
  }
}

So your information could be in either TextInfoItem_5 or TextInfoItem_6.

There is currently no parser function that parses these items into something a bit more usable but if you have time to submit a pull request, I'm happy to merge something that parses this information and adds it to the metadata object.

from nd2reader.

zorba-the-geek avatar zorba-the-geek commented on August 11, 2024

Thanks for the response, and yea is exactly what I was looking for. Didn't spot image_text_info. Thanks for the information!

If I figure out a decent way of turning it into a dict I'll push it up, but I don't have too many different types of nd2 files.

from nd2reader.

rbnvrw avatar rbnvrw commented on August 11, 2024

@zorba-the-geek did you have any luck?

from nd2reader.

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.