dwv icon indicating copy to clipboard operation
dwv copied to clipboard

Creating new dicom elements using DicomWriter

Open srandoll opened this issue 7 years ago • 1 comments

I'm using the DicomWriter functionality to replace or remove dicom elements from an dicom object, which is working very good.

But now I like to add a new dicom element with a specific value. How can I do that? Using the 'replace' functionality does not work. As far as I can see, the algorithm just iterates over the existing dicom elements and therefore is not able to create new tags. I also tried to create a new dicomElement and pass it to the getBuffer method, but it always fails with an error message like "RangeError: Offset is outside the bounds of the DataView". Maybe due to the wrong offsets.

So is there a way to add new dicom elements during the getBuffer() operation?

srandoll avatar Nov 16 '18 07:11 srandoll

Hi, sorry for the late reply. No, there is no way to add new elements but it seems doable. Any help appreciated!

ivmartel avatar Mar 05 '19 23:03 ivmartel