perf(segmentation): make segmentation read 3x faster (#3577)

This commit is contained in:
Alireza authored and GitHub committed 2023-08-08 14:39:31 -04:00
1 parent ec76ea24dd
commit 156c1ba60b
17 files changed
+187 -315

No files matched your search

@@ -0,0 +1,16 @@
import dcmjs from 'dcmjs';
/**
* Converts a CIELAB color to an RGB color using the dcmjs library.
* @param cielab - The CIELAB color to convert.
* @returns The RGB color as an array of three integers between 0 and 255.
*/
function dicomlabToRGB(cielab: number[]): number[] {
const rgb = dcmjs.data.Colors.dicomlab2RGB(cielab).map(x =>
Math.round(x * 255)
);
return rgb;
}
export { dicomlabToRGB };