applying the matrix of deformable registration to another file

Hi everyone
I have two DICOM CT images (CT1, CT2) (Matrix size: 512,512,111) that I want to register them with B spline deformable registration. I have also exported a RT dose file (RT2) (Matrix size:100,61,1) from the treatment planning system. I want to apply the transformation matrix of this registration to the RT dose file. But I don’t know how can I do it.
1- Can you help me how to do this?
2- Do I need to change the size of the RT dose file in general?

Tanks a lot

Hello @blue_sky,

If you don’t need to solve this via standalone code you implement, you should look into using 3D Slicer. Specifically, take a look at the registration documentation and SlicerRT extension.

Thanks for your explanation. But besides using the 3D slicer, I also need to use its Python code. But I have no idea how to do it. Can you guide me how to write its code?

thanka a lot

Hello @blue_sky,

The relevant forum for this type of request is the Slicer discourse, see this relevant discussion.

Generally, before asking for help, it is recommended to skim the documentation/FAQ. In this case, Slicer’s Python FAQ.

You could possibly write a scripted module for Slicer, in Python. You could look at some existing modules in Slicer. There are also many Slicer extensions which have scripted modules, e.g. SlicerITKUltrasound.