Dividing an image by another one

AIMS library and commands usage

Moderators: denghien, riviere

Post Reply
"i"
Posts: 6
Joined: Mon Oct 09, 2006 8:24 am
Location: Salpétrière

Dividing an image by another one

Post by "i" »

Hello guys,

I'm trying to divide an image by another one. Tried first using AimsPowerComb with -c -1 but it does not seem to work. Then, I discovered AimsDivide but i'm not sure to really understand how it's working as the range of values of the output file is not corresponding.

Thx in advance for your help.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Dividing an image by another one

Post by riviere »

Hi,
You can use cartoLinearComb.py:

Code: Select all

cartoLinearComb.py -i image1.nii -i image2.nii -o divided.nii -f "I1/I2"
You will have to make sure that the voxel type of input images is appropriate for the output too, since the output voxel type is the same as inputs.
Denis
"i"
Posts: 6
Joined: Mon Oct 09, 2006 8:24 am
Location: Salpétrière

Re: Dividing an image by another one

Post by "i" »

Thanks Denis,

I tried the command with homogenous input files but always got output files without any value ("Not a Number"). It only works when I divide one image by itself...

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

Re: Dividing an image by another one

Post by riviere »

Maybe there are voxels with a zero value in the denominator image ?
Post Reply