Open yanningzuo opened 7 years ago
It says Caused by: java.lang.NullPointerException at trainableSegmentation.Weka_Segmentation$CustomWindow.setButtonsEnabled(Weka_Segmentation.java:1110) at trainableSegmentation.Weka_Segmentation.loadClassifier(Weka_Segmentation.java:2735)
Just found it's working on PC but not Mac
Thanks for reporting! It probably has to do with the dialog to choose the classifier file. I'll fix it as soon as I can.
Thank you so much!
Yanning Zuo Staff Research Associate, Hong Lab
Department of Biological Chemistry Department of Neurobiology David Geffen School of Medicine University of California, Los Angeles
On Fri, Sep 16, 2016 at 1:42 AM, Ignacio Arganda-Carreras < notifications@github.com> wrote:
Thanks for reporting! It probably has to do with the dialog to choose the classifier file. I'll fix it as soon as I can.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fiji/Trainable_Segmentation/issues/31#issuecomment-247548887, or mute the thread https://github.com/notifications/unsubscribe-auth/ATCJgkxx9jF19dWgn1eyuojT82JgE2_lks5qqlZ7gaJpZM4J-fwr .
It seems it is a known problem of the open dialog system. Can you please try again after selecting the "Use JFileChooser to open/save" option in the Edit > Options > Input/Output... menu?
It should look like this:
@yanningzuo Did you finally test if my proposed solution fixed the issue?
Hi Ignacio,
Very sorry for the late reply... I was using PC and I just confirmed that Mac still couldn't open classifier after selecting the "Use JFileChooser to open/save" and using version 3.2.4.
Thank you so much for reminding me!
Best regards,
Yanning
Hello @yanningzuo, It works the other way around. If you are using a Mac, you should uncheck the "Use JFileChooser to open/save" option. It seems there is a problem with JFileChooser on Mac OS.
Hi Ignacio,
I actually tried both ways but neither worked on Mac...
Weird! Which version of Mac OS and Java do you have?
I am using OS X Yosemite 10.10.5 and did not install Java on my Mac
I just noticed you are not using version 3.2.5 which enforces the use of other dialogs instead of JFileChooser if the option is unchecked. Can you please try with that version of the plugin?
Actually, I am using the latest version 3.2.5 updated today. I remember it was 3.2.4 last night
This is my most recent code:
selectWindow("Result of Clipboard-1"); run("Trainable Weka Segmentation"); selectWindow("Trainable Weka Segmentation v3.2.5"); call("trainableSegmentation.Weka_Segmentation.loadClassifier", "/Users/lab-public/Desktop/Green.model"); call("trainableSegmentation.Weka_Segmentation.getProbability");
I see, and this only happens from a macro? You might need to add a wait
command after calling the plugin so it has time to load. This works for me:
selectWindow("Result of Clipboard-1");
run("Trainable Weka Segmentation");
wait( 2000 );
selectWindow("Trainable Weka Segmentation v3.2.5");
call("trainableSegmentation.Weka_Segmentation.loadClassifier", "/Users/lab-public/Desktop/Green.model");
call("trainableSegmentation.Weka_Segmentation.getProbability");
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
Hi,
It seems to be some problems with the "load classifier" macro command. I tried several time with the command as below,but overtime it said "cannot load classifier":
run("Trainable Weka Segmentation"); selectWindow("Trainable Weka Segmentation v3.1.2"); call("trainableSegmentation.Weka_Segmentation.loadClassifier", "/Users/lab-public/Desktop/Green.model"); call("trainableSegmentation.Weka_Segmentation.getProbability"); selectWindow("Probability maps");
I used macro recorder and checked a few times. Probably there's something wrong with the Weka.
Thanks!