Page 1 of 1

Dividing an image by another one

Posted: Tue Aug 12, 2014 8:51 pm
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.

Re: Dividing an image by another one

Posted: Wed Aug 13, 2014 11:07 pm
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

Re: Dividing an image by another one

Posted: Thu Aug 14, 2014 10:16 am
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

Re: Dividing an image by another one

Posted: Fri Aug 15, 2014 1:39 am
by riviere
Maybe there are voxels with a zero value in the denominator image ?