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