AimsLinearcomb "-e" constant

AIMS library and commands usage

Moderators: denghien, riviere

Post Reply
User avatar
BigBrain_musician
Posts: 4
Joined: Mon May 12, 2008 5:56 pm
Location: Québec

AimsLinearcomb "-e" constant

Post by BigBrain_musician »

Hi expert I'm using AimsLinearcomb like this :

C:\Documents and Settings\Mathieu\Bureau\SHFJ_pack-stable-win32-3.0.2\SHFJ_pack-stable-win32-3.0.2\bin>Aimslinearcomb.bat -i C:\chamfer\pa15_close.img -j C:\chamfer\pa15_erosion.img -o C:\test.img -c -1

Then we can see that on the screen, et can see that the value -1 have been set to -1. So this is just a way to make a substraction between two images.
options parsed
i1 : C:\chamfer\pa15_close.img
a : 1
b : 1
c : -1
d : 1
e : 0
i2 : C:\chamfer\pa15_erosion.img
fileout : C:\test.img

here is my problem : when I want to add 255 to the image.

C:\Documents and Settings\Mathieu\Bureau\SHFJ_pack-stable-win32-3.0.2\SHFJ_pack-stable-win32-3.0.2\bin>Aimslinearcomb.bat -i C:\chamfer\pa15_close.img -j C:\chamfer\pa15_erosion.img -o C:\test.img -c 1 -e 255
option `-e' requires an argument

Why the function do that ''option `-e' requires an argument'' is it my syntax or just a little bug. ??

Thanks
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: AimsLinearcomb "-e" constant

Post by riviere »

Ha ha, I know what happens...
You are using the Windows version, and here every program is run via a .bat script which sets environment variables up then runs the "real" program, passing commandline arguments to it. But in .bat scripts, I haven't figured out how to handle more than 9 arguments: I don't even know if it's possible at all. Here you have 10 arguments, so the last one (255) is not transmitted to the Aims commandline...
If anyone has a solution to this...

Now, to make it work, you have to run once the environment variables scripts in a DOS terminal, then you will get access directly to the real compiled (.exe) commands, not to the .bat frontends:

Code: Select all

C:\Documents and Settings\Mathieu\Bureau\SHFJ_pack-stable-win32-3.0.2\SHFJ_pack-stable-win32-3.0.2\bin\SHFJEnvironmentVariables.bat
then you have everything needed in PATH (from any directory if you use cd):

Code: Select all

Aimslinearcomb -i C:\chamfer\pa15_close.img -j C:\chamfer\pa15_erosion.img -o C:\test.img -c 1 -e 255
it should work better...

Denis

PS: there is an equivalent "SHFJEnvironmentVariables.sh" if you are using a Unix bash shell (either msys, cygwin or other). In the next version the "SHFJEnvironmentVariables.*" scripts will be renamed "cartopack.*"
Post Reply