Hi Mike, Interesting. The FS surface file format is very straightforward, only saving vertex positions and face indices, so any difference between these v6 and 7 surfaces would come down to basic geometry representation. My intuition is that there are either some weird intersections or mis-ordered face indices resulting in bad normal computations. Not sure if this is easy in blender, but it might be worth visualizing the surface normals to see if they’re pointing in reasonable directions. I haven’t been able to replicate this issue on our end.
Best Andrew From: freesurfer-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Mike Schmidt <mikeschm...@schmidtgracen.com> Date: Tuesday, February 16, 2021 at 7:27 PM To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] FreeSurfer 7 vs FreeSurfer 6 surface differences External Email - Use Caution Good questions, Andrew. In FreeView, I loaded the .pial files directly. This should rule out the conversion step (mris_convert or my own script) altogether, I think. In the initial javascript viewers, I tried several debugging steps: - I converted each version of {lh,rh}.pial with the mris_convert from each version of FreeSurfer with no difference. The .pial file from FS6 looked OK; the .pial file from FS7 looked mottled regardless of mris_convert version. - In a more complicated pipeline, I tried loading the STL into blender and having it export a gltf file containing only the vertices, then generate and save normals alongside the vertices into a gltf file. Both versions rendered the same in three.js. FS6 was fine; FS7 was mottled. As I did this with a python script, I never actually saw the surfaces in blender. I can try that and see what they look like there. Perhaps I'll see some additional data that would be useful. The difference seems to be stored in the .pial files, though, so blender may assist in suggesting debugging, but is unlikely to solve the problem in my estimation. Thanks for your thoughts, Mike On Tue, Feb 16, 2021 at 2:06 PM Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Hi Mike, Are you loading the STL files or the original pial files in freeview here? If the former, have you narrowed down whether this is an issue with STL conversion or the actual surfaces? FS surface files only store vertex and face data, not normals. So, is it possible the normals are being incorrectly computed during the conversion? You could narrow down whether it’s a conversion issue by converting the same lh.pial file with both v6 and v7 mris_convert and comparing those STLs. Andrew From: freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu> <freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> on behalf of Wang, Ruopeng <rwa...@mgh.harvard.edu<mailto:rwa...@mgh.harvard.edu>> Date: Tuesday, February 16, 2021 at 1:32 PM To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: Re: [Freesurfer] FreeSurfer 7 vs FreeSurfer 6 surface differences FYI, translucent surfaces in freeview do not render properly due to the limitation of old VTK libs being used. I would not use it for error checking in this case. Ruopeng On Feb 16, 2021, at 11:55 AM, Mike Schmidt <mikeschm...@schmidtgracen.com<mailto:mikeschm...@schmidtgracen.com>> wrote: External Email - Use Caution Thank you for your response, Doug. I am including two screenshots from FreeView side-by-side. These are from the same two lh.pial files mentioned in the first email. <freeview_6-vs-7.png> They are very very similar and render correctly in FreeView. But when I set their transparency from 1.00 to 0.25, similar artifacts appear. <freeview_6-vs-7-25a.png> It's difficult to say which is "right" from this. There's nothing behind the pial surface to exploit the transparency. But there's a distinct difference between the two versions. Thanks again. Happy to assist in figuring this out in any way I can, Mike Schmidt On Mon, Feb 15, 2021 at 12:10 PM Douglas N. Greve <dgr...@mgh.harvard.edu<mailto:dgr...@mgh.harvard.edu>> wrote: Do these show up in freeview? You can turn on the mesh and vertices On 2/14/2021 8:48 PM, Mike Schmidt wrote: External Email - Use Caution Hello FreeSurfer Developers and Experts, I have written a script that reads the binary representations of the vertices and faces from FreeSurfer's surf/{l,r}h.pial files and saves them out unchanged to stl and obj file formats for 3D rendering. I have used it with FreeSurfer 6 and several MRI images, everything working fine. Processing the identical input, a single T1-weighted MPRAGE MRI, FreeSurfer 7 works great and finishes faster than FreeSurfer 6, but we see strange aliasing on the 3D objects. The aliasing is identical if I avoid all of my own code and use mris_convert (from either FreeSurfer version) to generate an stl file from the lh.pial and rh.pial files. I've spent a lot of time debugging, messing with different materials and textures, generating vertex normals at different stages, but I can't find anything that makes any difference except the FreeSurfer version. I have seen several items in the release notes (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/fswiki/ReleaseNotes<https://secure-web.cisco.com/13CisVO6T8EcCjcUaRuDEzQhXfeQOLsLOv_P5ZIRSrdjGacCLorCd2blyFVgAjSgRkhQEpQQX8mL7NuYQtzJfic5coZdPhhBX4W8D5avplZT7Z0aYKMtCUiXXQz026iRPb2S7qEJBiH5qOtkoZXLmAAvddPvzF1sXjBi1P31zemvLfrFegwpHo-XKIJ34Oxuf8LuZW1srLiaHuHcK4rxS-RR1retWjCsrV7PxftLc-SxKHJt_G3Fj_xpjz6p6A_zrphgLNq76t_kBR5zaEwGGzg/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FReleaseNotes>) that may be related, but I'm not sure how to go about investigating them. Left cortex images are included, with links if they don't show up in the email, of the same brain processed with FS6 and FS7. These are rendered in Firefox with the three.js library. FreeSurfer 6.0.0 works well with a smooth surface (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://dragonfruit.mfs.ms/rh_pial_oblique_from_fs6.png<https://secure-web.cisco.com/1XvK89a9-pam8vLvddRszbm7noUuI0VdVODMPd_Cm8xNp0P5rR47ivTH33eVFRM18F7lInNFhFKYaWtkQGluSZxAYT2Jcrw3ESz5X3Kx5UAC-9YtMdrzKhx90jsEP-1ru_STzZzBqjgbNsiBdN0OFgW5up3YLDaclEMxbiIhy6EHCAY_8H7g-h06Wc7wQL896W7gW4ZDpUxkDWH6ks3EW_Y2vQs9-hhfUkXblb7u7umpfsgFmJFfyHLw_38O1RpRjDQUfFD1q5DRSgUFvwSDszQ/https%3A%2F%2Fdragonfruit.mfs.ms%2Frh_pial_oblique_from_fs6.png>). This image is of the correctly rendered surf/lh.pial with 149,968 vertices and 299,932 faces. <rh_pial_oblique_from_fs6.png> FreeSurfer 7.1.1 results in the same size and shape cortex, but renders strangely with mottled shading of triangles. (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://dragonfruit.mfs.ms/rh_pial_oblique_from_fs7.png<https://secure-web.cisco.com/1GxOeNRNQGbKZlmD1nNK_15MWN_jcLmmy_Y43EXlY-D0-n7YLayhuQXzm02oVANOxwladA-4Q48Zyi1e7e1HwNjWKac2dG5bo7tlqaK8oqLP3jk3SE_RIdU8ohiNRt7IC76oX49QPDYW3tfr9bNcpxl2pNXq1NGL4zBErKygPllk1qGZXlAOqEvTNFIdHde-XjzD17RZ-IXwyDMqGpnYPmgPxAZuaNjQvAa7-Rq_Wf6FOUqywwnl82WD_pdz98xp5YVHKGS--m3T_cxqIRswvfw/https%3A%2F%2Fdragonfruit.mfs.ms%2Frh_pial_oblique_from_fs7.png>). This image is from the same T1 image as above, but processed with FS7.1.1, resulting in 147,292 vertices and 294,580 faces. <rh_pial_oblique_from_fs7.png> I have run this on several T1 files with similar results on each. FreeSurfer 6 surfaces always look smooth and refract light nicely. FreeSurfer 7 surfaces do not. I'm out of ideas, and the only difference I can find is FreeSurfer version, so thank you to anyone who can point me in the right direction to fix this issue. Mike Schmidt _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/151XcoRtTQC4OuyWsUg_M6YaqNPU7-BFePkTz9D38voAw2SojRuKp89ghg0dzi01RYRhFLrN-_3pB2qdbYbKVLOIuyP8NeraHvXZ-9sXtxFK2Im5NG3kq2YDEpP_g7vgJlTq3ZQz3Tih5usiHtKApz0p9-BD-4o0ukbnCvJc2TvUjqya33Hwn4wwgF1mF_LnFJHqZ1LESxIGJoSKXKWe9x9Vu3D1Ak7WDRc6ED8E9yGj3mACdRHGybBiK60Sv6zZaqCBZMeTEveLMGvvH49PyFA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer> _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/151XcoRtTQC4OuyWsUg_M6YaqNPU7-BFePkTz9D38voAw2SojRuKp89ghg0dzi01RYRhFLrN-_3pB2qdbYbKVLOIuyP8NeraHvXZ-9sXtxFK2Im5NG3kq2YDEpP_g7vgJlTq3ZQz3Tih5usiHtKApz0p9-BD-4o0ukbnCvJc2TvUjqya33Hwn4wwgF1mF_LnFJHqZ1LESxIGJoSKXKWe9x9Vu3D1Ak7WDRc6ED8E9yGj3mACdRHGybBiK60Sv6zZaqCBZMeTEveLMGvvH49PyFA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer> _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1SgV2glVuOyoBdsfxbWPmyTT48xKmRwmuYy9JvcfcpCVCI1eDxPv7zs20HCE1pSgRa32-GxhOugribbC4x-1DRaQ4HK4MYwfVKSp8ORpyNBvC6qnvTvYo6d5KAHMA2is3GnVbEPv6BQg56jD8J9kSjBqYaA9xjm2eNhXSNfbZp9TadwOK4pjNFHKQleraeg4R4NiZo5ziNr8rY1dU_xbyoTd3Nci65ZEymnA7Enfqy_gBoSXK0qdsEDZxxE3jJLnplDmm6KovQZHdGX_6u03PKw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer> _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1SgV2glVuOyoBdsfxbWPmyTT48xKmRwmuYy9JvcfcpCVCI1eDxPv7zs20HCE1pSgRa32-GxhOugribbC4x-1DRaQ4HK4MYwfVKSp8ORpyNBvC6qnvTvYo6d5KAHMA2is3GnVbEPv6BQg56jD8J9kSjBqYaA9xjm2eNhXSNfbZp9TadwOK4pjNFHKQleraeg4R4NiZo5ziNr8rY1dU_xbyoTd3Nci65ZEymnA7Enfqy_gBoSXK0qdsEDZxxE3jJLnplDmm6KovQZHdGX_6u03PKw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer