Hi
Elizabeth,
This can
be accomplished by two steps:
(1) Use
“ivf”
to invert the displacement field (the *wrp.nii) outputted from
3dwarper.
(2) Use
“applywarp3d”
to transform the ROI to the individual subject space.
I
will elaborate
on each of the above to steps below.
Let’s say that you use 3dwarper to transform a
subject image “sub.nii”
to the standard space by matching it to a target image “trg.nii”
using the
following command:
3dwarper –v –sub sub.nii –trg trg.nii –acpc –A
This command will create a “displacement
field” called
sub_wrp.nii. This is basically a 3D
vector field in nifti format. It
encodes the nonlinear transformation needed to match to “sub.nii”
to “trg.nii”.
Now the problem you are faced with is to match
an ROI which
is in the space of trg.nii to the space of the sub.nii
image. Therefore, you will need the inverse of
sub_wrp.nii. So the first step would be
to invert sub_wrp.nii using the “ivf”
program that has been written for this purpose.
Let’s say that the subject image is of matrix
size
(256x256x180) and voxel size (.94x.94x1.2) while the target image
is of a
different matrix and voxel size. The
command syntax for running ivf would be as follows:
ivf –nx 256 –ny 256 –nz 180 –dx .94 –dy .94
–dz 1.2 –i
sub_wrp.nii –o trg_to_sub_wrp.nii
The above command will create the new inverted
displacement
field trg_to_sub_wrp.nii. Note that you
needed to explicitly specify the size of the output displacement
field “trg_to_sub_wrp.nii”
because the input displacement field “sub_wrp.nii” has the matrix
and voxel
size of the target image which is different from the subject
image.
Finally, you can use applywarp3d to transform
your ROI (say
it was called ROI.nii) to the space of the subject image using the
following
command:
applywarp3d –nn –w trg_to_sub_wrp.nii ROI.nii
This will create the output file CROI.nii
which will be in
the space of the subject image. Note:
in the above command I used the –nn option for (nearest
neighbor)
interpolation. Otherwise, interpolation
effects will cause the transformed ROI to be fuzzy along the edges
which may or may not be desirable depending on your
application.
Hope this helps.
Babak
Threaded View
| Title | Author | Date |
|---|---|---|
| Elizabeth Losin | Jan 1, 2012 | |
| Babak Ardekani | Jan 3, 2012 | |
| Avery Tieh | Sep 25, 2013 | |
| Babak Ardekani | Sep 26, 2013 | |
| Elizabeth Losin | Jan 4, 2012 | |
| Christine Zakrzewski | Jan 1, 2012 | |
