NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1086 - ClassCastException when using Process>Batch>Convert...
ClassCastException when using Process>Batch>Convert...
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2015-06-12 03:26 CDT by Jan Eglinger
Modified: 2015-06-13 14:08 CDT
2 users (show)

See Also:

Description Jan Eglinger 2015-06-12 03:26:35 CDT
When trying to convert a folder of czi files to TIFF using 'Process > Batch > Convert...', the exception below [2] is thrown. The czi files contain hyperstacks of 3 channels and 19 z-slices and they open correctly when opened normally (i.e. via drag-and-drop or using the Bio-Formats Importer).

A workaround is to use 'Process > Batch > Macro...' and entering just an empty comment ('//') into the macro text field.

Looking at ImageWriter.java [1], it seems that the nImages<=1 for the associated FileInfo opbject.

Cheers,
Jan

[1]:https://github.com/imagej/ImageJA/blob/wayne/ij/io/ImageWriter.java#L281
[2]:
(Fiji Is Just) ImageJ 2.0.0-rc-30/1.49t; Java 1.8.0_40 [64-bit]; Windows 7 6.1; 1492MB of 96000MB (1%)
 
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [S
	at ij.io.ImageWriter.write(ImageWriter.java:281)
	at ij.io.TiffEncoder.write(TiffEncoder.java:129)
	at ij.io.TiffEncoder.write(TiffEncoder.java:150)
	at ij.io.FileSaver.saveAsTiff(FileSaver.java:114)
	at ij.plugin.BatchConverter.run(BatchConverter.java:93)
	at ij.IJ.runPlugIn(IJ.java:169)
	at ij.Executer.runCommand(Executer.java:131)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:745)

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\UTILIT~1\FIJI-D~1.APP/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\UTILIT~1\FIJI-D~1.APP

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150602035708)
Fiji: http://fiji.sc/update/ (last check:20150605150752)
Comment 1 Wayne Rasband 2015-06-13 14:08:46 CDT
This bug is fixed in the latest ImageJ daily build (1.49u23).