For Windows, double click the photo (jpeg file), which gives you "Windows Photo Viewer." Step 1: Click the last choice, "Open," and choose "Paint." Step 2: Click "Shape," and choose any shape you like. Step 3: Then, click "Fill," and I picked "Watercolor." Now, you can mask any part of the photo at will. When you are done, just save the new file. Two giant ducks!
In a previous post I wrote about converting FreeSurfer aseg (sub-cortical segmentation) labels to volumetric masks . I demonstrated a graphical way of pulling out individual labels; however, it can be fairly tedious. There are around 50 different labels in the aseg file so sorting through them can take a while. There is a much faster – and scriptable – method for pulling out individual labels as ROIs. Let’s assume that you know the numbers of the labels you want, for this example I’ll pull out the left caudate, which is label 11 in aseg. The commands assume you have FSL installed (as well as FreeSurfer). We’ll use the program fslmaths, which is a very general image calculator. 1. First you will need an aseg file as a NIfTI. Navigate to your FreeSurfer subjects directory: cd $FREESURFER_HOME/subjects/ 2. Then navigate to the participant’s mri directory you want cd s001/mri 3 .Then run: mri_convert aseg.mgz aseg.nii.gz 4. However, that aseg file is in FreeSurfer space. If you want it in T1 native space (or some other space, diffusion for example) you could run something like this: mri_convert -rl $FREESURFER_HOME/subjects/s001/mri/rawavg.mgz -rt nearest $FREESURFER_HOME/subjects/s001/mri/aseg.mgz / /s001_aseg2raw.nii.gz -uthr 11 -thr 11 / /ROIS/l_caudate_freesurfer_rawavg.nii.gz This runs this command with an upper (-uthr) and lower (-thr) threshold of 11 to zero out everything except the 11th label (the left caudate). 6. Then you can run fslmaths to turn the mask file into 0s and 1s (from its 0s and 11s in the case of the left caudate – modify this command as appropriate). The -div 11 option tells the program to divide the mask file (which is currently all 11s and 0s) by 11, which will result in a mask with just 0s and 1s. Some imaging programs do not like ROIs (binary masks) with values other than 0s and 1s: fslmaths l_caudate_freesurfer_rawavg.nii.gz–div 11 l_caudate_freesurfer_rawavg.nii.gz You don’t have to write over the mask file if you do not want to; feel free to create a new file just in case something goes wrong. You can delete any temp files later. Here are screenshots of the whole process. Before pulling out the left caudate After pulling out just the left caudate This whole process takes only a couple minutes to run and, as I wrote earlier, it is scriptable so you could run a whole batch of brains in a matter of minutes. From:http://brainybehavior.com/neuroimaging/2010/06/saving-individual-labels-from-freesurfers-aseg/