Comments (3)
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.
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.
@zorba-the-geek did you have any luck?
from nd2reader.
Related Issues (20)
- Plotting ROI's from nd2 files HOT 4
- KeyError when opening nd2 file HOT 1
- Loaded images are gray scale HOT 2
- Bug in attempt to remove unwanted bytes HOT 1
- Build error on Travis due to SSH git url for docs HOT 1
- Colors wrong when saving ND2 to png HOT 9
- Single time point exported from time series appears to have as many frames as original HOT 1
- reading from files being written HOT 4
- git-lfs in the repo pointing to missing objects HOT 1
- nd2reader outputs empty arrays for certain ND2 files. HOT 2
- Improving metadata: Add X and Y stage coordinates in Metadata. HOT 3
- documentation link is broken HOT 1
- Cannot open nd2 files obtained with version 5.21.03 of the acquisition software
- parser.calculate_image_properties breaks if "z_levels" are empty
- float64 .nd2 files don't recognize intensities above 2**16-1
- pull out the label dXPos/dYPos and dPosX/dPosY
- Wrong z parameter in Focused EDF files
- in numpy ver1.24+, the numpy.float is deprecated, please fix it...
- Error: 'numpy' Module Has No Attribute 'float' in nd2reader HOT 1
- Apple Silicon Error (pims_nd2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nd2reader.