Matthew,
> thanks Marko - can't see any mention of interpolation methods other than
> b-spline either in the spm_reslice help or code (though beyond the help
> block it is not really commented very much). Do you know which higher
> level function
... not sure what you were wanting to ask ;) but my mentioning of "hold"
was referring to the explanation in spm_slice_vol:
% hold - sets the interpolation method for the resampling.
% 0 Zero-order hold (nearest neighbour).
% 1 First-order hold (trilinear interpolation).
% 2->127 Higher order Lagrange (polynomial) interpolation using
% different holds (second-order upwards).
% -127 - -1 Different orders of sinc interpolation.
Judging from Christopher's comments, this also seems to apply to
spm_reslice. You could also try to use spm_slice_vol somehow, once you
load the reoriented, but not resliced image into memory, but I have not
tried that. Another way would be, as Donald correctly remarked, to set
up a batch job that does what you want and repeatedly call that.
> I'm surprised there is not a even a brief guide to using SPM on the
> command line/in scripts by calling functions in sequence. FSL actively
> pushes you to use the command line... seems crazy to have to dig around
> and trace through the source code to use SPM without GUI?
I think John will have a very distinct opinion on this :) For me, I like
being flexible (i.e., ignorantly fiddling with every aspect by hand :)
and spm allows for that.
> Mathew look into:
>
> spm_coreg_ui.m
[...]
> Thanks for the suggestion but I do not have such a file in my SPM8
> installation (downloaded from the website and unzipped - no mods).
I think spm_coreg_ui.m was part of earlier spm versions. I think it is
superseded by spm_coreg.
> I was looking for a file along these lines to see the sequence of function
> calls to coreg+slice, but as yet haven't found it :/
Looks like you will need to write it yourself :) Something along these
lines may work:
% === start ===
ref = spm_select(1, 'image', 'Select reference image');
move = spm_select(1, 'image', 'Select image to be moved');
x = spm_coreg(ref,move);
M = inv(spm_matrix(x));
MM = spm_get_space(move);
spm_get_space(deblank(move), M*MM);
spm_reslice(move);
% spm_reslice({ref, move}); % if you also want voxel size of 1st image
% === end ===
although I have not really tested this and am not sure this is what you
want (but it might get you started, I hope).
Cheers,
Marko
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|