Hi,
I have two unrelated questions:
1) I have three mask files: mask1.nii.gz, mask2.nii.gz, mask3.nii.gz. The masks might be overlapping. I want to make a new mask file in which vertices that are 1 in mask1 or mask2 or mask3 get the value of 1, and vertices that are 0 in all three masks get the value of 0. How can I do that?
2) I have a text file containing a list of vertices in a column format. How can I convert it to a label file?
Thanks, Reza
1. mri_or mask1.nii.gz, mask2.nii.gz, mask3.nii.gz mask.total.mgz
2. Put it in a text file and add 4 more columns of zeros so that each row has the vertex index followed by 4 zeroes (with spaces between them)
cheers Bruce
On Tue, 15 Apr 2014, Reza Rajimehr wrote:
Hi,
I have two unrelated questions:
- I have three mask files: mask1.nii.gz, mask2.nii.gz, mask3.nii.gz. The
masks might be overlapping. I want to make a new mask file in which vertices that are 1 in mask1 or mask2 or mask3 get the value of 1, and vertices that are 0 in all three masks get the value of 0. How can I do that?
- I have a text file containing a list of vertices in a column format.
How can I convert it to a label file?
Thanks, Reza _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
On 04/15/2014 02:26 AM, Reza Rajimehr wrote:
Hi,
I have two unrelated questions:
- I have three mask files: mask1.nii.gz, mask2.nii.gz, mask3.nii.gz. The
masks might be overlapping. I want to make a new mask file in which vertices that are 1 in mask1 or mask2 or mask3 get the value of 1, and vertices that are 0 in all three masks get the value of 0. How can I do that?
Try something like fscalc mask1.nii.gz or mask2.nii.gz or mask3.nii.gz -o newmask.nii.gz
- I have a text file containing a list of vertices in a column format.
How can I convert it to a label file?
Look in one of the label files for guidance. The first two lines look like #!ascii label , from subject vox2ras=TkReg 138440 You can copy the first line. The 2nd line is the number of points in the label. The remainder are the list of 0-based vertices, like
0 -13.187 -94.944 10.964 0.0000000000 1 -13.603 -94.969 10.844 0.0000000000 2 -14.359 -94.940 10.636 0.0000000000 3 -14.817 -94.894 10.617 0.0000000000 4 -13.233 -94.957 10.522 0.0000000000
For a surface-based label, you can just fill in the first column and set the other 4 numbers to 0 doug
Thanks, Reza _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu