Page 1 of 1

Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Mon Dec 10, 2012 1:59 am
by kdean
Thanks in advance.

I have been able to get Bio-Formats to work great thus far, with one exception. If the data I am importing is xPixels, yPixels (e.g., 512 x 512), z, color, and time, it works perfectly. For example, a=data{1,1} imports the images and a small amount of string info into the matlab cell a (file path, plane, z, c, t). Using regular expressions and some loops allows me to pair these numbers with the images, and stitch it together into something meaningful.

However, we use a motorized stage, and if I try to add multiple positions (xPixels, yPixels, z, color, time, position number), Bio-Formats appears to import the .nd2 file improperly. The file that I am discussing has 6 time points, 14 XY positions, 11 z-stacks, and 2 colors. Now, a=data{1,1} imports the images and strings into cell a as follows: file path, plane, z=1/462, c=1/2. It appears to be confusing the time-series, multipoint, and z-information.

I am using Apple Snow-Leopard OS-X, Matlab R2012a, and what appears to be a recent build of Bio-Formats (https://github.com/openmicroscopy/biofo ... ats/matlab). I will also upload a copy of the .m file, just in case it is helpful for others.

Any help would be appreciated.

Best,
Kevin

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Mon Dec 10, 2012 11:19 am
by rleigh
Hi Kevin,

Could you possibly upload the .nd2 file in question so that we could take a closer look at it in order to advise you further? It would also be helpful to know which version of loci_tools.jar you are using. The latest is 4.4.5.

You can do this here: http://qa.openmicroscopy.org.uk/qa/upload/


Thanks,
Roger Leigh

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Mon Dec 10, 2012 6:11 pm
by kdean
I'm not entirely sure how to figure out what loci_tools.jar version I am running. If I open it up within a JAR viewer, it tells me that this is revision 96c615b, built 25 September 2012. I will upload a compressed version of the file... Thanks.

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Mon Dec 10, 2012 7:31 pm
by mlinkert
I'm not entirely sure how to figure out what loci_tools.jar version I am running. If I open it up within a JAR viewer, it tells me that this is revision 96c615b, built 25 September 2012. I will upload a compressed version of the file...


That would be the 4.4.4 version, which should be visible if you do this in Matlab:

Code: Select all
version = loci.formats.FormatTools.VERSION


4.4.5 contains a number of fixes for .nd2 files, so I would suggest trying that before uploading a file. If upgrading does not fix the problem, then we'll happily take a look at fixing things for the next release.

-Melissa

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Tue Dec 11, 2012 5:31 pm
by kdean
Hello Melissa,

I updated to 4.4.5 for both LOCI and OME tools. loci.formats.FormatTools.VERSION now shows 4.4.5. - However, it still looks like the Z, T, and multipoint are being confused. I am having a hard time uploading the file to the server since it is over 4 Gb, and the server won't allow me to upload a compressed .zip file. I may need to take some mock-data that isn't so large, retry it on my end, and then possibly upload it to your server. There also appears to be a huge amount of information stored in the data{2}, where data=bfopen()... I may try to use some of this information, if I can get it to make sense, as a way to separate the files.

Thanks for the help,
Kevin

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Sat Dec 15, 2012 11:57 pm
by kdean
Uploaded some mock data, but all of a sudden I'm seeing additional information that wasn't available on my other real data.

data=bfopen(file/path);
images=data{1,1};
image_info=images{1,2};

Now there is a series feature in here! I need to figure out why one microscope is giving this to me, and not another...

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Fri Dec 21, 2012 9:31 pm
by mlinkert
My apologies for not getting back to you sooner.

The mock data appears to be read correctly be Bio-Formats; at least, the dimensions and images match up when compared with Nikon's Elements viewer.

I have sent you a private message with alternate instructions for uploading very large files, so if you would like us to have a look at your real data file please follow those instructions and we'll make any necessary fixes.

-Melissa

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Thu Feb 14, 2013 11:08 pm
by JennetToy
Hello,

I have a similar problem with my .nd2 files, Im uploading the file right now to send to you. But is there a solution you came up with? I already tried the new loci file, but it didnt work.

Thank you
Jennet

Re: Multipoint Image Importing into Matlab (Nikon .nd2)

PostPosted: Tue Feb 19, 2013 4:05 pm
by mlinkert
There is now a ticket for this on our issue tracking system:

http://trac.openmicroscopy.org.uk/ome/ticket/10420

If anyone would like to be automatically notified of updates to that ticket, please let me know and I will CC you.

-Melissa