[Vv] clitkResampleImage

Thomas BAUDIER thomas.baudier at creatis.insa-lyon.fr
Tue Jul 25 14:53:14 CEST 2017


Hi Benoit,

I have no idea, I'll talk to Simon and David after holidays.

Just one thing. Usually, we use to use clitkAffineTransform even to 
resample.
In your case, you can do clitkAffineTransform -i result.nii -l 
SUVImg.nii -o resampleCLITK.nii
and the output origin is the same than SUVImg.nii image.

Best
Thomas

On 2017-07-24 18:38, Benoît Presles wrote:
> Dear vv users,
> 
> When I use clitkResampleImage to resample the image result.nii like
> the image SUVImg.nii (clitkResampleImage -i result.nii -l SUVImg.nii
> -o resampleCLITK.nii), the origin of the resampleCLITK image is not
> the same as the SUVImg image
> (https://cloud.u-bourgogne.fr/index.php/s/LMzrtE1HvegjIaY).
> I did not expect this behaviour especially with the "like option".
> 
> It is because line 231 in clitkResampleImageWithOptionsFilter.txx, you
> modify the output origin:
> // Compute origin based on image corner
>   for(unsigned int i=0; i<OutputImageType::ImageDimension; i++) {
>     m_OutputOrigin[i] -= 0.5 * input->GetSpacing()[i];
>     m_OutputOrigin[i] += 0.5 * m_OutputSpacing[i];
>   }
> 
> Is there any reason?
> 
> 
> Thanks for your help,
> Cheers,
> Ben
> 
> _______________________________________________
> vv mailing list
> vv at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv


More information about the vv mailing list