Dividing an image by another one

AIMS library and commands usage

Moderators: riviere, denghien

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

Dividing an image by another one

Postby "i" » Tue Aug 12, 2014 8:51 pm

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: 1358
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Dividing an image by another one

Postby riviere » Wed Aug 13, 2014 11:07 pm

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

Postby "i" » Thu Aug 14, 2014 10:16 am

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: 1358
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Dividing an image by another one

Postby riviere » Fri Aug 15, 2014 1:39 am

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


Return to “AIMS”

Who is online

Users browsing this forum: No registered users and 2 guests