Deliver Parameters

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

Deliver Parameters

Sven Boekhoff
HI!
My OS is UbuntuLinux 5.10 and I want to use ImageJ with the "Open
with"-dialog. Therefore i buld a small shellscript (ImageJ.sh). To
transfer all Parameters to the run-script that were deliverd to my sh i
use $*.
The content of ImageJ.sh is:

#!/bin/bash
cd /home/sven/.programme/ImageJ
./run $*

the script ist startet with

/home/user/.programs/ImageJ.sh

When i try to open an Image ith ImageJ the programm starts, but no image
is opened.
My question: Are there No Parameters like "open the Image XYZ" handled
by ImageJ?

Thanks

Sven
Reply | Threaded
Open this post in threaded view
|

Re: Deliver Parameters

Gabriel Landini
Have a look at my message to the list:

Re: Launching ImageJ from external program
on 2006-01-19

I hope it helps.

Gabriel



On Monday 08 May 2006 11:01, Sven Boekhoff wrote:

> HI!
> My OS is UbuntuLinux 5.10 and I want to use ImageJ with the "Open
> with"-dialog. Therefore i buld a small shellscript (ImageJ.sh). To
> transfer all Parameters to the run-script that were deliverd to my sh i
> use $*.
> The content of ImageJ.sh is:
>
> #!/bin/bash
> cd /home/sven/.programme/ImageJ
> ./run $*
>
> the script ist startet with
>
> /home/user/.programs/ImageJ.sh
>
> When i try to open an Image ith ImageJ the programm starts, but no image
> is opened.
> My question: Are there No Parameters like "open the Image XYZ" handled
> by ImageJ?
>
> Thanks
>
> Sven
Reply | Threaded
Open this post in threaded view
|

Re: Deliver Parameters

Sven Boekhoff
Thanks!
The "Parameter-accepting-part" in the run-script was missing. I suggest
to add it as standard to the file.

Sven




Gabriel Landini schrieb:

> Have a look at my message to the list:
>
> Re: Launching ImageJ from external program
> on 2006-01-19
>
> I hope it helps.
>
> Gabriel
>
>
>
> On Monday 08 May 2006 11:01, Sven Boekhoff wrote:
>
>>HI!
>>My OS is UbuntuLinux 5.10 and I want to use ImageJ with the "Open
>>with"-dialog. Therefore i buld a small shellscript (ImageJ.sh). To
>>transfer all Parameters to the run-script that were deliverd to my sh i
>>use $*.
>>The content of ImageJ.sh is:
>>
>>#!/bin/bash
>>cd /home/sven/.programme/ImageJ
>>./run $*
>>
>>the script ist startet with
>>
>>/home/user/.programs/ImageJ.sh
>>
>>When i try to open an Image ith ImageJ the programm starts, but no image
>>is opened.
>>My question: Are there No Parameters like "open the Image XYZ" handled
>>by ImageJ?
>>
>>Thanks
>>
>>Sven
Reply | Threaded
Open this post in threaded view
|

Re: Deliver Parameters

dscho
In reply to this post by Sven Boekhoff
Hi,

On Mon, 8 May 2006, Sven Boekhoff wrote:

> cd /home/sven/.programme/ImageJ

If you use this, you can no longer pass relative paths to the script, i.e.

        sh ImageJ.sh bla.png

will *fail*, since you actually cd away from the current position. Use
something like this instead:

-- snip --
#!/bin/sh
java -jar /full/path/to/ImageJ/ij.jar -ijpath /full/path/to/ImageJ "$*"
-- snap --

Hth,
Dscho