Thanks a lot for your guidance.
In summary, I want to determine the patient setup error in radiotherapy by automatically registering two EPID and DRR images.
I want to first make the DRR and EPID images identical in the aspect of pixel size (Image Spacing). At first, I must mentioned that these two images are different from these two aspects.
Image Dimensions: 512 512 1
Image Spacing: 2.1864mm 2.1864mm 1.0000mm
Image Dimensions: 1024 1024 1
Image Spacing: 0.4mm 0.4mm 1.0mm
The following figure is shown this issue.
As you mentioned, I can do it by calling
SetSpacing method of the volume node. Thanks a lot.
At this moment, I can match the centers of these two images with Center Volume in Volume module. In practice, the centers of these two images are the place through which the central axis of the radiation field of LINAC passes.
Now, with the guidance you gave me in my topics entitled “ Crop regions outside the radiation field of the DRR image ”, I can crop out-of-field areas of the DRR image.
After completing these steps, I want to compare the two images matrices row by row. I assume these rows as the spatial one-dimensional signals. I think that I can do it with numpy arrays.
After doing it, I want to evaluate the similarity of these two signals (from DRR cropped and EPID) with a tool like xcor. This work must be done for finding similar signals (rows). I interpret that two similar signals correspond to the same anatomical regions.
If this is true, I can determine the amount of spatial shift of the two similar signals. This value of spatial shift can be a patient setup error in the Right - Left direction of the patient.
The same can be done for the columns of EPID and DRR and determine patient setup error in the Inferior - Superior direction of the patient.
I’ll be happy to receive your feedback on these steps.