Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad aligment of contours #3

Open
pgallego25 opened this issue May 23, 2022 · 2 comments
Open

Bad aligment of contours #3

pgallego25 opened this issue May 23, 2022 · 2 comments

Comments

@pgallego25
Copy link

pgallego25 commented May 23, 2022

Hi!

First of all, thank you so much for releasing this code, it's amazing! We have a little issue with the alignment of the created contours: it seems that there is a displacement of all contours (see attached image). Any ideas? Thanks in advance!

Captura

@jasbach
Copy link
Owner

jasbach commented May 23, 2022

Hi, thanks for checking out the tool.

Would it be possible for you to share a screenshot or possibly a json of the (anonymized) metadata for your DICOM CT image? I'm particularly interested in the image size and the "Image Position Patient" attribute.

The current structure of repackaging contours into a DICOM assumes that realspace coordinate 0,0 occurs at the center of each image (see line 92 of branch:New_Interface_React - backend/createdicomfile.py). I suspect that your images may have different coordinate alignment in metadata, which would cause this sort of offset.

I can make fixing that to be more flexible an objective for an update (will require modifying how some of the file data is passed around) but seeing the anonymized metadata for this image would help me be sure of the root cause of the issue.

@pgallego25
Copy link
Author

Hi jasbach,

thanks for the fast reply! We suspected of that, reading the github help, but opening the CT files with dicompyler seems that center for X and Y coordinates are in the center (even though the 0,0 pixel is in one corner of the image). I've attached an image of the metada for the first and last slice of my CT.

Thank for the help!

hN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants