Hi Niels, The code works at .33 mm and ends up with a soft segmentation for each voxel, i.e., each voxel has a vector of probabilities corresponding to the different structures. So, they DO overlap. However, we don’t write those probabilities by default. Instead, we take the most likely label at each location (the one with the maximal probability), to create the discrete segmentation you’ve seen. Then, I do a simple nearest neighbor resampling to 1mm space, which I admit is a bit ugly (but fast).
My recommendation would be the following: 1. For each label of the discrete segmentation, including the background (treat is as any other subfield): 1a. First extract it from the segmentation, to create a binary mask (e.g., CA1 vs everything else). 1b. Resample this mask to your new space with linear interpolation. This will create a deformed mask that is not binary anymore, but will have values between 0 and 1 (or 0 and 255, depending on how you binarize in step 1a). 2. Go over all voxels in the target space. For each voxel, look at the values of the deformed masks. Assign the label of the mask with the highest value. This procedure will create a smooth segmentation. If you’re feeling really inspired, you’ve got another (prettier) option. Run the code with WRITE_POSTERIORS (see the wiki). Then, you can do the same thing, but skipping step 1a, and using the posteriors in step 1b directly instead. Note that the code does not write the posterior for the background, but you can easily calculate this as one minus the sum of all other posteriors (at each voxel). I hope this helps! Cheers, /Eugenio -- Juan Eugenio Iglesias ERC Senior Research Fellow Translational Imaging Group University College London http://www.jeiglesias.com http://cmictig.cs.ucl.ac.uk/ From: <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of "NIELS JANSSEN ." <njans...@ull.edu.es> Reply-To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> Date: Thursday, 26 October 2017 at 16:08 To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu> Subject: [Freesurfer] hippocampal subfields downsampling question In the mri output folder, I noticed that both the 0.33 mm and 1 mm (voxelspace) maps have subfields that do not overlap in space, meaning that each subfield occupies a unique location in space that does not overlap with other subfields (i.e., 12 subfields and 12 unique voxel intensities). I am wondering how this is achieved for both resolutions simultaneously. Do you 'fit' the subfields first to the 0.33 mm data and then transform the data to the 1mm space, or do you fit to both spaces separately? I would like to transform the subfields to 1.5 mm data and are able to do so accurately, but I run into problems with subfield overlap because of the down sampling. I am wondering how to best deal with this issue, and from seeing non-overlapping subfields at both 0.33 and 1 mm I am thinking there must be someway to deal with this issue. -- Niels Janssen Brain Imaging Laboratory Institute of Biomedical Technologies Center for Biomedical Research of the Canary Islands University of La Laguna Tenerife, Spain https://sites.google.com/view/nielsjanssen/
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.