Posted by
Jan Eglinger on
Mar 31, 2015; 10:15am
URL: http://imagej.273.s1.nabble.com/Trainable-Weka-Segmentation-Result-image-calibration-tp5012265.html
Hi Ignacio,
I have a question/feature request for your Trainable Weka Segmentation
plugin again :)
Currently, the probability map you get upon clicking the "Get
probability" button is not calibrated/scaled. I think adding a simple
result.setCalibration(trainingImage.getCalibration())
to WekaSegmentation.java in line #4489 [1] would do the trick.
I would have filed a pull request, but couldn't test it quickly because
of maven-javadoc-plugin failing when trying to run maven (I have to sort
that out later).
In addition, I noticed that a NullPointerException is thrown (now
displayed in the new ImageJ Console [2]) upon starting Trainable Weka
Segmentation, related to the GenericObjectEditor class of weka when you
try to insert classifiers [3]. I pasted the stack trace below [4]. Don't
know if that's something important to fix, but it might annoy users now
that the Console is there.
Best regards,
Jan
[1]:
https://github.com/fiji/Trainable_Segmentation/blob/master/src/main/java/trainableSegmentation/WekaSegmentation.java#L4489[2]:
http://imagej.net/2015-03-26_-_ImageJ_2.0.0-rc-28_released[3]:
https://github.com/fiji/Trainable_Segmentation/blob/master/src/main/java/trainableSegmentation/Weka_Segmentation.java#L2350-2371[4]: Console output:
Refreshing GOE props...
java.lang.NullPointerException
at weka.core.ClassCache.initFromManifest(ClassCache.java:248)
at weka.core.ClassCache.initFromJar(ClassCache.java:293)
at weka.core.ClassCache.initFromClasspathPart(ClassCache.java:351)
at weka.core.ClassCache.initialize(ClassCache.java:373)
at weka.core.ClassCache.<init>(ClassCache.java:111)
at weka.core.ClassDiscovery.initCache(ClassDiscovery.java:447)
at weka.core.ClassDiscovery.clearCache(ClassDiscovery.java:481)
at weka.core.ClassDiscovery.clearClassCache(ClassDiscovery.java:490)
at
weka.core.WekaPackageManager.refreshGOEProperties(WekaPackageManager.java:1143)
at weka.core.WekaPackageManager.loadPackages(WekaPackageManager.java:1134)
at weka.core.WekaPackageManager.loadPackages(WekaPackageManager.java:1047)
at
weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:177)
at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:247)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
at java.lang.reflect.Field.get(Field.java:358)
at
trainableSegmentation.Weka_Segmentation.<clinit>(Weka_Segmentation.java:2358)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at ij.IJ.runUserPlugIn(IJ.java:197)
at ij.IJ.runPlugIn(IJ.java:163)
at ij.Executer.runCommand(Executer.java:131)
at ij.Executer.run(Executer.java:64)
at java.lang.Thread.run(Thread.java:619)
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html