[Vv] Problem with clitkAffineTransform

Thomas BAUDIER thomas.baudier at creatis.insa-lyon.fr
Tue Feb 12 11:25:43 CET 2019


I continued to investigate your problem. And I found that the problem 
comes from the interpolation. Because I draw the same white circle on 
the following slice in ROI_CT.nii and the line
clitkAffineTransform -i ROI_CT.nii -o ROI_PET.nii -l PET.nii --interp=0 
-v
works.

In a nutshell, I think the circle is too thin and it was not taken into 
account during interpolation. If I remember well, with --adaptive 
option, the algorithm is slightly different because it computes the 
origin taking into account the difference of spacing. This is why there 
is a little difference. And it explains why the output was not empty 
because, as the origin was moved, with the option, the interpolation 
took different voxels.

I hope I answer your question. For me, the best  thing is to draw an 
extra circle on the following slice and keep your command line (but I do 
not know why you choose to draw only one slice).

Regards
Thomas



On 2019-02-12 10:30, Benoît Presles wrote:
> Hello Thomas,
> 
> Thanks for the hint. Indeed, when I use this option, ROI_PET.nii is
> not empty anymore.
> Can you tell me more about this option ?
> 
> First, I thought that this option was only necessary when used in
> combination with --size or --spacing, etc. not with the -l option.
> 
> Second, I have noticed that the only difference between
> clitkAffineTransform -i ROI_CT.nii -o ROI_PET.nii -l PET.nii
> --interp=0 -v --adaptive and clitkAffineTransform -i ROI_CT.nii -o
> ROI_PET.nii -l PET.nii --interp=0 -v is the origin of the output
> image.
> Without the --adaptive, the ROI_PET image has the same origin as the
> PET image but with the --adaptive option, the origin of the ROI_PET
> image is slightly different.
> 
> 
> Thanks for your help,
> Best regards,
> Ben
> 
> 
> 
> Le 12/02/2019 à 09:55, Thomas BAUDIER a écrit :
>> 
>> Hi Benoit,
>> 
>> You can use the --adaptive option to deal with your problem:
>> 
>> clitkAffineTransform -i ROI_CT.nii -o ROI_PET.nii -l PET.nii 
>> --interp=0 -v --adaptive
>> 
>> Regards
>> Thomas
>> 
>> On 2019-02-11 19:44, Benoît Presles wrote:
>>> Dear vv users,
>>> 
>>> I am trying to resample a ROI image (ROI_CT.nii) like the
>>> corresponding PET image (PET.nii) doing the following command line :
>>> clitkAffineTransform -i ROI_CT.nii -o ROI_PET.nii -l PET.nii 
>>> --interp=0 -v
>>> 
>>> The resulting image (ROI_PET.nii) is black. Here is the link to
>>> download my data :
>>> https://cloud.u-bourgogne.fr/index.php/s/MFbfmeaEBEQRgnz/download
>>> 
>>> Thanks for your help,
>>> Best regards,
>>> Ben
>>> _______________________________________________
>>> vv mailing list
>>> vv at creatis.insa-lyon.fr
>>> https://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>> _______________________________________________
>> vv mailing list
>> vv at creatis.insa-lyon.fr
>> https://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> 
> _______________________________________________
> vv mailing list
> vv at creatis.insa-lyon.fr
> https://www.creatis.insa-lyon.fr/mailman/listinfo/vv


More information about the vv mailing list