Thank you very much for the reply, I knew that already by playing around
them, I am really interested in embedding b-splines in it still and I am
working on it...
Thank you
-P
-----Original Message-----
From: John Ashburner [mailto:[log in to unmask]]
Sent: Wednesday, December 10, 2008 9:51 AM
To: Mojabi, Pouria; [log in to unmask]
Subject: Re: [SPM] how to use spline niterpolation with spm_slice_vol
You can use sinc interpolation by passing a "hold" argument to
spm_imcalc_ui
(not quite as good as B-spline, but it is simpler to implement). See
the
help available for spm_imcalc_ui
% Perform algebraic functions on images
% FORMAT Q = spm_imcalc_ui(P,Q,f,flags,Xtra_vars...)
% P - matrix of input image filenames
% [user prompted to select files if arg missing or
empty]
% Q - name of output image
% [user prompted to enter filename if arg missing or
empty]
% f - expression to be evaluated
% [user prompted to enter expression if arg missing or
empty]
% flags - cell vector of flags: {dmtx,mask,type,hold}
% dmtx - Read images into data matrix?
% [defaults (missing or empty) to 0 - no]
% mask - implicit zero mask?
% [defaults (missing or empty) to 0]
% type - data type for output image (see spm_type)
% [defaults (missing or empty) to 4 - 16 bit signed
shorts]
% hold - interpolation hold (see spm_slice_vol)
% [defaults (missing or empty) to 0 - nearest neighbour]
% Xtra_vars... - additional variables which can be used in expression
% Q (output) - full pathname of image written
% Vo - structure containing information on output image (see
spm_vol)
%
In SPM5 onwards, it is rather easier because the interpolation can be
specified via the UI.
Best regards,
-John
On Tuesday 09 December 2008 01:04, Mojabi, Pouria wrote:
> Dear SPM users!
>
>
>
> Hope all is well,
>
>
>
> I would be eternally grateful if any of you guys have any suggestion
for
> my situation,
>
>
>
> I am doing algebraic calculations on image Volumes using spm_imclac,
> (using SPM2)
>
> Inside of the spm_imcalc it uses spm_slice_vol for world to pixel
> coordinate conversion, what I have noticed is, it does not support
> Spline interpolation and by default it uses nearest neighbor or
> zero-order hold and I was wondering how can I incorporate that. In
> another words, how can I do algebraic calculations with Splines be my
> interpolation method of choice
>
>
>
> I very much appreciate any suggestions or feedbacks
>
>
>
> Thank you very much indeed
>
>
>
> -P
>
>
>
> --------------
>
> Pouria Mojabi
>
> Research Associate
>
> Center for Imaging of Neurodegenerative Diseases (CIND)
> VA Medical Center
> 4150 Clement Street,
> San Francisco, CA 94121
> phone: 415-221-4810 x4222
|