Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: Update jpeg decoder. #1657

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ module.exports = {
parserOptions: {
sourceType: 'module'
},
settings: {
jsdoc: {
// 1. jsdoc gives an error for index signatures as type:
// {[key: string]: {red: number[], green: number[], blue: number[]}}
// -> ERROR: Unable to parse a tag's type expression for source file ...
// Invalid type expression
// 2. in typescript mode, eslint/jsdoc 'check-types'
// gives a warning when using: Object<>
// -> Use object shorthand or index signatures instead of `Object`,
// e.g., `{[key: string]: string}`
// => adding Object to preferredTypes removes the warning
preferredTypes: {
Object: 'Object'
}
}
},
rules: {
// require triple equal
// https://eslint.org/docs/rules/eqeqeq
Expand Down
34 changes: 34 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## [v0.32.6](https://github.com/ivmartel/dwv/releases/tag/v0.32.6) - 17/04/2024

### Fixed

- Fix npm publish [#1656](https://github.com/ivmartel/dwv/issues/1656)

## [v0.32.5](https://github.com/ivmartel/dwv/releases/tag/v0.32.5) - 17/04/2024

### Fixed

- Image does not completely fill div [#1655](https://github.com/ivmartel/dwv/issues/1655)

## [v0.32.4](https://github.com/ivmartel/dwv/releases/tag/v0.32.4) - 18/03/2024

### Fixed

- event.preventDefault for wheel events [#1632](https://github.com/ivmartel/dwv/issues/1632)

## [v0.32.3](https://github.com/ivmartel/dwv/releases/tag/v0.32.3) - 22/09/2023

### Added

- Add support for writing DICOM with unknown VR [#1507](https://github.com/ivmartel/dwv/issues/1481)

## [v0.32.2](https://github.com/ivmartel/dwv/releases/tag/v0.32.2) - 04/09/2023

### Added

- Add app options type [#1481](https://github.com/ivmartel/dwv/issues/1481)
- Add data element type [#1474](https://github.com/ivmartel/dwv/issues/1474)
- Export luts as plural not singular [#1478](https://github.com/ivmartel/dwv/issues/1478)
- Add data view config type [#1475](https://github.com/ivmartel/dwv/issues/1475)
- Use File[] and not Filelist [#1476](https://github.com/ivmartel/dwv/issues/1476)

## [v0.32.1](https://github.com/ivmartel/dwv/releases/tag/v0.32.1) - 19/06/2023

### Added
Expand Down
185 changes: 0 additions & 185 deletions decoders/pdfjs/arithmetic_decoder.js

This file was deleted.

9 changes: 2 additions & 7 deletions decoders/pdfjs/decode-jpeg2000.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
// Do not warn if these variables were not defined before.
/* global importScripts, JpxImage */

importScripts('jpx.js', 'util.js', 'arithmetic_decoder.js');
import { JpxImage } from "./jpx.js";

self.addEventListener('message', function (event) {

// decode DICOM buffer
var decoder = new JpxImage();
decoder.parse(event.data.buffer);
let res = JpxImage.decode(event.data.buffer, /* ignoreColorSpace = */ false);
// post decoded data
var res = decoder.tiles[0].items;
self.postMessage([res]);

}, false);
Loading