PW
          _ _ _                _                                  
__      _(_) | | ___ _ __   __| |_ __ _   _ _ __   ___  _ __ __ _ 
\ \ /\ / / | | |/ _ \ '_ \ / _` | '__| | | | '_ \ / _ \| '__/ _` |
 \ V  V /| | | |  __/ | | | (_| | |  | |_| | |_) | (_) | | | (_| |
  \_/\_/ |_|_|_|\___|_| |_|\__,_|_|   \__,_| .__(_)___/|_|  \__, |
                                           |_|              |___/ 

Peter

Cv

Bil

Hobby
 Links
 Køretøjer
 Modeltog
 Patinering



Interface Specification next up previous
Next: Air 5.0 Up: Registration modules Previous: Registration modules

Interface Specification

The program interface of a registration subtask module is a Matlab function with the following structure.
function Return=RegistrationModule(files,parent,ReturnFcn,Visualizer)
% 
% This is a generic template for a registration module for the PVEOut
% registration package.
%

%
% The string below defines that this is a registration module. The
% latter part defines the string that will appear on the MARS interface
%
% PLUGINDESC Generic registration module
%
  
% 
% The input parameters are:
%
% files      - Struct with fields STD, RES and A:
%              STD is a string containing the standard filename
% 
%              RES is a cell array of strings containing the reslice
%              filenames
% 
%              A is a cell array of transformation matrices from the main
%              interface, defining transformations between the RES files
%              and the STD file.
%
%
% parent     - Matlab figure handle of the main interface calling us.
%
%
% 
% ReturnFcn  - String containing the matlab function to execute on
%              module exit.
%
%
% Visualizer - The function to call for visualisation 'during
%              registration'.
%
%

% 
% This is where code should be written to 
% 
% 1) Select which RES dataset(s) should be registerd with the STD
% dataset, if more RES datasets are defined. (Some modules handles all
% RES datasets at once, others not). 
%
% 2) Calculate registration parameters, e.g.:
%

A=cell(length(files.RES),1);

%
% A should always have the same length as the input files.RES cell
% array, and contain homogenous transformation matrices to MARS
% a reslice coordinate set to a standard set:
%
% x_std=A{j}*x_res,
% 
% where x_* are 4-dimensional homogenous coordinate vectors. Only
% entries in A selected in 1) should contain data.
%

%
% 3) Evaluate the following code to return data to the main program:
% (This code can ofcourse be evaluated elsewhere, e.g. from a gui program.

feval(ReturnFcn,'ReturningData',parent,A);

% End of the registration module.


Claus Svarer 2006-01-11


Last Modified: Wednesday, 11-Jan-2006 15:26:30 CET