Comments (7)
I don't think that's the fix we want. I'm actually not sure how dicomParser is even getting into findItemDelimitationItemAndSetElementLength. It shouldn't be using that on the SQ element, only on individual items. Do you know?
It's hard to tell from just the dump, but it looks like that item has an explicitly-defined length of 8 bytes, which wouldn't even cover the (0507,0000) element. If that's the case, per the standard there wouldn't even be an item delimitation item and dicomParser should be throwing an exception when it looks for a second item and doesn't find the item tag (see readSequenceItem). That would mean the file isn't standard-compliant.
from dicomparser.
This sounds like an invalid DICOM file, especially if anonymization tools remove the tag. Your fix may solve your problem, but it would make the library non standards compliant so is not an acceptable change for the library. My general philosophy is to keep the library standards compliant but provide hooks when possible for higher levels to implement workarounds for non standard data. Unfortunately I can't really suggest any hooks for a workaround without looking at the file itself
from dicomparser.
This is the (0507,1001) element it reads:
{
"tag": "x05071001",
"vr": "UN",
"length": 4294967295,
"dataOffset": 2384
}
Its VR is not SQ and it has undefined length, so that is why it is getting in findItemDelimitationItemAndSetElementLength.
from dicomparser.
Rereading the DICOM standard on undefined length handling and it looks like we have the logic wrong for non SQ elements. Use of undefined length appears to be restricted to specific VR's and is also parsed in the same way as a SQ element. I need to find some data sets that have this condition so I can verify a fix, if anyone has an anonymized one please send it my way :)
from dicomparser.
Just pushed version 1.7.3 which should fix this - can you please test and confirm? Your workaround fix is not correct
from dicomparser.
actually test 1.7.4, a bug slipped into 1.7.3 on accident :(
from dicomparser.
1.7.4 works fine for that case
from dicomparser.
Related Issues (20)
- Problem when DICOM Dump to JSON and DICOM Dump using explicitDataSetToJS HOT 4
- Read Dataset without FMI HOT 2
- Align typings on DataSet returns HOT 1
- How to solve dicomParser.explicitElementToString: cannot convert implicit element to string? HOT 6
- send image and data HOT 1
- Version 2.0 Discussion
- index.d.ts: ByteStream constructor declaration issue HOT 2
- Need help in latest version 1.8.20 is not showing latest changes from master HOT 4
- Improve semantic-release usage
- Remove confidential information from DICOM Image HOT 1
- Example pages not migrated from rawgit HOT 1
- For Sequences with Sequence Items of Undefined Length, the Sequence Item Delimiter tag is read as an element HOT 2
- Failed to extract private tag sequence $(3009,1201) - [DCF Private VS Segment Colume Sequence]
- Missing vr's HOT 2
- Browser Crash with Compressed DICOM Data HOT 4
- Run test suite in node
- bug : attributeTag returns undefined if attribut has more then one reference
- When the tag value contains (0000,0002),(0000,0100),(0000,0110),(0000,0700),(0000,0800),(0000,1000),(0000,1030),(0000 ,1031), the dicom file cannot be parsed normally HOT 2
- How dicom-parser.js works with vtk.js to achieve dicom file display HOT 4
- Missing documentation : the dataset object HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dicomparser.