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 813 - Impossible to add a slice on imagaes
Impossible to add a slice on imagaes
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2014-06-25 04:33 CDT by Stefano Ciciliot
Modified: 2014-07-23 13:10 CDT
2 users (show)

See Also:

Description Stefano Ciciliot 2014-06-25 04:33:54 CDT
I'm trying to add a slice on a 16-bits grayscale, to create a stack ("Image"->"Stack"->"Add Slice"). I can't do that (even if I convert to 8-bits image), and get this log message (even if program claims "Windows NT (unknown)" I have Windows 8.1 os).

(Fiji Is Just) ImageJ 2.0.0-rc-6/1.49b; Java 1.6.0_24 [64-bit]; Windows NT (unknown) 6.2; 17MB of 12185MB (<1%)
 
java.lang.ClassCastException: ij.gui.ImageWindow cannot be cast to ij.gui.StackWindow
	at ij.ImagePlus.setStack(ImagePlus.java:634)
	at ij.ImagePlus.setStack(ImagePlus.java:668)
	at ij.plugin.StackEditor.addHyperstackChannelSliceOrFrame(StackEditor.java:145)
	at ij.plugin.StackEditor.addSlice(StackEditor.java:32)
	at ij.plugin.StackEditor.run(StackEditor.java:23)
	at ij.IJ.runPlugIn(IJ.java:171)
	at ij.Executer.runCommand(Executer.java:131)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:662)

Information about your version of Java:

  os.arch => amd64
  os.name => Windows NT (unknown)
  os.version => 6.2
  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:\Users\STELAV~1\DOWNLO~1\Fiji\NUOVAV~1\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Users\STELAV~1\DOWNLO~1\Fiji\NUOVAV~1\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140623222553)
Fiji: http://fiji.sc/update/ (last check:20140624002555)
Comment 1 Johannes Schindelin 2014-06-25 09:20:24 CDT
I can confirm that this happens in Fiji, but not plain ImageJ 1.x, so it most likely has something to do with our wrapping of ImgLib2 data structures.

Stefano, I would like to ask you a favor: in future reports, how about recording a little macro using available sample images to make it easy to reproduce? Sure, it took me only five minutes, but I cannot really be certain that I reproduced exactly *your* use case. The example macro I came up with is:

run("M51 Galaxy (177K, 16-bits)");
run("Add Slice");

and it happens to display the symptom you described, but I'd rather not assume in the future that I managed to guess right...

As a quick workaround, I found that disabling SCIFIO for the moment (via Edit>Options>ImageJ2) will avoid the bug.

We will fix this problem as soon as we can, and I hope you will be available for testing then?
Comment 2 Johannes Schindelin 2014-07-07 15:30:22 CDT
Stefano, on the assumption that you are willing to help (and thereby guarantee that *your* use case works), could you please try again with a current Fiji version? It should be resolved now.
Comment 3 Johannes Schindelin 2014-07-23 13:10:00 CDT
---------- Forwarded message ----------
From: Stefano Ciciliot <stefano.ciciliot@gmail.com>
Date: 2014-07-08 9:56 GMT+02:00
Subject: Re: [Bug 813] Impossible to add a slice on imagaes
To: bugzilla@fiji.sc

Hi Johannes,

I can confirm that now everything works fine, after re-activating SCIFIO option, opening a 16-bit grayscale image, and adding a slice to that image. Thank you again for your help,

Stefano