Convert .1SC to JPEG files in ImageJ

Hi all,

I’m trying to convert to JPEG a .1sc file in ImageJ but return many errors.

I’m using the last version of Bio-formats (release 5.3.2)

Running the Macro: batchTiffConvert.txt (http://loci.wisc.edu/bio-formats/imagej)

When I ran the macro, it returns ‘Macro error’ with the follow errors:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at loci.plugins.macro.MacroFunctions.handleExtension(MacroFunctions.java:82)
	at ij.macro.ExtensionDescriptor.dispatch(ExtensionDescriptor.java:288)
	at ij.macro.Functions.doExt(Functions.java:4774)
	at ij.macro.Functions.getStringFunction(Functions.java:276)
	at ij.macro.Interpreter.getStringTerm(Interpreter.java:1399)
	at ij.macro.Interpreter.getString(Interpreter.java:1377)
	at ij.macro.Interpreter.doStatement(Interpreter.java:324)
	at ij.macro.Interpreter.doBlock(Interpreter.java:666)
	at ij.macro.Interpreter.doStatement(Interpreter.java:315)
	at ij.macro.Interpreter.doIf(Interpreter.java:1044)
	at ij.macro.Interpreter.doStatement(Interpreter.java:291)
	at ij.macro.Interpreter.doBlock(Interpreter.java:666)
	at ij.macro.Interpreter.doStatement(Interpreter.java:315)
	at ij.macro.Interpreter.doFor(Interpreter.java:588)
	at ij.macro.Interpreter.doStatement(Interpreter.java:297)
	at ij.macro.Interpreter.doStatements(Interpreter.java:256)
	at ij.macro.Interpreter.runMacro(Interpreter.java:177)
	at ij.macro.MacroRunner.run(MacroRunner.java:152)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException
	at java.nio.Buffer.position(Buffer.java:244)
	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:605)
	at loci.common.NIOFileHandle.skipBytes(NIOFileHandle.java:451)
	at loci.common.RandomAccessInputStream.skipBytes(RandomAccessInputStream.java:597)
	at loci.formats.in.BioRadGelReader.initFile(BioRadGelReader.java:151)
	at loci.formats.FormatReader.setId(FormatReader.java:1399)
	at loci.formats.ImageReader.setId(ImageReader.java:839)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:651)
	at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:291)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:651)
	at loci.plugins.macro.LociFunctions.setId(LociFunctions.java:430)
	... 23 more

Someone can help me please?

Hi @lajb

How are you installing Bio-Formats? The current version is 5.9.2 (released 03-Sep-2018 ) as opposed to 5.3.2. Let’s try getting you upgraded first before we do anything else.

~Josh

Hi @joshmoore,

I did the download from latest version now. :slight_smile:

I repeat the same steps and return the same error.

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at loci.plugins.macro.MacroFunctions.handleExtension(MacroFunctions.java:82)
	at ij.macro.ExtensionDescriptor.dispatch(ExtensionDescriptor.java:288)
	at ij.macro.Functions.doExt(Functions.java:4774)
	at ij.macro.Functions.getStringFunction(Functions.java:276)
	at ij.macro.Interpreter.getStringTerm(Interpreter.java:1399)
	at ij.macro.Interpreter.getString(Interpreter.java:1377)
	at ij.macro.Interpreter.doStatement(Interpreter.java:324)
	at ij.macro.Interpreter.doBlock(Interpreter.java:666)
	at ij.macro.Interpreter.doStatement(Interpreter.java:315)
	at ij.macro.Interpreter.doIf(Interpreter.java:1044)
	at ij.macro.Interpreter.doStatement(Interpreter.java:291)
	at ij.macro.Interpreter.doBlock(Interpreter.java:666)
	at ij.macro.Interpreter.doStatement(Interpreter.java:315)
	at ij.macro.Interpreter.doFor(Interpreter.java:588)
	at ij.macro.Interpreter.doStatement(Interpreter.java:297)
	at ij.macro.Interpreter.doStatements(Interpreter.java:256)
	at ij.macro.Interpreter.runMacro(Interpreter.java:177)
	at ij.macro.MacroRunner.run(MacroRunner.java:152)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException
	at java.nio.Buffer.position(Buffer.java:244)
	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:632)
	at loci.common.NIOFileHandle.skipBytes(NIOFileHandle.java:478)
	at loci.common.RandomAccessInputStream.skipBytes(RandomAccessInputStream.java:670)
	at loci.formats.in.BioRadGelReader.initFile(BioRadGelReader.java:154)
	at loci.formats.FormatReader.setId(FormatReader.java:1397)
	at loci.formats.ImageReader.setId(ImageReader.java:842)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
	at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:291)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
	at loci.plugins.macro.LociFunctions.setId(LociFunctions.java:427)
	... 23 more

~Lucas

Hi Lucas,

This looks as though there has been an issue reading some Bio-Rad gel files. Do you still see the same issue if you import one of the files manually using the Bio-Formats Importer?

Hi @dgault,

I also had issues trying to import files manually.

ImageJ 1.52j; Java 1.8.0_112 [64-bit]; Windows 10 10.0; 38MB of 6045MB (<1%)
 
java.lang.IllegalArgumentException
	at java.nio.Buffer.position(Buffer.java:244)
	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:632)
	at loci.common.NIOFileHandle.skipBytes(NIOFileHandle.java:478)
	at loci.common.RandomAccessInputStream.skipBytes(RandomAccessInputStream.java:670)
	at loci.formats.in.BioRadGelReader.initFile(BioRadGelReader.java:154)
	at loci.formats.FormatReader.setId(FormatReader.java:1397)
	at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:499)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:142)
	at loci.plugins.in.Importer.showDialogs(Importer.java:140)
	at loci.plugins.in.Importer.run(Importer.java:76)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:229)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

I was informed that this file also contain audit trail information.

~Lucas

Thanks Lucas for confirming. Are you only seeing the issue with 1 particular file or is it more common? Is there a sample file showing the problem which you would be able to upload to https://www.openmicroscopy.org/qa2/qa/upload/ for us to test?

Hi @dgault,

I uploaded the file into the link. I really appreciate your help!

Thank you for uploading a file, @lajb. I can reproduce the same error message, and have added this to the list of outstanding Bio-Formats issues:

https://trello.com/c/lqiNO2on/322-bio-rad-gel-1sc-file-cannot-be-read

The card will be updated as we make progress on a fix.

Thanks @Melissa! I’m looking for it!

~Lucas