Comments (5)
It's indeed working replacing data
with data.buffer
I will look into your issue.
from dcmjs.
The code should work fine in node or browser. Try with one of the test datasets and if you still have issues post the full stack trace.
from dcmjs.
The dicom file used is the one provided in your examples/data
folder.
Stacktrace is here
/home/vincent/dev/temp/dcmjs-try/node_modules/dcmjs/build/dcmjs.js:829
this.view = new DataView(this.buffer);
^
TypeError: First argument to DataView constructor must be an ArrayBuffer
at new DataView (<anonymous>)
at new BufferStream (/home/vincent/dev/temp/dcmjs-try/node_modules/dcmjs/build/dcmjs.js:829:18)
at ReadBufferStream._createSuperInternal (/home/vincent/dev/temp/dcmjs-try/node_modules/dcmjs/build/dcmjs.js:632:25)
at new ReadBufferStream (/home/vincent/dev/temp/dcmjs-try/node_modules/dcmjs/build/dcmjs.js:1183:21)
at Function.readFile (/home/vincent/dev/temp/dcmjs-try/node_modules/dcmjs/build/dcmjs.js:3579:21)
at /home/vincent/dev/temp/dcmjs-try/main.js:4:43
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:71:3)
I have made a repro here : https://github.com/vjau/dcmjs-try
Node v14.20.0
Ubuntu 20.04
from dcmjs.
Thanks for making the sample. Did you try changing this line to data.buffer
?
https://github.com/vjau/dcmjs-try/blob/1283caae8a16a37bfe5a4cc513297eaa0c3f7e33/main.js#L4
from dcmjs.
I tested with data.buffer
and it appears to work. Can you confirm. I did run into [this issue](https://github.com/dcmjs-org/dcmjs/issues/319}. If you are working on nodejs could you provide a PR to fix that?
from dcmjs.
Related Issues (20)
- [mutiple Qs]: convert .jpg to .dcm, no dicom header, could't not find declaration module ''dcmjs",... HOT 5
- DicomMessage.readFile failes if GroupLength parameter is wrong calculated HOT 4
- use SegmentNumber from the segment metadata exporting DICOM SEG. HOT 6
- US cine loops with Transfer Syntax RLE Lossless are corrupted after DicomMessage.write when fragmentMultiframe option is enabled HOT 5
- anonymizer uses incorrect tag names HOT 1
- The saved image file is inconsistent with the source file. HOT 9
- private Tags take element wrong into account HOT 1
- Segmentation loading with wadors not working HOT 1
- dcmjs-imaging HOT 2
- Invalid tag in sequence : Unable to parse MR Dicom file in dcmjs. Cornerstone able to parse and works fine HOT 1
- Order of tags gets messed up when edition DICOM SEG HOT 5
- Length of Decimal String larger than 16 characters
- Lots of 'Invalid vr type... ' log messages in dcmjs release 0.29.11 HOT 4
- modifying dicom meta-data HOT 2
- Reading dicom file HOT 2
- Getting ERROR: Value exceeds max length for some DICOM tags HOT 2
- Write issue for JPEG2000Loseless images HOT 3
- Issue with pixel redaction for JPEGLoseless type HOT 1
- Change in PixelSequence value HOT 1
- Support for reading from a readable stream 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 dcmjs.