UNPKG

@cleerlycode/cornerstone-wado-image-loader

Version:
28 lines (24 loc) 1.41 kB
import { external } from '../externalModules.js'; function getImageFrame (imageId) { const imagePixelModule = external.cornerstone.metaData.get('imagePixelModule', imageId); return { samplesPerPixel: imagePixelModule.samplesPerPixel, photometricInterpretation: imagePixelModule.photometricInterpretation, planarConfiguration: imagePixelModule.planarConfiguration, rows: imagePixelModule.rows, columns: imagePixelModule.columns, bitsAllocated: imagePixelModule.bitsAllocated, bitsStored: imagePixelModule.bitsStored, pixelRepresentation: imagePixelModule.pixelRepresentation, // 0 = unsigned, smallestPixelValue: imagePixelModule.smallestPixelValue, largestPixelValue: imagePixelModule.largestPixelValue, redPaletteColorLookupTableDescriptor: imagePixelModule.redPaletteColorLookupTableDescriptor, greenPaletteColorLookupTableDescriptor: imagePixelModule.greenPaletteColorLookupTableDescriptor, bluePaletteColorLookupTableDescriptor: imagePixelModule.bluePaletteColorLookupTableDescriptor, redPaletteColorLookupTableData: imagePixelModule.redPaletteColorLookupTableData, greenPaletteColorLookupTableData: imagePixelModule.greenPaletteColorLookupTableData, bluePaletteColorLookupTableData: imagePixelModule.bluePaletteColorLookupTableData, pixelData: undefined // populated later after decoding }; } export default getImageFrame;