http://imagej.273.s1.nabble.com/help-with-3D-segmentation-tp5014798p5014853.html
Running the 3Dviewer separately forced a re-installation of java3D.
Following this, the imglib code works correctly in Java 1.6.
> Hi Curtis
>
> Thank you for your reply about java3D and java 1.8
> I am following up on this as a separate thread.
>
> On 02/11/2015 7:54 PM, Curtis Rueden wrote:
>> Hi Aryeh,
>>
>> Note that the Fiji-devel mailing list is closed now in favor of the
>> ImageJ forum. Somehow, you still had permission to post (along with
>> some others), but I have now (I hope!) fully closed the fiji-devel
>> list from posts from anyone whatsoever.
>>
>> It is always best to discuss issues in public, rather than via private
>> mails. Albert is not the person responsible for maintaining the 3D
>> Viewer.
>>
>> Note that the 3D Viewer does not currently work with Java 7 and 8 on
>> OS X. We are working on addressing that (see
>>
https://github.com/imagej/imagej/issues/120), but it is not yet ready
>> for prime time.
>>
>> Right now you have two options:
>>
>> 1) Use Java 6
>> (
http://imagej.net/FAQ#How_do_I_set_up_Java_6_on_OS_X.3F); or
>>
> If I do this, then Plugins>Utilites>Debugging>Test Java3D
> works correctly (spinning pretty box)
>
> However, the following code:
> # Show the peaks as spheres in 3D, along with orthoslices:
> univ = Image3DUniverse(1024, 1024)
> print type(univ)
> univ.addIcospheres(ps, Color3f(1, 0, 0), 2, cell_diameter/2,
> "Cells").setLocked(True)
> univ.addOrthoslice(imp).setLocked(True)
> univ.show()
>
> will throw the following error:
> Traceback (most recent call last):
> File "/Users/amw1/Desktop/projects/tzachAuman/dog1.py", line 105, in
> <module>
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:66)
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:34)
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:30)
> at ij3d.ContentInstant.display(ContentInstant.java:216)
> at ij3d.ContentCreator.createContent(ContentCreator.java:111)
> at ij3d.ContentCreator.createContent(ContentCreator.java:98)
> at ij3d.Image3DUniverse.createContent(Image3DUniverse.java:1195)
> at ij3d.Image3DUniverse.addCustomMesh(Image3DUniverse.java:1163)
> at ij3d.Image3DUniverse.addIcospheres(Image3DUniverse.java:1285)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
>
> java.lang.NoSuchMethodError: java.lang.NoSuchMethodError:
> javax.media.j3d.Shape3D.setName(Ljava/lang/String;)V
>
> at org.python.core.PyException.fillInStackTrace(PyException.java:70)
> at java.lang.Throwable.<init>(Throwable.java:181)
> at java.lang.Exception.<init>(Exception.java:29)
> at java.lang.RuntimeException.<init>(RuntimeException.java:32)
> at org.python.core.PyException.<init>(PyException.java:46)
> at org.python.core.PyException.<init>(PyException.java:43)
> at org.python.core.Py.JavaError(Py.java:495)
> at org.python.core.Py.JavaError(Py.java:488)
> at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
> at org.python.core.PyObject.__call__(PyObject.java:345)
> at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
> at org.python.core.PyMethod.__call__(PyMethod.java:211)
> at org.python.core.PyMethod.__call__(PyMethod.java:201)
> at
> org.python.pycode._pyx0.f$0(/Users/amw1/Desktop/projects/tzachAuman/dog1.py:107)
>
> at
> org.python.pycode._pyx0.call_function(/Users/amw1/Desktop/projects/tzachAuman/dog1.py)
>
> at org.python.core.PyTableCode.call(PyTableCode.java:165)
> at org.python.core.PyCode.call(PyCode.java:18)
> at org.python.core.Py.runCode(Py.java:1275)
> at
> org.scijava.plugins.scripting.jython.JythonScriptEngine.eval(JythonScriptEngine.java:76)
>
> at org.scijava.script.ScriptModule.run(ScriptModule.java:174)
> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
> at
> org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
>
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>
> at java.lang.Thread.run(Thread.java:695)
> Caused by: java.lang.NoSuchMethodError:
> javax.media.j3d.Shape3D.setName(Ljava/lang/String;)V
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:66)
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:34)
> at ij3d.shapes.BoundingBox.<init>(BoundingBox.java:30)
> at ij3d.ContentInstant.display(ContentInstant.java:216)
> at ij3d.ContentCreator.createContent(ContentCreator.java:111)
> at ij3d.ContentCreator.createContent(ContentCreator.java:98)
> at ij3d.Image3DUniverse.createContent(Image3DUniverse.java:1195)
> at ij3d.Image3DUniverse.addCustomMesh(Image3DUniverse.java:1163)
> at ij3d.Image3DUniverse.addIcospheres(Image3DUniverse.java:1285)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
> ... 20 more
>
>
Running the 3Dviewer separately forced a re-installation of java3D.
Following this, the imglib code works correctly in java 1.6.
> The print statement tell me that the Image3DUniverse object was created,
> but any of the lines after that will cause
> an error.
>
>
>> 2) Test the new 3D Viewer based on Java 3D 1.6, downloadable from here:
>>
http://curtis.imagej.net/2015-10-06-jogl-java3d/>> Which should work correctly with Java 8. (Feedback welcome!)
>>
> I downloaded this, and ran it.
>
> Upon startup, it pops up the following message:
> There are obsolete java 3D libraries installed as Java extensions.
> The following were detected:
> * /System/Library/Java/Extensions/3dcore.jar
> * /System/Library/Java/Extensions/vecmath.jar
> * /System/Library/Java/Extensions/j3dutils.jar
> These libraries will very likely cause problems with 3D visualization.
> Please delete them, then restart the program.
>
>
> If I attempt to delete these files, I get the following message:
> “j3dcore.jar” can’t be modified or deleted because it’s required by OS X
>
> If I proceed naively ahead, and I test java 3D
> (Plugins>Utilites>Debugging>Test Java3D)
> the I get the following:
>
> java.lang.NoClassDefFoundError: Could not initialize class
> javax.media.j3d.Canvas3D
> at Test_Java3D.createPanel(Test_Java3D.java:34)
> at Test_Java3D.run(Test_Java3D.java:25)
> at ij.IJ.runUserPlugIn(IJ.java:212)
> at ij.IJ.runPlugIn(IJ.java:176)
> at ij.Executer.runCommand(Executer.java:132)
> at ij.Executer.run(Executer.java:65)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Best regards
> --aryeh
>