cornerstonejs / dicomParser

JavaScript parser for DICOM Part 10 data
MIT License
720 stars 230 forks source link

if the max/min tag doesn't exist , what is the best practice to set a default value then? #72

Closed OrNot closed 7 years ago

OrNot commented 7 years ago

Now dicmParser returns undefined, which leads to the result of no image showed in cornerstone.

swederik commented 7 years ago

The WADO Image Loader, not dicomParser, is responsible for calculating the min and max values.

We added a 'strict' option, which would log errors if these tags were not present, rather than simply correct these values. There was a bug, however, and so recently the WADO Image Loader wasn't properly displaying images. This should be fine now.

The logic is here: https://github.com/chafey/cornerstoneWADOImageLoader/blob/f25df0a2fafa6f132cd04be15230b97857cd2419/src/webWorker/decodeTask/decodeTask.js#L48

OrNot commented 7 years ago

Thanks a lot.