Next: Example data
Up: Reslice modules
Previous: Reslice modules
A valid reslicing module is a Matlab function with the following
structure (Part of code from Reslice.m).
% function imgO=Reslice(Struct,[method]);
% Function to reslice an Analyze image using
% affine 12-parameter transformation matrix.
% Struct has the fields
% hdrI - input file Analyze header
% hdrO - output file Analyze header
% A - 12 parm. affine transformation matrix
% for application xyzO=A*xyzI. A is in
% real world (mm) coordinates.
% [imgI] - optional field. If Struct has this field,
% the input data are taken from here. Otherwise,
% the image given in hdrI.name is loaded.
% [imgO] - optional field. If Struct has this field, the output
% is non-empty, and no datafile is written to disk.
% method - defines what interpolation method to use. If none
% is given, 'linear' is assumed.
% imgO - Output Analyze Img data. only non-empty if the field
% 'imgO' exists in Struct.
% Warning: Output is written to hdr0.name without checking.
% Checking should be done beforehand, e.g. using uiputfile.
% hdr.origin information is assumed correct.
% Note: A third input parameter - sincparms - is unused, but
% needed for concistency whith ResliceWarp and ResliceAir
% PW, NRU, 2001
% The following string defines that this is a reslice module. The
% latter part of the string defines what to write on the main interface.
% RESLICEDESC interp3 (Matlab)
% Check for definition of temp area. Defaults to /tmp
The following reslice modules are supplied with the PVEOut
Note: The modules marked by asterisks (*) require external
programs to reslice data. It is generally recommended to use
warp_reslice or interp3, since the reslice program from the Air
package does not keep correct bit resolution on the resliced images.
- warp_reslice (mriwarp) (*)
- reslice (Air 5.0) (*)
- interp3 (Matlab built-in)