Transfering transformed RAS cordinates to fscv/excel

Hi All, sorry I am posting again.

I use 3 D slicer for tracking bones during joint motion. I am using 4.9 nightly. My main question is I am trying to extract world coordinates for transformed volumes off the screen. I tried this following python script, but failed. When I harden the transform I can copy them to clip board but readings are different. ( transformed coordinates appearing before hardening-they are changed from non transformed coordinates- after hardening) Also hardening changes the parent volume looks like, and I cannot get my original non transformed coordinates when I play back. ( even if I transform again). My steps are I load the 4d ct as volume sequence, create a fiducial node and register sequence and get the readings. Also, which registration gives better accuracy- rigid or non rigid please.

# If volume node is transformed, apply that transform to get volume's RAS coordinates
transformVolumeRasToRas = vtk.vtkGeneralTransform()
slicer.vtkMRMLTransformNode.GetTransformBetweenNodes(volumeNode.GetParentTransformNode(), None, transformVolumeRasToRas)
point_Ras = transformVolumeRasToRas.TransformPoint(point_VolumeRas[0:3])

Thank you

Could you send us the scene (through dropbox, onedrive, etc.) or can you take a screen capture video?

Also, could you send a screenshot of the transformation using “Grid” mode to see if the transformation looks correct (invertible) - in Transforms module / Display section, check “Visible in slice view” and click “Grid”.

If you harden transform on a markup then volume display should not change.

If there is no deformation (only translation and rotation) between registered images then rigid transform is appropriate. If you register soft tissue then non-rigid transformation is expected to provide more accurate results.

Thank you very much Prof lasso, @lassoan. screen shots attached. It still changes the values even if F and output volumes both transformed or F alone is transformed. Both change my frame 0- RAS readings and I cant get it back my original positions when I play pack, ( Both screen shots attacheScreenshot%20(191) ![Screenshot%20(192)|690x388](upload://5eOIam30wcEykUxEAv8QYFL3Bti.jpScreenshot%20(193) Screenshot%20(194) eg) d).

I will do a small video, as I am not sure how to send the scene, Thanks. Also my whole sequence is 80-100 frames. when I reference everything ti first frame by sequence registration- say 4oth frame , which is about 25 degrees angulated from the fistrt , could this introduce an error, please.

Also ,what could be this error message
Loading with imageIOName: GDCM
Irregular volume geometry detected (maximum error of 0.00518799 mm is above tolerance threshold of 0.001 mm). Regularization transform is not added, as the option is disabled.

It means that the volume slices are not exactly equally spaced. Maximum error of 0.005 is small enough so that you can safely ignore this warning.

You can save the entire scene by clicking File / Save, click the “Giftbox” icon image and click Save. You have many time points, so the saving may take a while and file may be large, but just wait for it to end and then upload the resulting .mrb file to dropbox/onedribe/google drive and post the link here.

1 Like

Thank you ever so much. Will do it Prof Lasso @lassoan. One more question if that alright. Having 100 frames being referenced to frame no. 01- with angle of first and last being at least 25 deg rotated, will this affect accuracy, please. Thanks

Hi , Prof Lasso @lassoan, I did manage to save the scene and .mrb. But the whole thing is about 8Gig and is not uploading(I am trying for hours). I saved the sequence as nrrd to anonymise patient details and did the other steps. Infact I deleted 70 frames so its less data. But still probably the mrb contains the original sequence and I cannot upload it. Do you have any other suggestions please. ( may be to cut down on frames- I deleted it in the sequences module). Thank you ever so much. Sorry I am taking your time

If dropbox cannot deal with so large files then use dedicated large file sharing services. There are many of them out there, you should be able to find ones that you can use for free.

1 Like

Thank you very much. I am trying some way out. Would it make a difference if I create my fiducial node and put markers on surface before sequence registration. Or should It be done on the output volumes reference frame, please. Thanks