[Neuroimaging] Slicing images on different planes

Samuel Botter Martins sbm.martins at gmail.com
Mon Mar 22 07:53:17 EDT 2021


Dear Christopher,


On Sat, Mar 20, 2021 at 11:46 PM Christopher Markiewicz <
markiewicz at stanford.edu> wrote:

> Hi Carl,
>
> It sounds like what you want to do is to interpolate the image in a space
> that's more conveniently rotated so that image dimensions correspond to
> meaningful directions in the world and then visualize slices. The way to go
> about that is going to depend on how well the orientation is described in
> the image affine matrix.
>
> If the affine correctly describes rotations, then you can simply resample
> the image with nibabel.processing.resample_to_output() (
> https://nipy.org/nibabel/reference/nibabel.processing.html#resample-to-output).
> That will produce an image in-memory that you can work with as you show in
> your code, or save and open in another viewer.
>

So, does this mean I could reorient/serialize all images in memory to the
same voxel space?
I mean, regardless of the orientation of each image stored on file, this
function will reorient all of them to the same voxel coordinate space, so
that a voxel img[x, y, z] correspond to the precise position in all images,
am I correct?
Of course, if the image has stored its affine matrix.

Best.

-- 
*Prof. Dr. Samuel Botter Martins*
Professor in Federal Institute of Education, Science and Technology of São
Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/neuroimaging/attachments/20210322/e1ee9205/attachment.html>


More information about the Neuroimaging mailing list