Sample images on local folder

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sample images on local folder

Samuel Meulenyzer-2
Hi all,

I would like to know if it is possible to change the access of sample images ( 'File->Open samples') which is in the original ImageJ pack directly accessing by URL link (for example  :   http://rsb.info.nih.gov/images/boat.gif ) by a local folder link (for example : c:/program files/imagej/sample images) ?

Thanks a lot.

SM




      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Reply | Threaded
Open this post in threaded view
|

Re: Sample images on local folder

Michael Schmid
Hi Samuel,

as I understand the Prefs.java code, thats not so easy:
It seems that this value, which is in JI_Props.txt inside
ij.jar cannot be overwritten by a value in IJ_Prefs.txt.
Thus you have to edit it into the IJ_Props.txt:

Open ij.jar with a .zip utility (or temporarily rename it to
ij.zip, then open it).
There open the file IJ_Props.txt with a text editor, and edit
the line

images.location=http://rsb.info.nih.gov/ij/images/

You can replace the URL with whatever you like, e.g.
   file://home/disk1/jonny/imagejsamples/
and also probably with any directory name not having the
"file://" prefix.

You have to do this each time you update ImageJ by replacing
the ij.jar file.

Michael
________________________________________________________________

On 13 Aug 2007, at 10:37, Samuel Meulenyzer wrote:

> Hi all,
>
> I would like to know if it is possible to change the access of  
> sample images ( 'File->Open samples') which is in the original  
> ImageJ pack directly accessing by URL link (for example  :   http://
> rsb.info.nih.gov/images/boat.gif ) by a local folder link (for  
> example : c:/program files/imagej/samp
> le images) ?
>
> Thanks a lot.
>
> SM
Reply | Threaded
Open this post in threaded view
|

Re: Sample images on local folder

jmutterer
Samuel,

you can put all sample images in an 'images' folder inside your imagej
folder and

add the following 2 lines to StartupMacros.txt

installdir = getDirectory("startup");
call("ij.Prefs.setImagesURL", installdir+"images/");

Jerome




On 8/13/07, Michael Schmid <[hidden email]> wrote:

>
> Hi Samuel,
>
> as I understand the Prefs.java code, thats not so easy:
> It seems that this value, which is in JI_Props.txt inside
> ij.jar cannot be overwritten by a value in IJ_Prefs.txt.
> Thus you have to edit it into the IJ_Props.txt:
>
> Open ij.jar with a .zip utility (or temporarily rename it to
> ij.zip, then open it).
> There open the file IJ_Props.txt with a text editor, and edit
> the line
>
> images.location=http://rsb.info.nih.gov/ij/images/
>
> You can replace the URL with whatever you like, e.g.
>    file://home/disk1/jonny/imagejsamples/
> and also probably with any directory name not having the
> "file://" prefix.
>
> You have to do this each time you update ImageJ by replacing
> the ij.jar file.
>
> Michael
> ________________________________________________________________
>
> On 13 Aug 2007, at 10:37, Samuel Meulenyzer wrote:
>
> > Hi all,
> >
> > I would like to know if it is possible to change the access of
> > sample images ( 'File->Open samples') which is in the original
> > ImageJ pack directly accessing by URL link (for example  :   http://
> > rsb.info.nih.gov/images/boat.gif ) by a local folder link (for
> > example : c:/program files/imagej/samp
> > le images) ?
> >
> > Thanks a lot.
> >
> > SM
>