Skip to content

Commit

Permalink
fix(jpeg): Export JpegImage from JPEG codecs (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi authored Nov 5, 2024
1 parent bc2cfc3 commit fbaa769
Show file tree
Hide file tree
Showing 16 changed files with 1,932 additions and 2,459 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dependencies
node_modules

.nx
.vscode/settings.json
# builds
build
Expand Down
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"packages/nifti-volume-loader",
"packages/dicomImageLoader"
],
"npmClient": "yarn",
"useWorkspaces": true
"npmClient": "yarn"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"clean:deep": "npx lerna run clean:deep --stream",
"example": "node ./utils/ExampleRunner/example-runner-cli.js",
"all-examples": "node ./utils/ExampleRunner/build-all-examples-cli.js --fromRoot",
"build-all-examples": "node ./utils/ExampleRunner/build-all-examples-cli.js --build --fromRoot",
"build-all-examples": "cross-env NODE_OPTIONS=--max_old_space_size=32896 node ./utils/ExampleRunner/build-all-examples-cli.js --build --fromRoot || (echo 'Build failed - likely due to memory constraints' && exit 1)",
"serve-static-examples": "npx serve .static-examples",
"build-and-serve-static-examples": "cross-env NODE_OPTIONS=--max_old_space_size=8096 yarn run build-all-examples && yarn run serve-static-examples",
"build-for-playwright": "cross-env NODE_OPTIONS=--max_old_space_size=8096 node ./utils/ExampleRunner/build-playwright-examples-cli.js --build --fromRoot && npx serve .static-examples-playwright",
"build-and-serve-static-examples": "cross-env NODE_OPTIONS=--max_old_space_size=32896 yarn run build-all-examples && yarn run serve-static-examples",
"build-for-playwright": "cross-env NODE_OPTIONS=--max_old_space_size=32896 node ./utils/ExampleRunner/build-playwright-examples-cli.js --build --fromRoot && npx serve .static-examples-playwright",
"build:all": "npx lerna run build:all",
"dev": "yarn run all-examples",
"docs": "npx lerna run docs",
Expand Down Expand Up @@ -91,7 +91,7 @@
"autoprefixer": "^10.4.14",
"babel-loader": "9.1.2",
"babel-plugin-istanbul": "^6.1.1",
"chai": "^4.3.4",
"chai": "^5.1.2",
"clean-webpack-plugin": "^4.0.0",
"commander": "^10.0.1",
"concat": "^1.0.3",
Expand Down Expand Up @@ -133,7 +133,7 @@
"karma-mocha": "^2.0.1",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "^5.0.0",
"lerna": "^6.6.1",
"lerna": "^8.1.9",
"lint-staged": "^13.2.2",
"lodash": "^4.17.21",
"mocha": "^10.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@cornerstonejs/adapters",
"version": "2.1.10",
"description": "Adapters for Cornerstone3D to/from formats including DICOM SR and others",
"main": "./dist/umd/adapters.umd.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"files": [
Expand Down
44 changes: 0 additions & 44 deletions packages/adapters/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,49 +47,5 @@ export default [
}),
json()
]
},
// UMD configuration

{
external: [
"dcmjs",
"gl-matrix",
"lodash.clonedeep",
"ndarray",
"@cornerstonejs/tools"
],
input: pkg.src || "src/index.ts",
output: [
{
file: "dist/umd/adapters.umd.js",
format: "umd",
name: "Adapters",
sourcemap: true,
globals: {
dcmjs: "dcmjs",
"gl-matrix": "glMatrix",
"lodash.clonedeep": "_.cloneDeep",
ndarray: "ndarray",
"@cornerstonejs/tools": "cornerstoneTools"
}
}
],
plugins: [
resolve({
preferBuiltins: true,
browser: true
}),
typescript({
sourceMap: false,
declaration: false,
outDir: "dist/esm"
}),
babel({
exclude: "node_modules/**",
babelHelpers: "bundled",
extensions: [".js", ".ts"]
}),
json()
]
}
];
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@cornerstonejs/core",
"version": "2.1.10",
"description": "",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"repository": "https://github.com/cornerstonejs/cornerstone3D",
Expand Down
8 changes: 0 additions & 8 deletions packages/dicomImageLoader/.webpack/webpack-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ module.exports = {
loader: 'babel-loader',
},
},
{
test: path.join(codecs, 'jpeg.js'),
loader: 'exports-loader',
options: {
type: 'commonjs',
exports: 'JpegImage',
},
},
],
},
plugins: [
Expand Down
3 changes: 1 addition & 2 deletions packages/dicomImageLoader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"author": "@cornerstonejs (previously Chris Hafey)",
"homepage": "https://github.com/cornerstonejs/cornerstone3D",
"license": "MIT",
"main": "./dist/esm/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"files": [
Expand Down Expand Up @@ -74,7 +73,7 @@
"build:esm:watch": "tsc --project ./tsconfig.json --watch",
"build:umd:dynamic": "cross-env NODE_ENV=production webpack --config .webpack/webpack-dynamic-import.js",
"build:umd:bundle": "cross-env NODE_ENV=production webpack --config .webpack/webpack-bundle.js",
"build:all": "yarn run build:umd:dynamic && yarn run build:esm",
"build:all": "yarn run build:esm",
"copy-dts": "echo 'not implemented yet'",
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
Expand Down
Loading

0 comments on commit fbaa769

Please sign in to comment.