UNPKG

@cornerstonejs/dicom-image-loader

Version:

Cornerstone Image Loader for DICOM WADO-URI and WADO-RS and Local file

16 lines (15 loc) 426 B
export default function getMinMax(storedPixelData) { let min = storedPixelData[0]; let max = storedPixelData[0]; let storedPixel; const numPixels = storedPixelData.length; for (let index = 0; index < numPixels; index++) { storedPixel = storedPixelData[index]; min = Math.min(min, storedPixel); max = Math.max(max, storedPixel); } return { min, max, }; }