dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
296 stars 112 forks source link

Inconsistent data from SR generate report and naturalizing the dataset #273

Closed sedghi closed 2 years ago

sedghi commented 2 years ago

With https://github.com/dcmjs-org/dcmjs/commit/70b24332783d63c9db2ed21d512d9f7b526c5222 we have switched to adding a proxy for objects in the naturalizing process which will make arrays of 1 items to stay as an array (but with backward compatibility of . notation to access keys through a Proxy)

SR generate report (MeasurementReport.generateReport) returns a naturalized data set which doesn't go through the process of assigning a Proxy, so we end up with objects, as opposed to array of objects (which would be the case if we just naturalizeDataSet itself)

I talked to @wayfarer3130 and he kindly accepted to investigate this.