We're Hiring!

opening .spl with matlab

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

opening .spl with matlab

Postby gradstudent » Sun Oct 20, 2013 3:42 pm

I posted something on Friday to one of these forums but it was deleted for some reason so I'm reposting. If you're going to delete this please tell me why so it won't happen again.

I'm trying to read the images out of a .spl file that was created using slidebook v4.2. Upon finding the matlab functions to read the file formats I was very excited but I ran into a problem when I tried to use the bfopen function. I used it successfully with one .spl file but I tried on another and I got an error. This is the text of the error I received.

I am using Matlab 2011b on a Mac with the image processing toolbox (and other toolboxes).

Code: Select all
I = bfopen('filename.spl');
Finding offsets to pixel data
Determining dimensions
Reading series #1
    .Error using loci.formats.ChannelSeparator/openBytes
Java exception occurred:
java.lang.IllegalArgumentException: Negative position
   at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:600)
   at
        loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:133)
   at loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:118)
   at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:532)
   at loci.common.NIOFileHandle.seek(NIOFileHandle.java:254)
   at loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:140)
   at loci.formats.in.SlidebookReader.openBytes(SlidebookReader.java:130)
   at loci.formats.ImageReader.openBytes(ImageReader.java:414)
   at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:197)
   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:226)
   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:159)

Error in bfGetPlane (line 75)
plane = r.openBytes(iPlane - 1, ip.Results.x - 1, ip.Results.y - 1, ...

Error in bfopen (line 144)
        arr = bfGetPlane(r, i, varargin{:});



Any advice you guys could give me on how to circumvent this error would be great.

Thanks!
gradstudent
 
Posts: 5
Joined: Thu Oct 17, 2013 2:15 am

Re: opening .spl with matlab

Postby sbesson » Sun Oct 20, 2013 6:50 pm

Hi,

Could you please confirm that you are using the most recent version of Bio-Formats (4.4.9)? Using MATLAB, the version number should be given by

Code: Select all
char(loci.formats.FormatTools.VERSION)


If upgrading does not solve the problem, then could you please send one of the SlideBook files that causes this error message so that we can better fix the problem? You can upload the file to:

http://qa.openmicroscopy.org.uk/qa/upload/

Best regards,
Sébastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: opening .spl with matlab

Postby gradstudent » Sun Oct 20, 2013 7:17 pm

Yes it should be the latest version. I downloaded it on Wednesday. I can try to upload some files tomorrow
gradstudent
 
Posts: 5
Joined: Thu Oct 17, 2013 2:15 am

Re: opening .spl with matlab

Postby gradstudent » Mon Oct 21, 2013 5:57 pm

Yes I am using the latest version.

I tried some more files today and I think that the problem might be with files over a certain size. bfopen seems to work with smaller files but not with the larger files I've tried.

I can't upload the files because '.spl' is not in the list of file types to upload. Do you want me to change the extension?

Edit: I tried reading some of the files that give me an error in Matlab into FIJI/ImageJ to see if it is just a matlab problem. This is the error I got:

Code: Select all
(Fiji Is Just) ImageJ 1.48c; Java 1.6.0_51 [64-bit]; Mac OS X 10.8.4; 29MB of 8163MB (<1%)

java.lang.IllegalArgumentException: Negative position
   at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:600)
   at loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:133)
   at loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:118)
   at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:532)
   at loci.common.NIOFileHandle.seek(NIOFileHandle.java:254)
   at loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:140)
   at loci.formats.in.SlidebookReader.openBytes(SlidebookReader.java:129)
   at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:197)
   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:226)
   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:159)
   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:305)
   at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:248)
   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:305)
   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:305)
   at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:190)
   at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:87)
   at loci.plugins.util.ImageProcessorSource.getObject(ImageProcessorSource.java:74)
   at loci.formats.cache.Cache.recache(Cache.java:212)
   at loci.formats.cache.Cache.recache(Cache.java:232)
   at loci.formats.cache.Cache.<init>(Cache.java:96)
   at loci.plugins.util.BFVirtualStack.<init>(BFVirtualStack.java:123)
   at loci.plugins.in.ImagePlusReader.createVirtualStack(ImagePlusReader.java:331)
   at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:276)
   at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:238)
   at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:216)
   at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:114)
   at loci.plugins.in.Importer.readPixels(Importer.java:150)
   at loci.plugins.in.Importer.run(Importer.java:89)
   at loci.plugins.LociImporter.run(LociImporter.java:81)
   at ij.IJ.runUserPlugIn(IJ.java:196)
   at ij.IJ.runPlugIn(IJ.java:160)
   at ij.Executer.runCommand(Executer.java:131)
   at ij.Executer.run(Executer.java:64)
   at java.lang.Thread.run(Thread.java:680)
gradstudent
 
Posts: 5
Joined: Thu Oct 17, 2013 2:15 am

Re: opening .spl with matlab

Postby sbesson » Mon Oct 21, 2013 7:05 pm

Hi,

Thanks for the Fiji stack trace. The similarity with the error you get in Matlab suggests the problem comes from the reader itself.

You should be able to first zip your file and upload the zip file to the http://qa.openmicroscopy.org.uk/qa/upload/

Let me know if this does not work,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: opening .spl with matlab

Postby gradstudent » Mon Oct 21, 2013 9:19 pm

I uploaded it but I'm not sure that it went through. Let me know if I need to upload it again
gradstudent
 
Posts: 5
Joined: Thu Oct 17, 2013 2:15 am

Re: opening .spl with matlab

Postby mlinkert » Tue Oct 22, 2013 3:33 pm

Thank you for uploading a file - the upload was successful, so there is no need to do it again.

I have opened a ticket on our issue tracking system to resolve this problem:

https://trac.openmicroscopy.org.uk/ome/ticket/11560

You have been CC'd on the ticket, and so will receive an automated email with "[OME] #11560" in the subject line each time the ticket is updated. If you would prefer not to receive these emails, please let me know.

-Melissa
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: opening .spl with matlab

Postby gradstudent » Tue Oct 22, 2013 4:14 pm

Thanks so much! Do you have any idea on the timeline for when this bug will be fixed?
gradstudent
 
Posts: 5
Joined: Thu Oct 17, 2013 2:15 am

Re: opening .spl with matlab

Postby mlinkert » Wed Oct 23, 2013 12:21 am

Not at the moment, but the ticket will be updated as soon as we have an estimated timeline.
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest