I am working with some chest CT scans and I have some fiducials which denote the 3D centre of a tumour mass. I have saved/exported the fiducials from Slicer as .fcsv files.
I have done some searching online but I am not entirely sure how to convert the fiducial coordinates (in mm) from RAS to LPS using Slicer (assuming its possibile). Hoping someone can point me in the right direction.
Also, if anyone here has any general resources they could point me towards to better understand RAS to LPS (and vice versa) geometric transformations, that would be greatly appreciated. Always looking to better understand these concepts.
Thanks for sharing @pieper. The motivating example is that I have been given fiducials (as .fcsv files) from a radiological colleague where they have denoted the centre of the tumour masses across many CT scans. I was then trying to use plastimatch crop to extract an image subregion surrounding the tumour centroid. It is my understanding that plastimatch uses ITK which is LPS orientation, meanwhile my fiducials are RAS.
LPS<->RAS conversion is just inverting the sign of the first two coordinates. You can use either LPS or RAS when you store the coordinate values in csv (fcsv) file.
Thanks to both of you. I thought this to be true, but I am glad you confirmed this.
If I already have a long list of RAS fiducials in .fcsv, it is probably just easiest to do the conversion “by-hand” with R or Python, for example? Just flip the signs of the x and y value in the fidicuals file.
If you specify LPS coordinate system in the fcsv file header then the LPS->RAS conversion is done automatically when you load the file (but of course it is very simple to do the conversion in any software).
By default, fcsv header uses # CoordinateSystem = 0, which means RAS. If you change this to # CoordinateSystem = 1 then coordinate values are interpreted as LPS.
This header indicates that coordinates are defined in LPS: