Print

Print


Hi,

It's fine to use fslroi to pad in this way (though you're example call lacks an output name, which I assume is just a typo).

The voxel coordinates in the output (padded) image will start at 0, not -20 (including the z-coordinate - slices are not treated separately).  The mm (world) coordinates, however, will be maintained so that they are consistent with the original image and keep the same mm coordinates for the same anatomical locations (e.g. the mm coordinates of a point like the anterior commissure will be the same in the original and padded images).  So the relationship between the voxel and mm coordinates will be different in the different images.

I hope this helps.

All the best,
Mark



From: FSL - FMRIB's Software Library <[log in to unmask]<mailto:[log in to unmask]>> on behalf of Kaiming Yin <[log in to unmask]<mailto:[log in to unmask]>>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]<mailto:[log in to unmask]>>
Date: Friday, 1 April 2016 15:10
To: "[log in to unmask]<mailto:[log in to unmask]>" <[log in to unmask]<mailto:[log in to unmask]>>
Subject: [FSL] Fwd: fslroi padding

Dear guys,

I tried using fslroi to add space of 0 values before the 0 value in x-axis, also I would like to add empty slices before current slices, so I did, e.g.

20 more before x-axis, and 20 more before current slices:

fslroi input.nii -20 100 0 100 -20 100

It seems to work well, is this way correct?

Also, could I ask in this way, the new image will start in the x-axis from -20, -19, -18 ... or from 0, 1, 2...? Is this the same with the slicing number too? How could I check it?

Thanks,
Kaiming