How to load FreeSurfer surface files in correct position using Python script

Offset of 0.5 is appropriate if the value is in voxel coordinate system.

From this data set you won’t learn much. Could you create a data set with FreeSurfer that has much larger voxels than 1mm so that we can see subpixel size misalignments more clearly and make sure we don’t mistake offsets in voxel/physical coordinate systems?

To make FreeSurfer model loader take into account the reference volume node, specify referenceVolumeID in additional property:

modelNode = slicer.util.loadNodeFromFile('lh.pial', 'FreeSurferModelFile', {'referenceVolumeID': volumeNode.GetID()})

Alternatively, whenever you want to transform a model to RAS coordinate system you can call slicer.modules.freesurferimporter.logic().TransformFreeSurferModelToWorld().

2 Likes