Personal tools
  • Help

nutmeg:NutmegTrip

From NITRC Wiki

Jump to: navigation, search

Please see http://fieldtrip.fcdonders.nl/development/nutmeg?&#changes_to_ft_for_compatibility_with_nm for ideas in progress on the integration.

Contents

nut_ft2nuts.m

% nuts = nut_ft2nuts(data,grid,mripath,mristruct,fid,mmvoxflag)
%
% converts FieldTrip's data format into nutmeg session
%
% nuts = nut_ft2nuts(data,grid);
% 'data' is the fieldtrip structure containing raw data as well as sensor info
% 'data' can be 'raw' or 'timelock'
% 'grid' is the fieldtrip structure containing lead field and voxel coordinates
% 
% mripath, mristruct, fid: (see nut_ftmriN2coreg) (may be empty)
% mmvoxflag (see nut_ftmriN2coreg) (may be empty)

nut_ft2beam.m

% beam = nut_ft2beam(ft,mripath,mristruct,fid,flags)
%
% converts FieldTrip analysis structure to s_beam for NUTMEG visualization
%
% ft:  structure from fieldtrip output from ft_sourceanalysis and/or
%      ft_sourcedescriptives
% mripath, mristruct, fid: (see nut_ftmriN2coreg) (may be empty)
% flags:    .avetime
%           .mmvoxflag (see nut_ftmriN2coreg)

nut_ftgrid2nutsLpvox.m

  % [Lp,voxels,voxelsize] = nut_ftgrid2nutsLpvox(grid)
  % 
  % INPUT: 
  % grid: output from FieldTrip 
  %      grid initially can be created from ft_prepare_leadfield
  %      then leadfield computed from ft_compute_leadfield and added as
  %      grid.leadfield, but see Fieldtrip documentation for details
  % lsc_sensor_labels:  from nuts.meg.lsc_sensor_labels, assuming you have
  %      already loaded data
  %
  % OUTPUT: can be added directly into nuts structure, i.e.
  % nuts.Lp=Lp; nuts.voxels=voxels; nuts.voxelsize=voxelsize;


nut_ftmriN2coreg.m

Probably you won't call this directly yourself, but the other nut_ft* functions will call it.

% nut_ftmriN2coreg(mripath,mristruct,fid,mmvoxflag)
%
% populates the global 'coreg' structure in Nutmeg with the MRI and
% fiducial information
%
% mripath:   EITHER existing file fullpath name, both .nii or .img supported
%            OR desired fullpath name Plus 'mristruct' 
%            OR [] empty, default T1 MNI brain set
%              If you start with CTF .mri file, see nutmeg wiki for steps to
%              correctly convert to Analyze
% mristruct: FT structure from ft_read_mri (enter [] if mripath file already exists)
%
% fid: generically can be .txt file with list of fiducials 
%      IF in mm, then set mmvoxflag=1
%      ELSEIF in voxels, then set mmvoxflag=2
%      OR can be *.hdm file from CTF (set mmvoxflag=1)
%      see nut_load_fiducials.m for more details

nut_beam2ft.m

% source = nut_beam2ft(beam)
% 
% beam     output from Nutmeg (beamforming_gui, tfbf, or tfZ)
%          only scalar (not vector) results supported at the moment
%
% see ft_datatype_source of current FieldTrip version to see if any modifications
Powered by MediaWiki
  • This page was last modified 11:37, 28 July 2011.
  • This page has been accessed 311 times.
  •