Comments (5)
Hi Nicolas,
I am aware of these files and have been reluctant to add support for them as they are non standard and would result in an inconsistent interface (sometimes the P10 header is present, sometimes it is not). My general stance on non standard files is that the logic to deal with them should be handled at the application layer and not the library itself. The library can expose functions to make it easier for the application to deal with but should not contain any logic for non standard files itself. The dicomParser library does allow a higher level application to parse these byte streams today - it just takes a few lines of code to do so.
from dicomparser.
Thanks that makes sense.
Would exposing the readDataSet
and mergeDataSets
method would be fine with you?
https://github.com/chafey/dicomParser/blob/master/src/parseDicom.js#L140-144
This way I could add the defaultTransferSyntax in the metaHeaderDataSet
before reading/merging the data.
Or would you rather expose something else in order to deal with it?
from dicomparser.
No that doesn't feel right - both of those are internal functions and don't look like good public APIs. Here is the code needed to parse little endian byte streams:
var dataSetByteStream = new dicomParser.ByteStream(dicomParser.littleEndianByteArrayParser, byteArray);
var dataSet = new dicomParser.DataSet(dataSetByteStream.byteArrayParser, dataSetByteStream.byteArray, {});
dicomParser.parseDicomDataSetImplicit(dataSet, dataSetByteStream, dataSetByteStream.byteArray.length);
I thought about putting this in a utility function but that doesn't feel right either. Perhaps I just need an example to show how to do this? Open to more ideas
from dicomparser.
YesI agree, it is probably best to have an example or even just an entry in the wiki to let people know how they can manually parse a dataset.
from dicomparser.
I haven't forgotten about this (well sort of, but github doesn't). If someone wants to submit a PR with an example that does this it would be great as people keep running into this issue. It isn't something I need so I haven't been motivated to do it myself yet
from dicomparser.
Related Issues (20)
- 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
- Write using DicomParser HOT 1
- Reading JPEG2000Loseless data HOT 1
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.