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

Peter

Cv

Bil

Hobby
 Links
 Køretøjer
 Modeltog
 Patinering



Interface Specification next up previous
Next: Reslice modules Up: Read/Save Math modules Previous: Read/Save Math modules

Interface Specification

A valid module for reading registration data into MARS has the following structure (Part of code from ReadCor.m).
function [A,Struct]=ReadCor(corfile)
% function [A,Struct]=ReadCor(corfile)
%   
%  Function to read coregistration data from NRU cor format.
%  Input is corfile (.cor filename to read) and 
%  ouputs
%
%  A -  "real world" / talairach space transformation matrix 
%  Struct with fields
%    A - "real world" / talairach space transformation matrix    
%    hdrI - input space Analyze hdr
%    hdrO - output space Analyze hdr
%    descr - descriptive string
%
%  NRU cor format is simply a matlab .mat file (with extension
%  .cor). The contents is the above Struct, as well as the variable
%  'filetype', with value 'nru_cor';
%
%  Warning: Existence of corfile is not checked - must be done
%  before calling ReadCor, e.g. using uigetfile
%
%  PW, NRU, 2001
%  

% This string defines that this is a Math reading module, what string
% to put in the main interface, and the extension of the files to be read.
  
% MATHREADDESC NRU COR format (*.cor)
A valid module for saving registration data from MARS has the following structure (Part of code from SaveCor.m).
function message=SaveCor(corfile,Struct)
%
% function SaveCor(corfile,Struct)
%   
%  Function to save coregistration data to NRU cor format.
%  Inputs are airfile (output filename) and 
%  Struct with fields
%    A - "real world" / talairach space transformation matrix    
%    hdrI - input space Analyze hdr
%    hdrO - output space Analyze hdr
%    descr - descriptive string
%
%  NRU cor format is simply a matlab .mat file (with extension
%  .cor). The contents is the above Struct, as well as the variable
%  'filetype', with value 'nru_cor';
%  
%   Warning: Output is written to 'corfile' without checking.
%   Checking should be done beforehand, e.g. using uiputfile.
%
%
%  PW, NRU, 2001
%
  
% This string defines that this is a Math saving module, what string
% to put in the main interface, and the extension of the files to be
% written

% MATHDESC NRU COR format (*.cor)
Modules delivered with the PVEOut registration package to read/save math data are
  • ReadCor.m/SaveCor.m (NRU .cor file format)
  • ReadAir.m/SaveAir.m (Air 5.0 .air file format)



Claus Svarer 2006-01-11


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