Skip to content
Snippets Groups Projects
Commit f1ffdfc3 authored by Loic Marx's avatar Loic Marx
Browse files

WIP: compute centroid of brain mask

parent ccfad843
No related branches found
No related tags found
2 merge requests!3Regular merge of develop,!2Seeg algorithm
% PCA
<<<<<<< HEAD
=======
CT_post = NiftiMod('Seeg_chinese_1_before_final.nii');
%CT_post = NiftiMod('Seeg_chinese_1_before_final.nii');
%CT_post = NiftiMod('seeg_seg_bul_inside_binary.nii');
CT_post = NiftiMod('seeg_electrode_additional_tryout_high_threshold_2.nii.gz');
Brain_mask = NiftiMod('brain_mask.nii.gz');
Brain_mask_img = Brain_mask.img;
bm = bwconncomp(Brain_mask_img,26);
bmProps = regionprops(bm, Brain_mask.img, 'Area', 'PixelIdxList', 'PixelList', 'PixelValues', 'BoundingBox', 'Centroid'); % TODO not really needed as that info is already in cc
[areas, idxs] = sort([bmProps.Area], 'descend'); % sort by size
bm_centroid = bmProps(idxs(:,1)).Centroid
>>>>>>> 181fd59b46f6619677749644bafbb102e57441d2
%% CONSTANTS
% for the contact region (from the paper)
% contact region areas have defined interval of voxels, because they are the smallest parts in the data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment