Skip to content

Commit

Permalink
added test script that I still had lying around for #342
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoostenveld committed Apr 21, 2017
1 parent d19dcee commit 0445519
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/test_pull342.m
@@ -0,0 +1,27 @@
function test_pull342

% WALLTIME 00:10:00
% MEM 2gb

%% Setup

cd(dccnpath('/home/common/matlab/fieldtrip/data/test/pull342'));

mri = ft_read_mri('IR29_Bext.nii.gz');
% elec = read_bioimage_mgrid('IR29_grid.mgrid');
elec = ft_read_sens('IR29_grid.mgrid');

%% Visualize

% plot it at the middle of the volume
location = ft_warp_apply(mri.transform, mri.dim/2);

figure
ft_plot_ortho(mri.anatomy, 'transform', mri.transform, 'location', location, 'style', 'intersect');
ft_plot_axes(mri);
ft_plot_sens(elec);

% The file reading works, but the figure is not what I would expect. The electrodes
% appear displaced in the positive x-direction, the MRI is displaced in the negative
% x-direction. Neither is correct with respect to the origin at [0,0,0].

0 comments on commit 0445519

Please sign in to comment.