larvitar 2.0.14 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/imaging/tools/custom/contourTool.d.ts +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/larvitar.js +30 -30
- package/dist/larvitar.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
## Dicom Image Toolkit for CornerstoneJS
|
|
10
10
|
|
|
11
|
-
### Current version: 2.0.
|
|
12
|
-
|
|
11
|
+
### Current version: 2.0.15
|
|
12
|
+
|
|
13
|
+
### Latest Published Release: 2.0.15
|
|
13
14
|
|
|
14
15
|
This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.
|
|
15
16
|
|
|
@@ -380,15 +380,15 @@ export class ContoursTool {
|
|
|
380
380
|
*/
|
|
381
381
|
fireModifiedEvent(element: any, measurementData: any): void;
|
|
382
382
|
fireCompletedEvent(element: any, measurementData: any): void;
|
|
383
|
-
set spacing(
|
|
383
|
+
set spacing(value: any);
|
|
384
384
|
get spacing(): any;
|
|
385
|
-
set activeHandleRadius(
|
|
385
|
+
set activeHandleRadius(value: any);
|
|
386
386
|
get activeHandleRadius(): any;
|
|
387
|
-
set completeHandleRadius(
|
|
387
|
+
set completeHandleRadius(value: any);
|
|
388
388
|
get completeHandleRadius(): any;
|
|
389
|
-
set alwaysShowHandles(
|
|
389
|
+
set alwaysShowHandles(value: any);
|
|
390
390
|
get alwaysShowHandles(): any;
|
|
391
|
-
set invalidColor(
|
|
391
|
+
set invalidColor(value: any);
|
|
392
392
|
get invalidColor(): any;
|
|
393
393
|
/**
|
|
394
394
|
* Ends the active drawing loop and removes the polygon.
|
package/dist/index.d.ts
CHANGED
package/dist/larvitar.js
CHANGED
|
@@ -1690,7 +1690,6 @@ class EditMaskTool extends BaseBrushTool {
|
|
|
1690
1690
|
// });
|
|
1691
1691
|
// }
|
|
1692
1692
|
}
|
|
1693
|
-
|
|
1694
1693
|
activeCallback(element, options) {
|
|
1695
1694
|
switch (options.force) {
|
|
1696
1695
|
case "delete":
|
|
@@ -3940,7 +3939,6 @@ class RectangleRoiOverlayTool extends BaseAnnotationTool {
|
|
|
3940
3939
|
// showMinMax: false,
|
|
3941
3940
|
// showHounsfieldUnits: true,
|
|
3942
3941
|
},
|
|
3943
|
-
|
|
3944
3942
|
svgCursor: rectangleRoiCursor
|
|
3945
3943
|
};
|
|
3946
3944
|
super(props, defaultProps);
|
|
@@ -80593,8 +80591,8 @@ const updateLoadedStack = function (seriesData, allSeriesStack, customId, sliceI
|
|
|
80593
80591
|
if (!allSeriesStack[id]) {
|
|
80594
80592
|
let series = {
|
|
80595
80593
|
currentImageIdIndex: 0,
|
|
80596
|
-
imageIds: [],
|
|
80597
|
-
instanceUIDs: {},
|
|
80594
|
+
imageIds: [], // (ordered)
|
|
80595
|
+
instanceUIDs: {}, // instanceUID: imageId (ordered)
|
|
80598
80596
|
instances: {},
|
|
80599
80597
|
seriesDescription: seriesDescription,
|
|
80600
80598
|
larvitarSeriesInstanceUID: lid,
|
|
@@ -81894,6 +81892,7 @@ const updateViewportData = function (elementId, viewportData, activeTool) {
|
|
|
81894
81892
|
// TODO: understand how to handle synchronized tools
|
|
81895
81893
|
switch (activeTool) {
|
|
81896
81894
|
case "Wwwc":
|
|
81895
|
+
case "Wwwl":
|
|
81897
81896
|
case "WwwcRegion":
|
|
81898
81897
|
if (viewportData.voi) {
|
|
81899
81898
|
(0, imageStore_1.set)([
|
|
@@ -81937,6 +81936,7 @@ const updateViewportData = function (elementId, viewportData, activeTool) {
|
|
|
81937
81936
|
}
|
|
81938
81937
|
break;
|
|
81939
81938
|
default:
|
|
81939
|
+
console.warn("unknown tool: " + activeTool);
|
|
81940
81940
|
break;
|
|
81941
81941
|
}
|
|
81942
81942
|
};
|
|
@@ -82333,8 +82333,8 @@ const INITIAL_STORE_DATA = {
|
|
|
82333
82333
|
};
|
|
82334
82334
|
// default viewport object
|
|
82335
82335
|
const DEFAULT_VIEWPORT = {
|
|
82336
|
-
loading: 0,
|
|
82337
|
-
ready: false,
|
|
82336
|
+
loading: 0, // from 0 to 100 (%)
|
|
82337
|
+
ready: false, // true when currentImageId is rendered
|
|
82338
82338
|
minSliceId: 0,
|
|
82339
82339
|
maxSliceId: 0,
|
|
82340
82340
|
sliceId: 0,
|
|
@@ -83563,8 +83563,8 @@ const getReslicedMetadata = function (reslicedSeriesId, fromOrientation, toOrien
|
|
|
83563
83563
|
x00280100: sampleMetadata.x00280100,
|
|
83564
83564
|
x00280103: sampleMetadata.x00280103,
|
|
83565
83565
|
// resliced series sizes
|
|
83566
|
-
x00280010: toSize[1],
|
|
83567
|
-
x00280011: toSize[0],
|
|
83566
|
+
x00280010: toSize[1], // rows
|
|
83567
|
+
x00280011: toSize[0], // cols
|
|
83568
83568
|
// resliced series spacing
|
|
83569
83569
|
x00280030: [toSpacing[1], toSpacing[0]],
|
|
83570
83570
|
x00180050: [toSpacing[2]],
|
|
@@ -83650,8 +83650,8 @@ const getCmprMetadata = function (reslicedSeriesId, imageLoaderName, header // T
|
|
|
83650
83650
|
// Bits Allocated
|
|
83651
83651
|
x00280103: header.repr,
|
|
83652
83652
|
// resliced series sizes
|
|
83653
|
-
x00280010: header.rows,
|
|
83654
|
-
x00280011: header.cols,
|
|
83653
|
+
x00280010: header.rows, // rows
|
|
83654
|
+
x00280011: header.cols, // cols
|
|
83655
83655
|
// resliced series spacing
|
|
83656
83656
|
x00280030: [header.spacing[1], header.spacing[0]],
|
|
83657
83657
|
x00180050: [header.distance_btw_slices],
|
|
@@ -83681,8 +83681,8 @@ const getCmprMetadata = function (reslicedSeriesId, imageLoaderName, header // T
|
|
|
83681
83681
|
// x00020010: sampleMetadata.x00020010,
|
|
83682
83682
|
// x00200052: sampleMetadata.x00200052,
|
|
83683
83683
|
// data needed to obtain a good rendering
|
|
83684
|
-
x00281050: [header.wwwl[1] / 2],
|
|
83685
|
-
x00281051: [header.wwwl[0]],
|
|
83684
|
+
x00281050: [header.wwwl[1] / 2], // [wl]
|
|
83685
|
+
x00281051: [header.wwwl[0]], // [ww]
|
|
83686
83686
|
x00281052: header.intercept,
|
|
83687
83687
|
x00281053: header.slope,
|
|
83688
83688
|
// new image orientation (IOP)
|
|
@@ -84388,7 +84388,7 @@ const getImageFrame = function (metadata, dataSet) {
|
|
|
84388
84388
|
rows: imagePixelModule.rows,
|
|
84389
84389
|
columns: imagePixelModule.columns,
|
|
84390
84390
|
bitsAllocated: imagePixelModule.bitsAllocated,
|
|
84391
|
-
pixelRepresentation: imagePixelModule.pixelRepresentation,
|
|
84391
|
+
pixelRepresentation: imagePixelModule.pixelRepresentation, // 0 = unsigned,
|
|
84392
84392
|
smallestPixelValue: imagePixelModule.smallestPixelValue,
|
|
84393
84393
|
largestPixelValue: imagePixelModule.largestPixelValue,
|
|
84394
84394
|
redPaletteColorLookupTableDescriptor: imagePixelModule.redPaletteColorLookupTableDescriptor,
|
|
@@ -84397,7 +84397,7 @@ const getImageFrame = function (metadata, dataSet) {
|
|
|
84397
84397
|
redPaletteColorLookupTableData: imagePixelModule.redPaletteColorLookupTableData,
|
|
84398
84398
|
greenPaletteColorLookupTableData: imagePixelModule.greenPaletteColorLookupTableData,
|
|
84399
84399
|
bluePaletteColorLookupTableData: imagePixelModule.bluePaletteColorLookupTableData,
|
|
84400
|
-
pixelData: undefined,
|
|
84400
|
+
pixelData: undefined, // populated later after decoding,
|
|
84401
84401
|
ImageData: undefined
|
|
84402
84402
|
};
|
|
84403
84403
|
};
|
|
@@ -84827,7 +84827,7 @@ let createCustomImage = function (id, imageId, frameIndex, metadata) {
|
|
|
84827
84827
|
color: cornerstone_wado_image_loader_1.default.isColorImage(imageFrame.photometricInterpretation),
|
|
84828
84828
|
columnPixelSpacing: pixelSpacing[1]
|
|
84829
84829
|
? pixelSpacing[1]
|
|
84830
|
-
: pixelSpacing,
|
|
84830
|
+
: pixelSpacing, // check for specific spacing value
|
|
84831
84831
|
columns: imageFrame.columns,
|
|
84832
84832
|
data: dataSet ? dataSet : undefined,
|
|
84833
84833
|
height: imageFrame.rows,
|
|
@@ -84838,17 +84838,17 @@ let createCustomImage = function (id, imageId, frameIndex, metadata) {
|
|
|
84838
84838
|
invert: imageFrame.photometricInterpretation === "MONOCHROME1",
|
|
84839
84839
|
minPixelValue: imageFrame.smallestPixelValue,
|
|
84840
84840
|
maxPixelValue: imageFrame.largestPixelValue,
|
|
84841
|
-
render: undefined,
|
|
84841
|
+
render: undefined, // set below
|
|
84842
84842
|
rowPixelSpacing: pixelSpacing[0]
|
|
84843
84843
|
? pixelSpacing[0]
|
|
84844
|
-
: pixelSpacing,
|
|
84844
|
+
: pixelSpacing, // check for specific spacing value
|
|
84845
84845
|
rows: imageFrame.rows,
|
|
84846
84846
|
sizeInBytes: getSizeInBytes(),
|
|
84847
84847
|
slope: rescaleSlope ? rescaleSlope : 1,
|
|
84848
84848
|
width: imageFrame.columns,
|
|
84849
84849
|
windowCenter: windowCenter,
|
|
84850
84850
|
windowWidth: windowWidth,
|
|
84851
|
-
decodeTimeInMS: undefined,
|
|
84851
|
+
decodeTimeInMS: undefined, // TODO
|
|
84852
84852
|
loadTimeInMS: undefined // TODO
|
|
84853
84853
|
};
|
|
84854
84854
|
// add function to return pixel data
|
|
@@ -85054,11 +85054,11 @@ const buildNrrdImage = function (volume, seriesId, custom_header) {
|
|
|
85054
85054
|
let intercept = header.volume.intercept;
|
|
85055
85055
|
let slope = header.volume.slope;
|
|
85056
85056
|
let metadata = {
|
|
85057
|
-
x00280010: rows,
|
|
85058
|
-
x00280011: cols,
|
|
85059
|
-
x00200037: iop,
|
|
85060
|
-
x00280030: ps,
|
|
85061
|
-
x00180050: [thickness][0],
|
|
85057
|
+
x00280010: rows, // Rows
|
|
85058
|
+
x00280011: cols, // Columns
|
|
85059
|
+
x00200037: iop, // ImageOrientationPatient
|
|
85060
|
+
x00280030: ps, // PixelSpacing
|
|
85061
|
+
x00180050: [thickness][0], // SliceThickness
|
|
85062
85062
|
x00281052: intercept ? [intercept] : [0],
|
|
85063
85063
|
x00281053: slope ? [slope] : [1],
|
|
85064
85064
|
x00200052: header.volume.imageIds
|
|
@@ -85303,7 +85303,7 @@ let createCustomImage = function (imageId, metadata, pixelData, dataSet) {
|
|
|
85303
85303
|
invert: imageFrame.photometricInterpretation === "MONOCHROME1",
|
|
85304
85304
|
minPixelValue: imageFrame.smallestPixelValue,
|
|
85305
85305
|
maxPixelValue: imageFrame.largestPixelValue,
|
|
85306
|
-
render: undefined,
|
|
85306
|
+
render: undefined, // set below
|
|
85307
85307
|
rowPixelSpacing: pixelSpacing ? pixelSpacing[0] : undefined,
|
|
85308
85308
|
rows: imageFrame.rows,
|
|
85309
85309
|
sizeInBytes: getSizeInBytes(),
|
|
@@ -85484,7 +85484,7 @@ let createCustomImage = function (imageId, metadata, pixelData, dataSet // depre
|
|
|
85484
85484
|
invert: imageFrame.photometricInterpretation === "MONOCHROME1",
|
|
85485
85485
|
minPixelValue: imageFrame.smallestPixelValue,
|
|
85486
85486
|
maxPixelValue: imageFrame.largestPixelValue,
|
|
85487
|
-
render: undefined,
|
|
85487
|
+
render: undefined, // set below
|
|
85488
85488
|
rowPixelSpacing: pixelSpacing ? pixelSpacing[0] : undefined,
|
|
85489
85489
|
rows: imageFrame.rows,
|
|
85490
85490
|
sizeInBytes: getSizeInBytes(),
|
|
@@ -86131,7 +86131,7 @@ const DEFAULT_TOOLS = {
|
|
|
86131
86131
|
name: "StackScroll",
|
|
86132
86132
|
viewports: "all",
|
|
86133
86133
|
configuration: {
|
|
86134
|
-
loop: false,
|
|
86134
|
+
loop: false, // default false
|
|
86135
86135
|
allowSkipping: true // default true
|
|
86136
86136
|
},
|
|
86137
86137
|
options: {
|
|
@@ -86146,8 +86146,8 @@ const DEFAULT_TOOLS = {
|
|
|
86146
86146
|
name: "StackScrollMouseWheel",
|
|
86147
86147
|
viewports: "all",
|
|
86148
86148
|
configuration: {
|
|
86149
|
-
loop: false,
|
|
86150
|
-
allowSkipping: true,
|
|
86149
|
+
loop: false, // default false
|
|
86150
|
+
allowSkipping: true, // default true
|
|
86151
86151
|
invert: false
|
|
86152
86152
|
},
|
|
86153
86153
|
options: {},
|
|
@@ -86521,7 +86521,7 @@ exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
|
|
|
86521
86521
|
* Shortcut and mouse bindings defaults
|
|
86522
86522
|
*/
|
|
86523
86523
|
const DEFAULT_MOUSE_KEYS = {
|
|
86524
|
-
debug: true,
|
|
86524
|
+
debug: true, // log changes
|
|
86525
86525
|
mouse_button_left: {
|
|
86526
86526
|
shift: "Zoom",
|
|
86527
86527
|
ctrl: "Pan",
|
|
@@ -88981,7 +88981,7 @@ module.exports = JSON.parse('{"x00000000":{"tag":"x00000000","vr":"UL","vm":"1",
|
|
|
88981
88981
|
/***/ ((module) => {
|
|
88982
88982
|
|
|
88983
88983
|
"use strict";
|
|
88984
|
-
module.exports = JSON.parse('{"name":"larvitar","keywords":["DICOM","imaging","medical","cornerstone"],"version":"2.0.
|
|
88984
|
+
module.exports = JSON.parse('{"name":"larvitar","keywords":["DICOM","imaging","medical","cornerstone"],"version":"2.0.15","description":"typescript library for parsing, loading, rendering and interacting with DICOM images","repository":{"url":"https://github.com/dvisionlab/Larvitar.git","type":"git"},"main":"dist/larvitar.js","types":"dist/index.d.ts","files":["dist","imaging/**/*.d.ts"],"scripts":{"coverage":"typescript-coverage-report","generate-docs":"node_modules/.bin/jsdoc -c jsdoc.json","build":"webpack --config ./bundler/webpack.prod.js && cp ./dist/larvitar.js ./docs/examples/larvitar.js","dev":"webpack --progress --config ./bundler/webpack.dev.js && cp ./dist/larvitar.js ./docs/examples/larvitar.js","dev-wip":"webpack serve --config ./bundler/webpack.dev-wip.js"},"author":"Simone Manini <simone.manini@dvisionlab.com> (https://www.dvisionlab.com)","contributors":["Mattia Ronzoni <mattia.ronzoni@dvisionlab.com> (https://www.dvisionlab.com)","Sara Zanchi <sara.zanchi@dvisionlab.com> (https://www.dvisionlab.com)","Ale Re <ale.re@dvisionlab.com> (https://www.dvisionlab.com)","Laura Borghesi Re <laura.borghesi@dvisionlab.com> (https://www.dvisionlab.com)"],"license":"MIT","dependencies":{"@rollup/plugin-commonjs":"^17.1.0","cornerstone-core":"^2.6.1","cornerstone-file-image-loader":"^0.3.0","cornerstone-tools":"^6.0.7","cornerstone-wado-image-loader":"^4.13.2","cornerstone-web-image-loader":"^2.1.1","crypto-js":"^4.1.1","dicom-character-set":"^1.0.3","dicom-parser":"^1.8.13","docdash":"^1.2.0","hammerjs":"^2.0.8","jpeg-lossless-decoder-js":"^2.0.7","keycode-js":"^3.1.0","lodash":"^4.17.15","pako":"^1.0.10","papaparse":"^5.3.0","plotly.js-dist-min":"^2.27.1","uuid":"^8.3.2"},"devDependencies":{"@babel/core":"^7.21.8","@types/cornerstone-core":"^2.3.0","@types/crypto-js":"^4.1.1","@types/hammerjs":"^2.0.41","@types/lodash":"^4.14.192","@types/papaparse":"^5.3.7","@types/plotly.js":"^2.12.30","@types/plotly.js-dist-min":"^2.3.4","@types/uuid":"^9.0.1","babel-loader":"^9.1.2","clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^11.0.0","fs":"^0.0.1-security","html-loader":"^4.2.0","html-webpack-plugin":"^5.5.0","ip":"^1.1.8","jsdoc":"^3.6.4","portfinder-sync":"^0.0.2","ts-loader":"^9.4.2","typescript":"^5.0.2","typescript-coverage-report":"^0.7.0","webpack":"^5.76.3","webpack-bundle-analyzer":"^4.8.0","webpack-cli":"^5.0.1","webpack-dev-server":"^4.13.1"}}');
|
|
88985
88985
|
|
|
88986
88986
|
/***/ })
|
|
88987
88987
|
|