Comments (9)
According to the DICOM spec:
Decoders of encapsulated pixel data, whether Single Frame or Multi-Frame, need to accept both an empty Basic Offset Table (zero length) and a Basic Offset Table filled with 32 bit offset values.
and also:
If the object allows multi-frame images in the pixel data field, then each frame shall be encoded separately. Each fragment shall contain encoded data from a single-frame image.
from dicomparser.
Here is a POC fix: https://gist.github.com/cancan101/b888ed5d1163ec954966432c5aa505ae/revisions
from dicomparser.
Can you check 1.5.1 to see if this is now fixed? Thanks
from dicomparser.
After thinking about this further, I decided to deprecate the readEncapsulatedPixelData() because it does not work properly for multi-frame instances with empty basic offset table. I have added two new functions readEncapsulatedPixelDataFromFragments() and readEncapsulatedImageFrame() which should be used instead. The logic to deal with empty basic offset table instances is now the responsibility of the user of the library. I will be updating cornerstoneWADOImageLoader to use these new APIs and support your use case of empty basic offset table mutli-frame ultrasound. Feedback welcome!
from dicomparser.
Right now I am using:
const image = await cornerstone.loadAndCacheImage(
`${this.imageId}?frame=${this.frameIndex}`
);
this.stack[this.frameIndex] = image;
cornerstone.displayImage(this.node, this.stack[this.frameIndex]);
and I am using the cornerstoneWADOImageLoader
, so I guess it will just work for me?
from dicomparser.
Not until I update cornerstoneWADOImageLoader to use the new functions(). If you want to try it out, change decodeJPEGBaseline8bit.js line 38 to:
var encodedPixelData = dicomParser.readEncapsulatedPixelDataFromFragments(dataSet, dataSet.elements.x7fe00010, frame);
from dicomparser.
OK get latest dicomParser and cornerstoneWADOImageLoader and let me know how it goes
from dicomparser.
cancacn101 - did this resolve your issue?
from dicomparser.
Yes.
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.