AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
September 02, 2015 07:16PM
Thank you Nick, it worked for me.

However I had to perform some small modifications, I think there was a small error with the counting in the node_indices variable.

Here I copy the code modification that worked for me (applied to the synthetic datasets), just in case someone encounters the same problem.

 
 
 % generate synthetic left and right hemisphere data
% (this is just example data for illustration)
ds_left=cosmo_synthetic_dataset('type','surface','seed',1);
ds_right=cosmo_synthetic_dataset('type','surface','seed',2);

% Set the number of vertices of the left surface.
% If the surface is sparse (it does not have data for all nodes), it *may*
% be necessary to adjust this value manually. In that case, consider to:
%
%  - compute the number of vertices, if it is a standardized surface from
%    MapIcosahedron. If the ld parameter was set to 64, then the number of
%    vertices is 10*64^2+2=40962.
%  - get the number of vertices using:
%       [v,f]=surfing_read('left_surface.asc');
%       nverts=max(size(v));
%
[unused, index]=cosmo_dim_find(ds_left, 'node_indices');
nverts_left=max(ds_left.a.fdim.values{index});


% update node indices to support indexing data from two hemispheres
node_indices=[ds_left.a.fdim.values{index}, ...
                nverts_left+ds_right.a.fdim.values{index}];

% merge both hemispheres samples            
ds_left_right=cosmo_stack({ds_left,ds_right},2);

% update fdim values
ds_left_right.a.fdim.values = {1:length(node_indices)};

% update node_indices
ds_left_right.fa.node_indices = node_indices;
Subject Author Posted

Merging left and right hemispheres .niml datasets

afniuser2014 September 02, 2015 09:59AM

Re: Merging left and right hemispheres .niml datasets

nick September 02, 2015 11:12AM

Re: Merging left and right hemispheres .niml datasets

afniuser2014 September 02, 2015 07:16PM

Re: Merging left and right hemispheres .niml datasets

nick September 04, 2015 06:00AM

Re: Merging left and right hemispheres .niml datasets

afniuser2014 September 04, 2015 11:49AM

Re: Merging left and right hemispheres .niml datasets

nick September 04, 2015 01:13PM