UNPKG

js-dicom

Version:

this is js-dicom

28 lines (23 loc) 1.41 kB
import metaData from './metaData'; function getImageFrame (dataSet) { const imagePixelModule = metaData.metaDataProvider('imagePixelModule',dataSet); return { samplesPerPixel: imagePixelModule.samplesPerPixel, photometricInterpretation: imagePixelModule.photometricInterpretation, planarConfiguration: imagePixelModule.planarConfiguration, rows: imagePixelModule.rows, columns: imagePixelModule.columns, bitsAllocated: imagePixelModule.bitsAllocated, 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;