Login  Register

ij.Prefs and IJ_Prefs.txt

Posted by Colin Poczatek on Mar 17, 2009; 4:34pm
URL: http://imagej.273.s1.nabble.com/ij-Prefs-and-IJ-Prefs-txt-tp3693279.html

I'm having some trouble understanding how to get/set preferences.  So
lets say that in IJ_Prefs.txt there's a line:

dir.image=/nrims/home3/cpoczatek/biggers_movie/

So when create a new ij.Prefs object based on the API docs it sounds
like it reads and parses that file, but I don't have a "dir.image" key
in that Prefs object.  What am I missing?  Do I need to call
prefs.load(Object ij, Applet a)?  ij should be IJ.getInstance()?  What
applet?

ij.Prefs prefs = new ij.Prefs();
System.out.println(prefs.get("dir.image", ""));

Just prints "" because it doesn't have the key.

And that is the default path you get when the user saves/opens/etc
right?  I mean imagej is looking at that file for the default path?  And
I should be able to call

prefs.set("dir.image", someotherstring);

Though it seems like the save button in a line profile plot defaults to
the ImageJ directory.  Bug?



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.