Comments (5)
Thanks for reporting this. That's definitely a use case we want to make sure works.
From what I can see the DICM
marker is missing (maybe the whole preamble is missing).
Line 201 in 914b3dc
But it should have been written out by DicomDict.write()
so something must be going on.
Lines 20 to 24 in 914b3dc
Could you look at, for example, this test and see what's different from your case? If needed could you make a PR for this use case in the form of a test that could be used to document this use case and confirm that it's (ultimately) fixed.
from dcmjs.
Thanks for the quick reply. I'll work on a test. Also, I noticed that when overriding the UID given the example provided, PixelData is lost. Is there a way for me to change the UID and retain PixelData?
from dcmjs.
PixelData should not be lost. Did you make a simple test case to illustrate what you are doing?
from dcmjs.
hi friends! I have a similar problem...
I'm trying to insert a dicom tag. A tag is inserted in the final dicom file.
but, an error occurs when opening the saved dicom file.
So I thought about my problem.
After checking that the Pixeldata is changed after saving, I looked for the problem.
let arrayBuffer = fs.readFileSync(filePath).buffer;
let DicomDict = dcmjs.data.DicomMessage.readFile(arrayBuffer);
console.log(DicomDict.dict['7FE00010']);
DicomDict.upsertTag('00080005', 'CS', 'ISO_IR 192');
console.log(DicomDict.dict['7FE00010']);
let new_file_WriterBuffer = DicomDict.write();
fs.writeFileSync(filePath, new Buffer.from(new_file_WriterBuffer));
If you print the log before and after modifying the dicom file, you can get the following result.
Since the file is a 512*512 image, byteLength 524288 should appear, but you can see that it is loaded as byteLength 519511.
Some another files are loaded so perfect
I think that when loading the dicom file, the PixelArray cannot be loaded correctly....
The "dcmjs.data.DicomMessage.readFile" function doesn't seem to load the file correctly.
Please... help me...
from dcmjs.
@EastLight0 Thanks for reporting. Please make a test that demonstrates the issue following the example of the other tests in the repo.
from dcmjs.
Related Issues (20)
- 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
- Test failing due to missing image referenced by seg HOT 1
- PN tags interpretation as union between object and string breaks DIMSE functionality HOT 2
- Can use to load dicom segment? HOT 1
- Fail to denaturalize a sequence having private tags. HOT 1
- Netlify-deployed docs site (https://dcmjs.netlify.com/) is down HOT 4
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.