I apologize if this question has already been asked. I have a sample of pre-treatment and post-treatment CBCTs that have been superimposed. I have used Markups to put control points as landmarks to obtain the x, y, and z or i, j, and k relative difference from pre-treatment to post-treatment. Compiling the data from the jsons I have found that the coordinate systems are not even close to each other. For intraclass coefficient intra-rater reliability testing the variance and mean then my coordinates are so vastly different that the ICC is 0. I am a beginner with Python and 3D Slicer so I apologize if this is very easy. How do I center the volume and transform all my landmarks consistently across my sample pre-treatment and postreatment CBCTs?
this statement and this
seems contradictory
How did you superimpose them? usually this is done by registration by putting one scan in the reference frame of the other.
You can center the volumes, but unless they have very similar geometries, it is not likely to create a good superimposition.
Thank you for your reply. In ITK SNAP, the pre-treatment CBCTs were registered and then using a voxel based superimposition method of the anterior cranial base the post-treatment CBCTs were superimposed on the pre-treatment CBCTs. So within a patient the coordinate systems are the same. Between patients the coordinate systems are different. I then placed control points as landmarks. For example, the x,y,z coordinates for a landmark in one subject is 49.382, -83.044, 36.298 and the x,y,z coordinates for a landmark in another patient is 44.208, 39.046, -212.089. Scrolling through the data, left sided landmarks can be positive for some patients and negative for other patients. For ICC I need means and variances which currently return an ICC near zero with the coordinate systems being different. In ITK SNAP and 3D Slicer the CBCTs were in RAS. My strategy, unless I’m wrong, would be to center the volumes with assumption that the head size of the pre-treatment CBCTs across patients is similar so I will at least get the coordinate systems closer together. I have been avoiding choosing a landmark to manually set the origin 0,0,0 because I don’t know how I would place it in pre-treatment and post-treatment CBCTs of the same patient exactly.
I am still not clear what you are trying to do.
For your inter-rater you should be looking at the difference of the coordinates within a patient, and probably need to turn this difference vector into a magnitude (distance) as opposed to using the coordinates. If you get a difference of two measurements c(0, -1, 1) vs c(1, 0, -1), this are essentially the same magnitude of variation.
If you do this, then you don’t have to worry about whether the coordinate system across cases are consistent. It only matters if the subject’s coordinate system is the same.
Anyways, there is a center option in slicer (under volumes module), but i don’t think it will give you what you want. It will center it based on the data extent, not center of mass. So if the field of views are not exactly the same, centering is not going to align the centers of mass. Accurate alignment is usually done with registration. If you want to have all your cases to share a common coordinate system, then you can choose one a reference and register them all to that rigidly.
Thanks for your help. That makes sense about the center option and for the magnitude and distance for inter-rater.
I think my questions is similar to this post: A bit of confusion about the slicer coordinate system.
I checked my settings and confirmed that patient right is screen left. In the picture I uploaded you can see for the same landmark, patients 319 and 320 in have x,y,z coordinates different than every other patient. Why is this happening only for 319 and 320?
Without knowing more about your study design, I cannot give an accurate answer.
If this table is coordinates of one patient rated by 26 different individuals (each rater is a row), clearly the raters 319 and 320 are outliers for some reason.
If these are 26 subjects rated by the same individual, then you cannot average coordinates like this. It is not meaningful. There is no reason to expect every subject to have a common coordinate system. Perhaps subjects 319 and 320 are upside down with respect to others for some reason. Assuming you have other raters, you need to average the coordinate of every subject by itself, and then calculate the magnitude of difference of each rater to this average (unless of course you have a standard. if you have a standard, then there is no need to calculate the average).
If you want to use raw coordinates as the unit of your analysis, you should do proceed with a shape analysis (which will do a joint superimposition to bring everything into a common coordinate system). You can look into the literature for generalized procrustes analysis, it is rather rich. The module is available as part of the SlicerMorph module.