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

E2E dicom and metadata updates #142

Merged
merged 10 commits into from
Jul 28, 2024
Merged

E2E dicom and metadata updates #142

merged 10 commits into from
Jul 28, 2024

Conversation

sustrev
Copy link
Contributor

@sustrev sustrev commented Jul 1, 2024

Hi Mark!

I've been working a bit more on E2E to DICOM and have a few updates...

DICOM-specific

  • Added ProtocolName and SeriesDescription tags to hold enface modality and scan pattern
  • Moved Fundus PixelSpacing to first-level tag
  • Added red/green/blue to ImageType depending on enface type
  • Exposed scalex and slice_thickness as args that can be passed. (I'm still trying to figure these out, especially scalex, but... This at least allows the user to set these values correctly if known.)

Additional E2E updates

  • Adjusted laterality logic (Had a test file where the previous logic didn't work for the first slice of the second eye scan)
  • Adjusted "laterality" from Int8un to ascii, because it's really just stored as R or L in the E2E.
  • Fleshed out more metadata chunks, tried to comment in a way that points out some great potential spots for more investigation
    • Chunk 7: Eye Data (thanks to libE2E). The test files I had only have corneal curve(c_curve_mm) and 0s for the other fields, unfortunately
    • Chunk 9001: Device Name (in my test files, always ["Heidelberg Retina Angiograph", "HRA", ""])
    • Chunk 9005: Examined Structure (in my test files, always "Retina")
    • Chunk 9006: Scan Pattern (found values of "OCT Art Volume", "Images", "OCT B-Scan", "3D Volume", "OCT Star Scan")
    • Chunk 9007: Enface Modality (found ["Infra-Red", "IR"], ["Fluroescein Angiography", "FA"], ["ICG Angiography", "ICGA"])
    • Chunk 9008: OCT Modality (Found ["OCT", "OCT"])
    • Chunk 10025: Localizer (thanks to eyepy). I'm really hoping to figure out this chunk further...
    • Chunk 3: I've listed this as pre_data because it typically seems to start each series of chunks. It definitely has laterality, and there's an "ART" a little ways in, but I haven't been able to decode further.
    • Chunk 39: Time... The first thing that jumped out at me were timezones (Like "Eastern Standard Time"). I think there's likely more here. Timestamps would make the most sense, along with regional information.
    • Chunk 52, 54, 1000, 1001 (and maybe more, it seems like there's some variation that I haven't figured out) are UIDs
    • Chunk 1007 seems to be a padded string with a brand name, potentially the supplier of the device, but I'm not certain.

I'd still really like to find how to calculate scalex (wouldn't we all!), and am still slowly working on that, mostly running into a lot of places where there isn't useful information for that particular puzzle piece. Let me know if there are any changes you'd like made!

@marksgraham
Copy link
Owner

Hey @sustrev

Thanks so much for this! It might be a couple of weeks before I can get round to taking a look at this properly due to vacations.

Copy link
Owner

@marksgraham marksgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks for the PR - all looks great :)

scalex is proving very elusive.. I suspect it may be calculated from more than one variable which is making it so hard to locate!

@marksgraham marksgraham merged commit 936f06d into marksgraham:main Jul 28, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants