[Neuroimaging] Aligning low and high resolution images in voxel space

Ariel Rokem arokem at gmail.com
Tue Dec 1 14:53:53 EST 2015


Hi Greg,

Using the current development version of dipy, or the
very-very-very-soon-to-be-released version 0.10 of the software, you can do
something like this:

https://gist.github.com/arokem/0aab282a7287245a7e78

Note that this does linear interpolation, but can easily be adjusted to use
nearest neighbor, by setting:

resampled = affine_map.transform(moving.get_data(), interp='nearest')

Cheers,

Ariel

On Tue, Dec 1, 2015 at 9:55 AM, Greg Kiar <gkiar07 at gmail.com> wrote:

> Hi,
>
> I'm working with various parcellations of the brain which have been
> defined at a 3mm resolution, though my data exists in a 1mm space (the
> MNI152 space). When opening these images with a nifti viewer it is fine as
> the affine transform maps them properly to scale. However, when I'm working
> with data in python I would like my labels defined at 3mm to be in the
> MNI152 space (that they also overlap in voxel space, as well). I would like
> to write a script that "ingests" a low resolution (3mm) atlas into the 1mm
> MNI152 space, and nearest-neighbor interpolates values not defined, if you
> will. Do you know how I can easily do this?
>
> Thanks so much,
> Greg
> --
> Greg Kiar <gkiar07 at gmail.com>
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20151201/4f0a406c/attachment.html>


More information about the Neuroimaging mailing list