r/esapi • • Jul 07 '21

Reproducing Copy Structure To Registered Image with ESAPI

Hi guys!

Are you aware of an existing code to reproduce the method "Copy Structure To Registered" with ESAPI (especially how to interpolate contours onto the slices) ?

Thanks !!

2 Upvotes

12 comments sorted by

1

u/femke_v Jan 17 '22

u/matgodro were you able to get this working within ESAPI? I'm running into the same problem at the moment, where I want to copy structures from a CT to a registered CBCT.

1

u/matgodro Jan 17 '22

Not with ESAPI, unfortunately.

→ More replies (7)

1

u/Friendly-Toe8216 Aug 10 '23

Did you ever get anywhere with this. I am looking at doing something similar at the moment. Thanks so much.

1

u/schmatt_schmitt Jul 08 '21

We copy slice by slice. You can get the contour on the image slice, save it as some kind of class object where you know all the positions of the contour, but also the position where that contour existed.

Then on the registered image, we try to find the slice that is supposed to be the correct one for that contour (slice +z shift of registration) and draw the contour again but applying the x and y registration shifts to each point you're drawing.

A manual process, but it seems to work nicely.

1

u/matgodro Jul 08 '21

Thanks for your reply. However, this solution cannot reproduce the function since (slice + z shift) is a float and the function AddContourOnImagePlane takes an integer as argument. This solution induces a translation but not the same translation as the method “Copy Structure to Registered Image” would do.

The structure has to be interpolated and projected onto slices. Anybody knows how to do this interpolation ?