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
I have done some searching online but I am not entirely sure how to convert the
fiducial coordinates (in mm) from
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.
This documentation should help get you started: https://www.slicer.org/wiki/Coordinate_systems
How do you plan to use the fcsv files?
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
ITK which is LPS orientation, meanwhile my fiducials are RAS.
Okay, good, makes sense. Then probably the documentation I referenced should be what you need.
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
Python, for example? Just flip the signs of the
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:
# Markups fiducial file version = 4.11
# CoordinateSystem = 1
# columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID
Probably we’ll replace magic numbers (0 and 1) by coordinate system names (RAS and LPS) in future versions of these csv files.