External Email - Use Caution
%% 4b. Load the binary
Lesion masks RIGHT
right_lesion_filelist
= strcat(P, '/Oedema_masks_bin/', Imaging_Code, '_rh_fsaverage5_bin.mgh');
% load RIGHT lesion masks
into a matrix
right_lesions =
SurfStatReadData([right_lesion_filelist]);
right_lesions = ~right_lesions;
% create a left hemisphere matrix filled
with 1s
left_hemisphere = ones(17,10242)
% concatenate horizontally lesions masks (L) with right hemisphere matrix
fullbrain_with_right_lesions = horzcat(left_hemisphere, right_lesions)
% create medial wall mask for all subjects
r_whole_mask = repmat(mask, 17, 1)
% add the medial wall
mask on the lesion masks
fullbrain_lesion_medialwall
= fullbrain_with_right_lesions.*r_whole_mask
% apply matrix with
lesion & medial wall to the thickness values
T_right = fullbrain_lesion_medialwall .* T_rightlesion
%% Flip the Right sided images to the left
% reverse the element in each row
subject1 = T_right(1,:)
SurfStatView(subject1,
SP)
SP = SurfStatAvSurf({[P '/fsaverage5/surf/rh.pial'],[P '/fsaverage5/surf/lh.pial']})
subject1_flipped = fliplr(subject1)
SurfStatView(subject1_flipped, SP)
mirror_image = fliplr(T_right)
SurfStatView(mirror_image(1,:), SP)