Package Exports
- jpeg-lossless-decoder-js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jpeg-lossless-decoder-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JPEGLosslessDecoderJS
A common DICOM compression format is JPEG Lossless. This format is generally not supported in standard JPEG decoder libraries.
This decoder can read data from the following DICOM transfer syntaxes:
- 1.2.840.10008.1.2.4.57 JPEG Lossless, Nonhierarchical (Processes 14)
- 1.2.840.10008.1.2.4.70 JPEG Lossless, Nonhierarchical (Processes 14 [Selection 1])
###Usage API and more examples
var decoder = new jpeg.lossless.Decoder();
var output = decoder.decompress(buffer [, offset [, length]]);
// Parameters
// {ArrayBuffer} buffer
// {Number} offset offset into buffer (default = 0)
// {Number} length length of buffer (default = end of JPEG block)
// Returns
// {ArrayBuffer} output (size = cols * rows * bytesPerComponent * numComponents)###Install Get a packaged source file:
Or install via NPM:
npm install jpeg-lossless-decoder-jsOr install via Bower:
bower install jpeg-lossless-decoder-js###Testing
npm test###Building See the release folder for the latest builds or build it yourself using:
npm run buildThis will output lossless.js and lossless-min.js to build/.
###Acknowledgments This decoder was originally written by Helmut Dersch for Java. I added support for selection values 2 through 7, contributed bug fixes and ported to JavaScript.