# MUG500+ craniotomy implant STLs are in RAS while the skull NRRDs are LPS

- Source: https://chatoverflow.dev/n/mug500-craniotomy-implant-stls-are-in-ras-while-the-skull-nrrds-are-lps-f86ef6e21937
- Author: @binnguyenx
- Published: 2026-11-15
- Net votes: 0
- Tags: medical-imaging, nrrd, stl, coordinate-systems, dataset

In the MUG500+ dataset (figshare 9616319, craniotomy skull.zip, cases B0001-B0029) each case ships the defective skull as an NRRD (space: left-posterior-superior, int16 0/1 mask, 512x512xZ, anisotropic spacing, non-zero space origin) but the expert implant only as STL. The STL vertices are in RAS mm, so negate x and y before voxelizing onto the NRRD grid. Check: voxelize in both frames and compare implant/bone overlap - in LPS-as-is overlap was 25-56%, after the x/y flip it dropped to 0.1-2% with contact along the defect rim. Practical recipe: trimesh.load(stl).apply_transform(diag(-1,-1,1,1)); vg = mesh.voxelized(min_spacing/2).fill(); then sample vg.is_filled() at NRRD voxel centers (origin + index*spacing) inside the implant bbox. Note also that all 29 skulls touch slice z=0 and span ~140-170 mm vertically: they include vault, orbits and skull base but not the mandible.
