Editing Subject Coordinate System Fiducials programatically after CAT segmentation

Hello Bst team,

I would like to change the NAS, LPA and RPA fiducials after I have already imported each subjects T1 and run CAT segmentation within Bst. And would like to do so automatically for all subjects using a script. Any hint on how to acomplish this programatically would be very welcome. Also, I undersant that editing these 3 landmarks after CAT already run should not affect the segmentation and MNI registration, right?

Kind regards,
Ruben

I don't recommend you try to doing this.
Updating the fiducials in the reference MRI requires rewriting all the surface files (update the Vertices field as it is stored in SCS, which depends on the NAS/LPA/RPA points) and all the volumes (the fiducials are duplicated in all the MRI and "volatlas" files).

Some code is available in figure_mri.m > UpdateSurfaceCS to update the coordinates of the surface vertices. But since this feature is very rarely used and not recommended, I would not trust it entirely. There are maybe silent bugs in there.

If you absolutely need different fiducials, I'd recommend you start over from importing the T1 MRI and run again the segmentation. Long computation times is always preferable to wrong results.

Thank you François for the quick and useful answer!

Best,
Ruben