Get header of mri [ Yokogawa MEG Reader toolbox for MATLAB ] brief: This function retrieves header information of specified mri file (*.mri). usage: mri_header = getYkgwMriHdr(filepath) arguments: filepath : file path of *.mri file return values: mri_header : structure of mri header information .data_style : double, data style (0 : DICOM, others : Polhemus) .model : structure of conductor model .done : bool, is conductor model defined ? ( true -> defined ) .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' .hpi : The structure of point data about picked HPI. .done : boolean, Is pick-up of a HPI point done ? (true : done) .mri_pos : double, HPI position [x, y, z] 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 .image_parameter : structure of image parameters .intensity : 1 x 2 row vector(double), minimum and maximum of image values .initial_color : 1 x 2 row vector(double), minimum and maximum of initial brightness .color : 1 x 2 row vector(double), minimum and maximum of current brightness .normalize : structure of HEAD coordinate system ( LPA(x-), RPA(x+), nasion(y+) ) .done : bool, is HEAD coordinate system defined ? ( true -> defined ) .mri2normalize : 4 x 4 matrix(double), matrix transforming MRI coordinate to HEAD coordinate [meter] usage: [xhead, yhead, zhead, 1]' = mri_header.normalize.mri2normalize * [xmri, ymri, zmri, 1]' .point : structure array of HEAD fiducial points .done : bool, is pick-up of a HEAD fiducial point done ? ( true -> done ) .name : string, name of HEAD fiducial points .x : double, x coordinate [meter] of a HEAD fiducial point on MRI coordinate .y : double, y coordinate [meter] of a HEAD fiducial point on MRI coordinate .z : double, z coordinate [meter] of a HEAD fiducial point on MRI coordinate .besa_fiducial : structure of BESA fiducial information .point : structure array of BESA fiducial points .done : bool, is pick-up of a BESA fiducial point done ? ( true -> done ) .x : double, x coordinate [meter] of a BESA fiducial point on MRI coordinate .y : double, y coordinate [meter] of a BESA fiducial point on MRI coordinate .z : double, z coordinate [meter] of a BESA fiducial point on MRI coordinate rivision history 2 : 2011.04.27 : add HPI(marker) information 1 : 2011.02.14 : 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.
0001 % Get header of mri 0002 % [ Yokogawa MEG Reader toolbox for MATLAB ] 0003 % 0004 % brief: 0005 % This function retrieves header information of specified mri file (*.mri). 0006 % 0007 % usage: 0008 % mri_header = getYkgwMriHdr(filepath) 0009 % 0010 % arguments: 0011 % filepath : file path of *.mri file 0012 % 0013 % return values: 0014 % mri_header : structure of mri header information 0015 % .data_style : double, data style (0 : DICOM, others : Polhemus) 0016 % .model : structure of conductor model 0017 % .done : bool, is conductor model defined ? ( true -> defined ) 0018 % .type : double, type of conductor model as follows: 0019 % UNKNOWN_MODEL = -1; 0020 % NO_MODEL = 0; 0021 % SPHERICAL_MODEL = 1; 0022 % LAYERED_MODEL = 2; 0023 % [when model_type is SPHERICAL_MODEL] 0024 % .cx : double, x coordinate [meter] of spherical center position on MRI coordinate 0025 % .cy : double, y coordinate [meter] of spherical center position on MRI coordinate 0026 % .cz : double, z coordinate [meter] of spherical center position on MRI coordinate 0027 % .radius : double, radius [meter] of spherical conductor on MRI coordinate 0028 % [when model_type is LAYERED_MODEL] 0029 % .ax : double, coefficient 'ax' of planar equation 'ax * x + ay * y + az * z = c' 0030 % .ay : double, coefficient 'ay' of planar equation 'ax * x + ay * y + az * z = c' 0031 % .az : double, coefficient 'az' of planar equation 'ax * x + ay * y + az * z = c' 0032 % .c : double, coefficient 'c' of planar equation 'ax * x + ay * y + az * z = c' 0033 % 0034 % .hpi : The structure of point data about picked HPI. 0035 % .done : boolean, Is pick-up of a HPI point done ? (true : done) 0036 % .mri_pos : double, HPI position [x, y, z] on MRI coordinate [meter] 0037 % .label : string, HPI label as follows: 0038 % 'LPA' : Left PreAuricular 0039 % 'RPA' : Right PreAuricular 0040 % 'CPF' : Center PreFrontal 0041 % 'LPF' : Left PreFrontal 0042 % 'RPF' : Right PreFrontal 0043 % 0044 % .image_parameter : structure of image parameters 0045 % .intensity : 1 x 2 row vector(double), minimum and maximum of image values 0046 % .initial_color : 1 x 2 row vector(double), minimum and maximum of initial brightness 0047 % .color : 1 x 2 row vector(double), minimum and maximum of current brightness 0048 % 0049 % .normalize : structure of HEAD coordinate system ( LPA(x-), RPA(x+), nasion(y+) ) 0050 % .done : bool, is HEAD coordinate system defined ? ( true -> defined ) 0051 % .mri2normalize : 4 x 4 matrix(double), matrix transforming MRI coordinate to HEAD coordinate [meter] 0052 % usage: [xhead, yhead, zhead, 1]' = mri_header.normalize.mri2normalize * [xmri, ymri, zmri, 1]' 0053 % .point : structure array of HEAD fiducial points 0054 % .done : bool, is pick-up of a HEAD fiducial point done ? ( true -> done ) 0055 % .name : string, name of HEAD fiducial points 0056 % .x : double, x coordinate [meter] of a HEAD fiducial point on MRI coordinate 0057 % .y : double, y coordinate [meter] of a HEAD fiducial point on MRI coordinate 0058 % .z : double, z coordinate [meter] of a HEAD fiducial point on MRI coordinate 0059 % 0060 % .besa_fiducial : structure of BESA fiducial information 0061 % .point : structure array of BESA fiducial points 0062 % .done : bool, is pick-up of a BESA fiducial point done ? ( true -> done ) 0063 % .x : double, x coordinate [meter] of a BESA fiducial point on MRI coordinate 0064 % .y : double, y coordinate [meter] of a BESA fiducial point on MRI coordinate 0065 % .z : double, z coordinate [meter] of a BESA fiducial point on MRI coordinate 0066 % 0067 % rivision history 0068 % 2 : 2011.04.27 : add HPI(marker) information 0069 % 1 : 2011.02.14 : 1st argument is modified from file ID to file path. 0070 % 0 : 2010.06.24 : first release 0071 % 0072 % Copyright (C) 2010-2011 Yokogawa Electric Corporation, All Rights Reserved.