Kleen-Lab / OPSCEA

From the Kleen Lab at UCSF (http://kleen.ucsf.edu). Software for heatmaps of seizure activity projected onto reconstructed brains (Omni-Planar and Surface Casting of Epileptiform Activity). PAPER: https://doi.org/10.1111/epi.16841, VIDEO EXAMPLES: https://www.youtube.com/playlist?list=PLGmfrsRwdva-WKwqLyWwcZxE0f_MA9vIL
Other
8 stars 7 forks source link

corrections in splitbrain.m #24

Open aarongeller opened 1 year ago

aarongeller commented 1 year ago

Hi-

I wanted to make you aware of a correction to the code in splitbrain.m that handles non-coronal views. I would recommend replacing lines 65-77 with:

elseif strcmp(orientation, 'a') || strcmp(orientation, 's')
    % both axial and sagittal views use a cut in the XZ plane
    if (min(cortex.cortex.vert(:,3)) < b) && (b < max(cortex.cortex.vert(:,3)))
        [idx, ~] = sort(find(abs((cortex.cortex.vert(:,3) - (m.*cortex.cortex.vert(:,1) + b - thegap))) <= thegap)); 
        % get indices of verts with z between (mx + b - 2*thegap) and (mx + b)
    else 
        disp('Intercept lies outside S-I extent of the mesh.');
        [idx, ~] = sort(find(abs((cortex.cortex.vert(:,3)-(m.*cortex.cortex.vert(:,1) + b + thegap))+2*thegap)<=thegap));
    end

Best,

Aaron