[ome-users] Nikon nd2 files and bfopen

Melissa Linkert melissa at glencoesoftware.com
Wed Jan 20 17:43:04 GMT 2010


Hi Sarah,

My apologies for not getting back to you sooner.  You are correct, the
stage position and pinhole metadata is stored in the file -
Bio-Formats just wasn't parsing it correctly.

Stage position and pinhole size metadata should be recorded if you
update your copy of loci_tools.jar to the latest trunk build (see
http://loci.wisc.edu/bio-formats/downloads).  You can then retrieve
the metadata as follows:

data = bfopen('/path/to/ND2/file')
% positionNumber can be set to anything in the range [1, size(data, 1)]
positionNumber = 1
pinhole = data{positionNumber, 2}.get('Pinhole size')
positionX = data{positionNumber, 2}.get(sprintf('X position for
position #%d', positionNumber))
positionY = data{positionNumber, 2}.get(sprintf('Y position for
position #%d', positionNumber))
positionZ = data{positionNumber, 2}.get(sprintf('Z position for
position #%d', positionNumber))

Regards,
-Melissa

On Wed, Jan 13, 2010 at 3:30 PM, Sarah Chacko
<sarah.chacko at lincoln.ox.ac.uk> wrote:
> Hello,
>
> I am using the bfopen.m program in MATLAB to open Nikon .nd2 files; timeseries and z stacks.They are the newer version of nd2, I think the format was changed in the last few years.
>
> The data looks good, but I can't find a lot of the metadata. I am not completely comfortable with cell arrays so I wondered whether I'm not extracting it right, or whether some of it is not converted. For example I could find the filters, but not the pinhole size, and I couldn't find the lists of XY and Z and offset positions for each frame, though they must be in the file because they appear in the metadata in Nikon's viewer.
>
> Thanks,
>
> Sarah
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>



More information about the ome-users mailing list