deid icon indicating copy to clipboard operation
deid copied to clipboard

add support for translating ctp coordinates

Open vsoch opened this issue 2 years ago • 0 comments

We identified a bug in #230 where the ctp coordinates are supplied as:

(xmin, ymin, width, height)

but our parser is expecting:

(xmin, ymin, xmax, ymax)

So I think the translation is fairly simple - the first two coordinates (I think) are correct, and we just need to add the width and height to each to derive the xmax and ymax that we expect. We can do this right at parsing (config/utils.py) and then still provide the "same" structured coordinates later.

This means I've added a set of new coordinate types, ctpcoordinates and ctpkeepcoordinates that mirror the coordinates and keepcoordinates but expect this slightly different input format, and updated our default deid.dicom to use them (since I believe all entries in here minus the ones from stanford faculty are from CTP!)

Signed-off-by: vsoch [email protected]

Checklist

  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [x] My code follows the style guidelines of this project

Open questions

Is there a reasonable way to better test this?

vsoch avatar Oct 13 '22 23:10 vsoch