dcmjs
dcmjs copied to clipboard
Change in PixelSequence value
We tried anonymizing a few tags for different DICOM file types (Little Endian Explicit, JPEGLoseless) using the below approach and it seems to be working fine. However, when we compared the modified DICOM file with the original one, it seems that the PixelSequence value gets changed even if we don't make any changes to the pixel data.
Before:
(7fe0, 0010) OB (PixelSequence #= 185)
After:
(7fe0, 0010) OB (PixelSequence #= 735)
Code:
const dicomDict = dcmjs.data.DicomMessage.readFile(buffer);
dicomDict.dict['00204000'].Value = 'DE-IDENTIFIED';
const deIdentifiedBuffer = dicomDict.write();
My question is, does the dicomDict.write() function affect pixel data even if we perform de-identification on some other tags ?
As noted in #375 there hasn't been much testing or development with compressed images so if the results are incorrect someone would need to debug. It shouldn't be much work to single step through the tag writing code to see what's happening.