Home > vbmeg > external > yokogawa_lib > getYkgwHdrCoregist.m

getYkgwHdrCoregist

PURPOSE ^

Get header of the system information

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Get header of the system information
 [ Yokogawa MEG Reader toolbox for MATLAB ]

 brief:
   This function retrieves information about coregistration in the specified file.

 usage:
   coregist = getYkgwHdrCoregist(filepath)

 arguments:
   filepath       : file path

 return values:
   coregist       : structure of coregistration
     .done        :   bool, Is coregistration done ? (true : done)
     .mri_type    : string, type of MRI as follows:
                      NoMriFile       = 0;
                      NormalMriFile   = 1;
                      VirtualMriFile  = 2;
     .mri_file    : string, file path of MRI file (*.mri)
     .hpi_file    : string, file path of HPI file (*.mrk)
     .meg2mri     : 4 x 4 matrix(double), matrix transforming MEG device coordinate to MRI coordinate [meter]
                    usage: [xmri, ymri, zmri, 1]' = coregist.meg2mri * [xmeg, ymeg, zmeg, 1]'
     .mri2meg     : 4 x 4 matrix(double), matrix transforming MRI coordinate to MEG device coordinate [meter]
                    usage: [xmeg, ymeg, zmeg, 1]' = coregist.meg2mri * [xmri, ymri, zmri, 1]'
     .hpi         : structure of HPI
       .meg_pos   : 1 x 3 matrix(double), HPI position on MEG device coordinate [meter]
       .mri_pos   : 1 x 3 matrix(double), HPI position on MRI coordinate [meter]
       .label     : string, HPI label as follows:
                    'LPA'  Left   PreAuricular
                    'RPA'  Right  PreAuricular
                    'CPF'  Center PreFrontal
                    'LPF'  Left   PreFrontal
                    'RPF'  Right  PreFrontal
     .model       : structure of conductor model
       .type      : double, type of conductor model as follows:
                                UNKNOWN_MODEL   = -1;
                                NO_MODEL        =  0;
                                SPHERICAL_MODEL =  1;
                                LAYERED_MODEL   =  2;
     [when model.type is SPHERICAL_MODEL]
       .cx        : double, x coordinate [meter] of spherical center position on MRI coordinate
       .cy        : double, y coordinate [meter] of spherical center position on MRI coordinate
       .cz        : double, z coordinate [meter] of spherical center position on MRI coordinate
       .radius    : double,       radius [meter] of spherical conductor on MRI coordinate
     [when model.type is LAYERED_MODEL]
       .ax        : double, coefficient 'ax' of planar equation 'ax * x + ay * y + az * z = c'
       .ay        : double, coefficient 'ay' of planar equation 'ax * x + ay * y + az * z = c'
       .az        : double, coefficient 'az' of planar equation 'ax * x + ay * y + az * z = c'
       .c         : double, coefficient 'c'  of planar equation 'ax * x + ay * y + az * z = c'

 rivision history
   1 : 2011.02.14 : add HPI(marker) information
                    1st argument is modified from file ID to file path.
   0 : 2010.06.24 : first release
 
 Copyright (C) 2010-2011 Yokogawa Electric Corporation, All Rights Reserved.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Get header of the system information
0002 % [ Yokogawa MEG Reader toolbox for MATLAB ]
0003 %
0004 % brief:
0005 %   This function retrieves information about coregistration in the specified file.
0006 %
0007 % usage:
0008 %   coregist = getYkgwHdrCoregist(filepath)
0009 %
0010 % arguments:
0011 %   filepath       : file path
0012 %
0013 % return values:
0014 %   coregist       : structure of coregistration
0015 %     .done        :   bool, Is coregistration done ? (true : done)
0016 %     .mri_type    : string, type of MRI as follows:
0017 %                      NoMriFile       = 0;
0018 %                      NormalMriFile   = 1;
0019 %                      VirtualMriFile  = 2;
0020 %     .mri_file    : string, file path of MRI file (*.mri)
0021 %     .hpi_file    : string, file path of HPI file (*.mrk)
0022 %     .meg2mri     : 4 x 4 matrix(double), matrix transforming MEG device coordinate to MRI coordinate [meter]
0023 %                    usage: [xmri, ymri, zmri, 1]' = coregist.meg2mri * [xmeg, ymeg, zmeg, 1]'
0024 %     .mri2meg     : 4 x 4 matrix(double), matrix transforming MRI coordinate to MEG device coordinate [meter]
0025 %                    usage: [xmeg, ymeg, zmeg, 1]' = coregist.meg2mri * [xmri, ymri, zmri, 1]'
0026 %     .hpi         : structure of HPI
0027 %       .meg_pos   : 1 x 3 matrix(double), HPI position on MEG device coordinate [meter]
0028 %       .mri_pos   : 1 x 3 matrix(double), HPI position on MRI coordinate [meter]
0029 %       .label     : string, HPI label as follows:
0030 %                    'LPA'  Left   PreAuricular
0031 %                    'RPA'  Right  PreAuricular
0032 %                    'CPF'  Center PreFrontal
0033 %                    'LPF'  Left   PreFrontal
0034 %                    'RPF'  Right  PreFrontal
0035 %     .model       : structure of conductor model
0036 %       .type      : double, type of conductor model as follows:
0037 %                                UNKNOWN_MODEL   = -1;
0038 %                                NO_MODEL        =  0;
0039 %                                SPHERICAL_MODEL =  1;
0040 %                                LAYERED_MODEL   =  2;
0041 %     [when model.type is SPHERICAL_MODEL]
0042 %       .cx        : double, x coordinate [meter] of spherical center position on MRI coordinate
0043 %       .cy        : double, y coordinate [meter] of spherical center position on MRI coordinate
0044 %       .cz        : double, z coordinate [meter] of spherical center position on MRI coordinate
0045 %       .radius    : double,       radius [meter] of spherical conductor on MRI coordinate
0046 %     [when model.type is LAYERED_MODEL]
0047 %       .ax        : double, coefficient 'ax' of planar equation 'ax * x + ay * y + az * z = c'
0048 %       .ay        : double, coefficient 'ay' of planar equation 'ax * x + ay * y + az * z = c'
0049 %       .az        : double, coefficient 'az' of planar equation 'ax * x + ay * y + az * z = c'
0050 %       .c         : double, coefficient 'c'  of planar equation 'ax * x + ay * y + az * z = c'
0051 %
0052 % rivision history
0053 %   1 : 2011.02.14 : add HPI(marker) information
0054 %                    1st argument is modified from file ID to file path.
0055 %   0 : 2010.06.24 : first release
0056 %
0057 % Copyright (C) 2010-2011 Yokogawa Electric Corporation, All Rights Reserved.

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005