Code Monkey home page Code Monkey logo

Comments (3)

suyashkumar avatar suyashkumar commented on August 20, 2024 1

Fantastic, thank you for raising this and posting some sample files! Will see if I can investigate a little this weekend or later next week, and let me know if you have a chance to investigate in the meantime. It might be nice to also try the rewritten parser on this set of files as well. I think we should also consider adding in more robust debug instrumentation throughout the parser, both the current one and the rewritten one (will open a feature request for that)

from dicom.

suyashkumar avatar suyashkumar commented on August 20, 2024 1

I have done some quick investigation, and I think I see what the issue is.

It looks like the PixelData tag (7FE0,0010) can appear multiple times in a Dataset, in particular when it is part of an Icon Image Sequence.

In this case, when we parse that native pixel data, we must make use of tags that have appeared earlier (like Rows, BitsAllocated, etc). However, if we encounter the PixelData tag within an Icon Image Sequence, we need to fetch these tags from within the current sequence instead of from the global dataset. If we fetch them from the global dataset, we end up grabbing the values for the actual PixelData and not the icon!

Will look into a mitigation for this shortly. Will also keep this in mind for the rewrite. This only seems to be an issue for the native pixel data, which AFAIK is the main thing that requires looking back at the dataset to parse (encapsulated pixel data does not require "looking back").

from dicom.

suyashkumar avatar suyashkumar commented on August 20, 2024 1

You can see the WIP draft PR #79 that should quick fix this, and appears to work for the provided DICOMs (thanks again for those). There is one odd thing that I'd like to check out before merging, and maybe refactor to avoid some temporary copies either now or in a follow up PR.

from dicom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.