Load a brain scan to reconstruct its cortical surfaces.
Load a brain scan to reconstruct its cortical surfaces.
TopoFit estimates left and right white, mid, pial, and spherical-registration surfaces from one brain MRI. This browser implementation runs the pinned BrainNet model locally from verified ONNX artifacts.
Optional surface analysis exports area-weighted mid-surface normals and finds connected cortical patches. Patch selection follows OpenRecon's atlas exclusion, geodesic radius, plane-fit error, area and normal-coherence criteria. The input must be a T1-weighted scan.
Patches that pass every criterion are ranked by flatness: plane-fit RMS plus radius × (1 − normal coherence), lowest first. Area is only an acceptance threshold. Each hemisphere keeps the best-ranked patches that share no vertices with a higher-ranked patch, so Left flat patch 1 is the flattest left patch.
In Output, View selects one surface without changing your layout. Slices show surface boundaries; Render shows the surface in 3D. Checkboxes combine surfaces for comparison or STL export.
Patch QC shows white and pial boundaries, the mid-surface and a normal glyph. Its line is the true in-plane component at physical scale. A center dot points toward increasing source slice positions; a cross points toward decreasing positions. Select a patch row to center the viewer on that patch and inspect its mid-surface point and outward fitted-plane normal in scanner RAS. Copy preserves full precision; the patch coordinates CSV exports all detected patches.
FreeSurfer surfaces are not a 3D-printing format. niimath simplifies and smooths each surface, then TopoFit writes a binary STL in millimetres.
Exporting: . Tick surfaces in Output to export only those.
Your scan and reconstructed surfaces stay in this browser. Pretrained models are downloaded from Hugging Face; the optional example is downloaded from OpenNeuro.