cropping an image + referentials correspondance

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

cropping an image + referentials correspondance

Post by SylvainT »

Hi everybody,

I have a T1 image in nifti format. I need to crop it (meaning: I want to select a parallepiped region of interest) into a smaller file, and then in anatomist, I need both images to appear in the same referential (meaning: when I click on a voxel in the original image, I want to see the cursor go the that same voxel in the cropped image)

Questions:

- is there an Aims/Vip command to crop the image? (for now, I'm using the FSL command 'fslroi')?
- in anatomist, what should I do (in terms of referentials manipulation) to simultaneously visualize both images and that the locations match? (with the result of my 'fslroi' command, I tried to 'apply the builtin referentials' to both the original and the cropped images (the objects), and then to each window, but it doesn't make the locations match...)

Thanks in advance for your help,

Sylvain
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Re: cropping an image + referentials correspondance

Post by Jean-Francois Mangin »

For the crop: Aims/VipSubVolume -h

I do not know what you can do with the Nifti format. I guess you can play with origins but I do not know how.
Temporarily you can create an Anatomist transformation file
Tx Ty Tz
1. 0. 0.
0. 1. 0.
0. 0. 1.
Give two different referentials to the initial volume and cropped one.
Specify the translation in the transformation window.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: cropping an image + referentials correspondance

Post by Yann Cointepas »

You can use the following command:

Code: Select all

 AimsSubVolume -i t1.ima -x 20 -y 20 -z 20 -X 150 -Y 150 -Z 150 -o /tmp/cropped.ima -motion -mdir /tmp/t1_TO_cropped.trm -minv /tmp/cropped_TO_t1.trm
Then you can use one of the two output transformation matrix between t1.ima and cropped.ima in Anatomist.
Note that -X, -Y and -Z can be dimension instead of coordinates (with -l option). See AimsSubVolume -h for more information.
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Re: cropping an image + referentials correspondance

Post by SylvainT »

thanks!
Post Reply