|
_ _ _ _
__ _(_) | | ___ _ __ __| |_ __ _ _ _ __ ___ _ __ __ _
\ \ /\ / / | | |/ _ \ '_ \ / _` | '__| | | | '_ \ / _ \| '__/ _` |
\ V V /| | | | __/ | | | (_| | | | |_| | |_) | (_) | | | (_| |
\_/\_/ |_|_|_|\___|_| |_|\__,_|_| \__,_| .__(_)___/|_| \__, |
|_| |___/
|
|
|
|
Next: Example data Up: Reslice modules Previous: Reslice modules Interface SpecificationA valid reslicing module is a Matlab function with the following structure (Part of code from Reslice.m).
function imgO=Reslice(Struct,method,sincparms);
%
% function imgO=Reslice(Struct,[method]);
%
% Function to reslice an Analyze image using
% affine 12-parameter transformation matrix.
%
% Inputs:
%
% 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.
%
% Output:
% 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
global TEMP_AREA;
if isempty(TEMP_AREA)
TEMP_AREA='/tmp';
end
The following reslice modules are supplied with the PVEOut
registration package:
Claus Svarer 2006-01-11 |
|