help > Combining Lesion Masks from Left and Right Sides
Showing 1-2 of 2 posts
Oct 4, 2021 09:10 PM | Jues Dee
Combining Lesion Masks from Left and Right Sides
Hi all,
I am trying to run VLSM with lesion masks we have hand traced. We have converted the .nii files to .mat files and have created the correct excel file for running the VLSM in NiiStat. However when we run the script it doesn't add masks from R and L sides together but analyses them separately.
How can we before running the analysis, flip the masks to all be on one side?
Thank you!
J
I am trying to run VLSM with lesion masks we have hand traced. We have converted the .nii files to .mat files and have created the correct excel file for running the VLSM in NiiStat. However when we run the script it doesn't add masks from R and L sides together but analyses them separately.
How can we before running the analysis, flip the masks to all be on one side?
Thank you!
J
Dec 2, 2021 11:12 AM | lstarling
RE: Combining Lesion Masks from Left and Right Sides
Hi J,
I did this for my own hand traced lesions using a bash script and FSL tools. This runs through all the lesions e.g. on the right side and flips them to the left side. I hope this helps!
Lucy
for subj in [list of participant codes which need flipping, e.g. all right lesions]
do
fslswapdim ${subj} -x y z ${subj}_flipped
done
I did this for my own hand traced lesions using a bash script and FSL tools. This runs through all the lesions e.g. on the right side and flips them to the left side. I hope this helps!
Lucy
for subj in [list of participant codes which need flipping, e.g. all right lesions]
do
fslswapdim ${subj} -x y z ${subj}_flipped
done