larvitar 2.1.3 → 2.1.5

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 CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Dicom Image Toolkit for CornerstoneJS
10
10
 
11
- ### Current version: 2.1.3
11
+ ### Current version: 2.1.5
12
12
 
13
- ### Latest Published Release: 2.1.3
13
+ ### Latest Published Release: 2.1.5
14
14
 
15
15
  This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.
16
16
 
@@ -50,4 +50,4 @@ declare const setDefaultToolsProps: (newProps: Partial<ToolConfig>[]) => void;
50
50
  * NOTE: toolClass must be a valid cornerstone tool
51
51
  */
52
52
  declare const registerExternalTool: (toolName: string, toolClass: any) => void;
53
- export { DEFAULT_TOOLS, DEFAULT_STYLE, DEFAULT_SETTINGS, DEFAULT_MOUSE_KEYS, dvTools, getDefaultToolsByType, setDefaultToolsProps, registerExternalTool };
53
+ export { DEFAULT_TOOLS, DEFAULT_STYLE, DEFAULT_SETTINGS, DEFAULT_MOUSE_KEYS, dvTools, getDefaultToolsByType, setDefaultToolsProps, registerExternalTool, };
@@ -78,4 +78,4 @@ declare const setToolPassive: (toolName: string, viewports?: string[]) => void;
78
78
  * @param {Object} style - the style object (see tools/defaults.js)
79
79
  */
80
80
  declare const setToolsStyle: (style?: ToolStyle) => void;
81
- export { initializeCSTools, setToolsStyle, csToolsCreateStack, addTool, setToolActive, setToolEnabled, setToolDisabled, setToolPassive, saveAnnotations, loadAnnotations, exportAnnotations };
81
+ export { initializeCSTools, setToolsStyle, csToolsCreateStack, addTool, setToolActive, setToolEnabled, setToolDisabled, setToolPassive, saveAnnotations, loadAnnotations, exportAnnotations, };
package/dist/larvitar.js CHANGED
@@ -162995,31 +162995,31 @@ const DEFAULT_TOOLS = {
162995
162995
  viewports: "all",
162996
162996
  configuration: {
162997
162997
  minorTickLength: 25,
162998
- majorTickLength: 50
162998
+ majorTickLength: 50,
162999
162999
  },
163000
163000
  options: {
163001
- mouseButtonMask: 1
163001
+ mouseButtonMask: 1,
163002
163002
  },
163003
163003
  cleanable: false,
163004
163004
  defaultActive: false,
163005
163005
  class: "ScaleOverlayTool",
163006
163006
  description: "Add scale overlay",
163007
163007
  shortcut: "ctrl-m",
163008
- type: "overlay"
163008
+ type: "overlay",
163009
163009
  },
163010
163010
  OrientationMarkers: {
163011
163011
  name: "OrientationMarkers",
163012
163012
  viewports: "all",
163013
163013
  configuration: {},
163014
163014
  options: {
163015
- mouseButtonMask: 1
163015
+ mouseButtonMask: 1,
163016
163016
  },
163017
163017
  cleanable: false,
163018
163018
  defaultActive: false,
163019
163019
  class: "OrientationMarkersTool",
163020
163020
  description: "Add orientation markers",
163021
163021
  shortcut: "ctrl-m",
163022
- type: "overlay"
163022
+ type: "overlay",
163023
163023
  },
163024
163024
  Wwwc: {
163025
163025
  name: "Wwwc",
@@ -163027,7 +163027,7 @@ const DEFAULT_TOOLS = {
163027
163027
  configuration: {},
163028
163028
  options: {
163029
163029
  mouseButtonMask: 1,
163030
- supportedInteractionTypes: ["Mouse", "Touch"]
163030
+ supportedInteractionTypes: ["Mouse", "Touch"],
163031
163031
  },
163032
163032
  cleanable: false,
163033
163033
  defaultActive: true,
@@ -163035,7 +163035,7 @@ const DEFAULT_TOOLS = {
163035
163035
  // sync: "wwwcSynchronizer",
163036
163036
  description: "Change image contrast",
163037
163037
  shortcut: "ctrl-m",
163038
- type: "utils"
163038
+ type: "utils",
163039
163039
  },
163040
163040
  WwwcRegion: {
163041
163041
  name: "WwwcRegion",
@@ -163043,7 +163043,7 @@ const DEFAULT_TOOLS = {
163043
163043
  configuration: {},
163044
163044
  options: {
163045
163045
  mouseButtonMask: 1,
163046
- supportedInteractionTypes: ["Mouse", "Touch"]
163046
+ supportedInteractionTypes: ["Mouse", "Touch"],
163047
163047
  },
163048
163048
  cleanable: false,
163049
163049
  defaultActive: false,
@@ -163051,22 +163051,35 @@ const DEFAULT_TOOLS = {
163051
163051
  // sync: "wwwcSynchronizer",
163052
163052
  description: "Change image contrast based on selected region",
163053
163053
  shortcut: "ctrl-m",
163054
- type: "utils"
163054
+ type: "utils",
163055
163055
  },
163056
163056
  StackScroll: {
163057
163057
  name: "StackScroll",
163058
163058
  viewports: "all",
163059
163059
  configuration: {
163060
163060
  loop: false, // default false
163061
- allowSkipping: true // default true
163061
+ allowSkipping: true, // default true
163062
163062
  },
163063
163063
  options: {
163064
163064
  mouseButtonMask: 1,
163065
- deltaY: 0 // default 0
163065
+ deltaY: 0, // default 0
163066
163066
  },
163067
163067
  cleanable: false,
163068
163068
  defaultActive: false,
163069
- class: "StackScrollTool"
163069
+ class: "StackScrollTool",
163070
+ },
163071
+ StackScrollMouseWheel: {
163072
+ name: "StackScrollMouseWheel",
163073
+ viewports: "all",
163074
+ configuration: {
163075
+ loop: false, // default false
163076
+ allowSkipping: true, // default true
163077
+ invert: false,
163078
+ },
163079
+ options: {},
163080
+ cleanable: false,
163081
+ defaultActive: true,
163082
+ class: "StackScrollMouseWheelTool",
163070
163083
  },
163071
163084
  CustomMouseWheelScroll: {
163072
163085
  name: "CustomMouseWheelScroll",
@@ -163078,17 +163091,17 @@ const DEFAULT_TOOLS = {
163078
163091
  fixedFrame: 1,
163079
163092
  fixedSlice: 0,
163080
163093
  currentMode: "stack", // 'stack' or 'slice'
163081
- framesNumber: 1
163094
+ framesNumber: 1,
163082
163095
  },
163083
163096
  options: {
163084
- mouseButtonMask: 0
163097
+ mouseButtonMask: 0,
163085
163098
  },
163086
163099
  cleanable: false,
163087
163100
  defaultActive: true,
163088
163101
  class: "CustomMouseWheelScrollTool",
163089
163102
  description: "scroll images/frames",
163090
163103
  shortcut: "mouse wheel",
163091
- type: "utils"
163104
+ type: "utils",
163092
163105
  },
163093
163106
  Pan: {
163094
163107
  name: "Pan",
@@ -163096,14 +163109,14 @@ const DEFAULT_TOOLS = {
163096
163109
  configuration: {},
163097
163110
  options: {
163098
163111
  mouseButtonMask: 1,
163099
- supportedInteractionTypes: ["Mouse", "Touch"]
163112
+ supportedInteractionTypes: ["Mouse", "Touch"],
163100
163113
  },
163101
163114
  cleanable: false,
163102
163115
  defaultActive: false,
163103
163116
  class: "PanTool",
163104
163117
  description: "Move image xy",
163105
163118
  shortcut: "ctrl-p",
163106
- type: "utils"
163119
+ type: "utils",
163107
163120
  },
163108
163121
  Zoom: {
163109
163122
  name: "Zoom",
@@ -163112,19 +163125,19 @@ const DEFAULT_TOOLS = {
163112
163125
  invert: false,
163113
163126
  preventZoomOutsideImage: false,
163114
163127
  minScale: 0.01,
163115
- maxScale: 25.0
163128
+ maxScale: 25.0,
163116
163129
  },
163117
163130
  options: {
163118
163131
  mouseButtonMask: 2,
163119
163132
  supportedInteractionTypes: ["Mouse", "Touch"],
163120
- defaultStrategy: "default" // can be 'default', 'translate' or 'zoomToCenter'
163133
+ defaultStrategy: "default", // can be 'default', 'translate' or 'zoomToCenter'
163121
163134
  },
163122
163135
  cleanable: false,
163123
163136
  class: "ZoomTool",
163124
163137
  defaultActive: true,
163125
163138
  description: "Zoom image at mouse position",
163126
163139
  shortcut: "ctrl-z",
163127
- type: "utils"
163140
+ type: "utils",
163128
163141
  },
163129
163142
  BorderMagnify: {
163130
163143
  name: "BorderMagnify",
@@ -163132,14 +163145,14 @@ const DEFAULT_TOOLS = {
163132
163145
  configuration: {},
163133
163146
  options: {
163134
163147
  mouseButtonMask: 1,
163135
- supportedInteractionTypes: ["Mouse", "Touch"]
163148
+ supportedInteractionTypes: ["Mouse", "Touch"],
163136
163149
  },
163137
163150
  cleanable: false,
163138
163151
  class: "BorderMagnifyTool",
163139
163152
  defaultActive: false,
163140
163153
  description: "Magnify image at mouse position",
163141
163154
  shortcut: "ctrl-m",
163142
- type: "utils"
163155
+ type: "utils",
163143
163156
  },
163144
163157
  DragProbe: {
163145
163158
  name: "DragProbe",
@@ -163147,13 +163160,13 @@ const DEFAULT_TOOLS = {
163147
163160
  configuration: {},
163148
163161
  options: {
163149
163162
  mouseButtonMask: 1,
163150
- supportedInteractionTypes: ["Mouse", "Touch"]
163163
+ supportedInteractionTypes: ["Mouse", "Touch"],
163151
163164
  },
163152
163165
  cleanable: false,
163153
163166
  class: "DragProbeTool",
163154
163167
  description: "Probe image at mouse position",
163155
163168
  shortcut: "ctrl-p",
163156
- type: "utils"
163169
+ type: "utils",
163157
163170
  },
163158
163171
  Rotate: {
163159
163172
  name: "Rotate",
@@ -163161,11 +163174,11 @@ const DEFAULT_TOOLS = {
163161
163174
  configuration: {},
163162
163175
  options: {
163163
163176
  mouseButtonMask: 1,
163164
- supportedInteractionTypes: ["Mouse", "Touch"]
163177
+ supportedInteractionTypes: ["Mouse", "Touch"],
163165
163178
  },
163166
163179
  cleanable: false,
163167
163180
  class: "RotateTool",
163168
- description: "Rotate image"
163181
+ description: "Rotate image",
163169
163182
  },
163170
163183
  Length: {
163171
163184
  name: "Length",
@@ -163173,10 +163186,10 @@ const DEFAULT_TOOLS = {
163173
163186
  configuration: {},
163174
163187
  options: {
163175
163188
  mouseButtonMask: 1,
163176
- supportedInteractionTypes: ["Mouse", "Touch"]
163189
+ supportedInteractionTypes: ["Mouse", "Touch"],
163177
163190
  },
163178
163191
  cleanable: true,
163179
- class: "LengthTool"
163192
+ class: "LengthTool",
163180
163193
  },
163181
163194
  Angle: {
163182
163195
  name: "Angle",
@@ -163184,10 +163197,10 @@ const DEFAULT_TOOLS = {
163184
163197
  configuration: {},
163185
163198
  options: {
163186
163199
  mouseButtonMask: 1,
163187
- supportedInteractionTypes: ["Mouse", "Touch"]
163200
+ supportedInteractionTypes: ["Mouse", "Touch"],
163188
163201
  },
163189
163202
  cleanable: true,
163190
- class: "AngleTool"
163203
+ class: "AngleTool",
163191
163204
  },
163192
163205
  Bidirectional: {
163193
163206
  name: "Bidirectional",
@@ -163195,7 +163208,7 @@ const DEFAULT_TOOLS = {
163195
163208
  configuration: {},
163196
163209
  options: { mouseButtonMask: 1 },
163197
163210
  cleanable: true,
163198
- class: "BidirectionalTool"
163211
+ class: "BidirectionalTool",
163199
163212
  },
163200
163213
  EllipticalRoi: {
163201
163214
  name: "EllipticalRoi",
@@ -163206,7 +163219,7 @@ const DEFAULT_TOOLS = {
163206
163219
  class: "EllipticalRoiTool",
163207
163220
  description: "Draw an ellipse",
163208
163221
  shortcut: "ctrl-f",
163209
- type: "annotation"
163222
+ type: "annotation",
163210
163223
  },
163211
163224
  RectangleRoi: {
163212
163225
  name: "RectangleRoi",
@@ -163218,7 +163231,7 @@ const DEFAULT_TOOLS = {
163218
163231
  class: "RectangleRoiTool",
163219
163232
  description: "Draw a rectangle",
163220
163233
  shortcut: "ctrl-a",
163221
- type: "annotation"
163234
+ type: "annotation",
163222
163235
  },
163223
163236
  EllipticalRoiOverlay: {
163224
163237
  name: "EllipticalRoiOverlay",
@@ -163229,7 +163242,7 @@ const DEFAULT_TOOLS = {
163229
163242
  class: "EllipticalRoiOverlayTool",
163230
163243
  description: "Draw an ellipse",
163231
163244
  shortcut: "ctrl-f",
163232
- type: "annotation"
163245
+ type: "annotation",
163233
163246
  },
163234
163247
  RectangleRoiOverlay: {
163235
163248
  name: "RectangleRoiOverlay",
@@ -163241,7 +163254,7 @@ const DEFAULT_TOOLS = {
163241
163254
  class: "RectangleRoiOverlayTool",
163242
163255
  description: "Draw a rectangle",
163243
163256
  shortcut: "ctrl-a",
163244
- type: "annotation"
163257
+ type: "annotation",
163245
163258
  },
163246
163259
  FreehandRoi: {
163247
163260
  name: "FreehandRoi",
@@ -163252,7 +163265,7 @@ const DEFAULT_TOOLS = {
163252
163265
  class: "FreehandRoiTool",
163253
163266
  description: "Draw a polyline / freehand form",
163254
163267
  shortcut: "ctrl-s",
163255
- type: "annotation"
163268
+ type: "annotation",
163256
163269
  },
163257
163270
  Probe: {
163258
163271
  name: "Probe",
@@ -163260,7 +163273,7 @@ const DEFAULT_TOOLS = {
163260
163273
  configuration: {},
163261
163274
  options: { mouseButtonMask: 1 },
163262
163275
  cleanable: true,
163263
- class: "ProbeTool"
163276
+ class: "ProbeTool",
163264
163277
  },
163265
163278
  ArrowAnnotate: {
163266
163279
  name: "ArrowAnnotate",
@@ -163271,7 +163284,7 @@ const DEFAULT_TOOLS = {
163271
163284
  class: "ArrowAnnotateTool",
163272
163285
  description: "Draw an arrow",
163273
163286
  shortcut: "ctrl-d",
163274
- type: "annotation"
163287
+ type: "annotation",
163275
163288
  },
163276
163289
  TextMarker: {
163277
163290
  name: "TextMarker",
@@ -163280,18 +163293,18 @@ const DEFAULT_TOOLS = {
163280
163293
  markers: Object.keys(new Array(100).fill(0)),
163281
163294
  current: "0",
163282
163295
  ascending: true,
163283
- loop: true
163296
+ loop: true,
163284
163297
  },
163285
163298
  options: { mouseButtonMask: 1 },
163286
163299
  cleanable: true,
163287
- class: "TextMarkerTool"
163300
+ class: "TextMarkerTool",
163288
163301
  },
163289
163302
  Eraser: {
163290
163303
  name: "Eraser",
163291
163304
  viewports: "all",
163292
163305
  configuration: {},
163293
163306
  options: { mouseButtonMask: 1 },
163294
- class: "EraserTool"
163307
+ class: "EraserTool",
163295
163308
  },
163296
163309
  ZoomTouchPinch: {
163297
163310
  name: "ZoomTouchPinch",
@@ -163299,25 +163312,25 @@ const DEFAULT_TOOLS = {
163299
163312
  configuration: {},
163300
163313
  options: {
163301
163314
  mouseButtonMask: 1,
163302
- supportedInteractionTypes: ["TouchPinch"]
163315
+ supportedInteractionTypes: ["TouchPinch"],
163303
163316
  },
163304
163317
  cleanable: false,
163305
163318
  class: "ZoomTouchPinchTool",
163306
- defaultActive: false
163319
+ defaultActive: false,
163307
163320
  },
163308
163321
  PanMultiTouch: {
163309
163322
  name: "PanMultiTouch",
163310
163323
  viewports: "all",
163311
163324
  configuration: {
163312
- touchPointers: 2
163325
+ touchPointers: 2,
163313
163326
  },
163314
163327
  options: {
163315
163328
  mouseButtonMask: 1,
163316
- supportedInteractionTypes: ["MultiTouch"]
163329
+ supportedInteractionTypes: ["MultiTouch"],
163317
163330
  },
163318
163331
  cleanable: false,
163319
163332
  class: "PanMultiTouchTool",
163320
- defaultActive: false
163333
+ defaultActive: false,
163321
163334
  },
163322
163335
  Brush: {
163323
163336
  name: "Brush",
@@ -163328,7 +163341,7 @@ const DEFAULT_TOOLS = {
163328
163341
  class: "BrushTool",
163329
163342
  description: "A simple brush",
163330
163343
  shortcut: "ctrl-q",
163331
- type: "segmentation"
163344
+ type: "segmentation",
163332
163345
  },
163333
163346
  ThresholdsBrush: {
163334
163347
  name: "ThresholdsBrush",
@@ -163339,7 +163352,7 @@ const DEFAULT_TOOLS = {
163339
163352
  class: "ThresholdsBrushTool",
163340
163353
  description: "Brush only values inside thresholds",
163341
163354
  shortcut: "ctrl-t",
163342
- type: "segmentation"
163355
+ type: "segmentation",
163343
163356
  },
163344
163357
  RectangleScissors: {
163345
163358
  name: "RectangleScissors",
@@ -163350,7 +163363,7 @@ const DEFAULT_TOOLS = {
163350
163363
  class: "RectangleScissorsTool",
163351
163364
  description: "A rectangular segmentation tool",
163352
163365
  shortcut: "ctrl-w",
163353
- type: "segmentation"
163366
+ type: "segmentation",
163354
163367
  },
163355
163368
  FreehandScissors: {
163356
163369
  name: "FreehandScissors",
@@ -163361,7 +163374,7 @@ const DEFAULT_TOOLS = {
163361
163374
  class: "FreehandScissorsTool",
163362
163375
  description: "A free-hand segmentation tool",
163363
163376
  shortcut: "ctrl-e",
163364
- type: "segmentation"
163377
+ type: "segmentation",
163365
163378
  },
163366
163379
  CircleScissors: {
163367
163380
  name: "CircleScissors",
@@ -163372,7 +163385,7 @@ const DEFAULT_TOOLS = {
163372
163385
  class: "CircleScissorsTool",
163373
163386
  description: "A circular segmentation tool",
163374
163387
  shortcut: "ctrl-r",
163375
- type: "segmentation"
163388
+ type: "segmentation",
163376
163389
  },
163377
163390
  CorrectionScissors: {
163378
163391
  name: "CorrectionScissors",
@@ -163383,7 +163396,7 @@ const DEFAULT_TOOLS = {
163383
163396
  class: "CorrectionScissorsTool",
163384
163397
  description: "A correction segmentation tool",
163385
163398
  shortcut: "ctrl-p",
163386
- type: "segmentation"
163399
+ type: "segmentation",
163387
163400
  },
163388
163401
  PolylineScissors: {
163389
163402
  name: "PolylineScissors",
@@ -163394,8 +163407,8 @@ const DEFAULT_TOOLS = {
163394
163407
  class: "PolylineScissorsTool",
163395
163408
  description: "A polyline segmentation tool",
163396
163409
  shortcut: "ctrl-s",
163397
- type: "segmentation"
163398
- }
163410
+ type: "segmentation",
163411
+ },
163399
163412
  };
163400
163413
  exports.DEFAULT_TOOLS = DEFAULT_TOOLS;
163401
163414
  /**
@@ -163408,7 +163421,7 @@ const dvTools = {
163408
163421
  RectangleRoiOverlayTool: rectangleRoiOverlayTool_1.default,
163409
163422
  EllipticalRoiOverlayTool: ellipticalRoiOverlayTool_1.default,
163410
163423
  BorderMagnifyTool: BorderMagnifyTool_1.default,
163411
- CustomMouseWheelScrollTool: customMouseWheelScrollTool_1.default
163424
+ CustomMouseWheelScrollTool: customMouseWheelScrollTool_1.default,
163412
163425
  };
163413
163426
  exports.dvTools = dvTools;
163414
163427
  /**
@@ -163425,7 +163438,7 @@ const DEFAULT_STYLE = {
163425
163438
  fillColor: "#0000FF",
163426
163439
  fontFamily: "Roboto",
163427
163440
  fontSize: 18,
163428
- backgroundColor: "rgba(1, 1, 1, 0.7)"
163441
+ backgroundColor: "rgba(1, 1, 1, 0.7)",
163429
163442
  };
163430
163443
  exports.DEFAULT_STYLE = DEFAULT_STYLE;
163431
163444
  /**
@@ -163437,7 +163450,7 @@ const DEFAULT_SETTINGS = {
163437
163450
  showSVGCursors: true,
163438
163451
  globalToolSyncEnabled: false,
163439
163452
  autoResizeViewports: true,
163440
- lineDash: [4, 4]
163453
+ lineDash: [4, 4],
163441
163454
  };
163442
163455
  exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
163443
163456
  /**
@@ -163448,19 +163461,19 @@ const DEFAULT_MOUSE_KEYS = {
163448
163461
  mouse_button_left: {
163449
163462
  shift: "Zoom",
163450
163463
  ctrl: "Pan",
163451
- default: "Wwwc"
163464
+ default: "Wwwc",
163452
163465
  },
163453
163466
  mouse_button_right: {
163454
163467
  shift: "Zoom",
163455
163468
  ctrl: "Pan",
163456
- default: "Wwwc"
163469
+ default: "Wwwc",
163457
163470
  },
163458
163471
  keyboard_shortcuts: {
163459
163472
  // alt key + letter
163460
163473
  KEY_R: "Rotate",
163461
163474
  KEY_A: "Angle",
163462
- KEY_L: "Length"
163463
- }
163475
+ KEY_L: "Length",
163476
+ },
163464
163477
  };
163465
163478
  exports.DEFAULT_MOUSE_KEYS = DEFAULT_MOUSE_KEYS;
163466
163479
  /**
@@ -163478,7 +163491,7 @@ exports.getDefaultToolsByType = getDefaultToolsByType;
163478
163491
  */
163479
163492
  const setDefaultToolsProps = function (newProps) {
163480
163493
  if ((0, lodash_1.isArray)(newProps)) {
163481
- newProps.forEach(props => {
163494
+ newProps.forEach((props) => {
163482
163495
  if (!props.name) {
163483
163496
  console.error("newProps must have a name property");
163484
163497
  return;
@@ -163506,8 +163519,7 @@ exports.setDefaultToolsProps = setDefaultToolsProps;
163506
163519
  */
163507
163520
  const registerExternalTool = function (toolName, toolClass) {
163508
163521
  if (dvTools[toolName] || DEFAULT_TOOLS[toolName]) {
163509
- console.error(`${toolName} already exists`);
163510
- return;
163522
+ console.warn(`${toolName} already exists, it will be replaced`);
163511
163523
  }
163512
163524
  dvTools[toolClass.name] = toolClass;
163513
163525
  DEFAULT_TOOLS[toolName] = {
@@ -163516,7 +163528,7 @@ const registerExternalTool = function (toolName, toolClass) {
163516
163528
  viewports: "all",
163517
163529
  configuration: {},
163518
163530
  options: { mouseButtonMask: 1 },
163519
- defaultActive: false
163531
+ defaultActive: false,
163520
163532
  };
163521
163533
  };
163522
163534
  exports.registerExternalTool = registerExternalTool;
@@ -164002,13 +164014,13 @@ const csToolsCreateStack = function (element, imageIds, currentImageIndex) {
164002
164014
  if (imageIds) {
164003
164015
  stack = {
164004
164016
  currentImageIdIndex: currentImageIndex === undefined ? 0 : currentImageIndex,
164005
- imageIds: imageIds
164017
+ imageIds: imageIds,
164006
164018
  };
164007
164019
  }
164008
164020
  else {
164009
164021
  stack = {
164010
164022
  currentImageIdIndex: 0,
164011
- imageIds: "imageLoader://0"
164023
+ imageIds: "imageLoader://0",
164012
164024
  };
164013
164025
  if (cornerstone_core_1.default.getEnabledElements().length == 0) {
164014
164026
  cornerstone_core_1.default.enable(element);
@@ -164077,7 +164089,7 @@ const addTool = function (toolName, customConfig, targetElementId) {
164077
164089
  if (!toolClassName) {
164078
164090
  throw new Error(`Tool ${toolName} class not found. Please check tools/default or pass a valid tool class name in the configuration object.`);
164079
164091
  }
164080
- const toolClass = cornerstone_tools_1.default[toolClassName] || default_1.dvTools[toolClassName];
164092
+ const toolClass = default_1.dvTools[toolClassName] || cornerstone_tools_1.default[toolClassName];
164081
164093
  if (targetElementId) {
164082
164094
  let element = document.getElementById(targetElementId);
164083
164095
  cornerstone_tools_1.default.addToolForElement(element, toolClass, defaultConfig);
@@ -164102,7 +164114,7 @@ const addDefaultTools = function (elementId) {
164102
164114
  cornerstone_core_1.default.enable(element);
164103
164115
  }
164104
164116
  // for each default tool
164105
- (0, lodash_1.each)(default_1.DEFAULT_TOOLS, tool => {
164117
+ (0, lodash_1.each)(default_1.DEFAULT_TOOLS, (tool) => {
164106
164118
  // check if already added
164107
164119
  if (!isToolMissing(tool.name)) {
164108
164120
  console.log("missing");
@@ -164114,14 +164126,14 @@ const addDefaultTools = function (elementId) {
164114
164126
  }
164115
164127
  else {
164116
164128
  // call add tool for element for each element
164117
- (0, lodash_1.each)(tool.viewports, targetElementId => {
164129
+ (0, lodash_1.each)(tool.viewports, (targetElementId) => {
164118
164130
  addTool(tool.name, tool.configuration, targetElementId);
164119
164131
  });
164120
164132
  }
164121
164133
  // if sync tool, enable
164122
164134
  if (tool.sync) {
164123
164135
  const synchronizer = new cornerstone_tools_1.default.Synchronizer("cornerstoneimagerendered", cornerstone_tools_1.default[tool.sync]);
164124
- elements.forEach(element => {
164136
+ elements.forEach((element) => {
164125
164137
  synchronizer.add(element.element);
164126
164138
  });
164127
164139
  synchronizer.enabled = true;
@@ -164170,7 +164182,7 @@ const setToolActive = function (toolName, options, viewports, doNotSetInStore) {
164170
164182
  // activate and update all
164171
164183
  cornerstone_tools_1.default.setToolActive(toolName, defaultOpt);
164172
164184
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164173
- (0, lodash_1.each)(enabledElements, enel => {
164185
+ (0, lodash_1.each)(enabledElements, (enel) => {
164174
164186
  tryUpdateImage(enel.element);
164175
164187
  });
164176
164188
  }
@@ -164222,7 +164234,7 @@ const setToolDisabled = function (toolName, viewports, resetCursor = true) {
164222
164234
  // disable and update all
164223
164235
  cornerstone_tools_1.default.setToolDisabled(toolName);
164224
164236
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164225
- (0, lodash_1.each)(enabledElements, enel => {
164237
+ (0, lodash_1.each)(enabledElements, (enel) => {
164226
164238
  if (resetCursor) {
164227
164239
  // restore native cursor
164228
164240
  enel.element.style.cursor = "initial";
@@ -164260,7 +164272,7 @@ const setToolEnabled = function (toolName, viewports, resetCursor = true) {
164260
164272
  // enable and update all
164261
164273
  cornerstone_tools_1.default.setToolEnabled(toolName);
164262
164274
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164263
- (0, lodash_1.each)(enabledElements, enel => {
164275
+ (0, lodash_1.each)(enabledElements, (enel) => {
164264
164276
  if (resetCursor) {
164265
164277
  // restore native cursor
164266
164278
  enel.element.style.cursor = "initial";
@@ -164293,7 +164305,7 @@ const setToolPassive = function (toolName, viewports) {
164293
164305
  // activate and update all
164294
164306
  cornerstone_tools_1.default.setToolPassive(toolName);
164295
164307
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164296
- (0, lodash_1.each)(enabledElements, enel => {
164308
+ (0, lodash_1.each)(enabledElements, (enel) => {
164297
164309
  tryUpdateImage(enel.element);
164298
164310
  });
164299
164311
  }
@@ -165950,7 +165962,7 @@ module.exports = JSON.parse('{"x00000000":{"tag":"x00000000","vr":"UL","vm":"1",
165950
165962
  /***/ ((module) => {
165951
165963
 
165952
165964
  "use strict";
165953
- module.exports = JSON.parse('{"name":"larvitar","keywords":["DICOM","imaging","medical","cornerstone"],"version":"2.1.2","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","pdfjs-dist":"^3.8.162","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/pdfjs-dist":"^2.10.378","@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"}}');
165965
+ module.exports = JSON.parse('{"name":"larvitar","keywords":["DICOM","imaging","medical","cornerstone"],"version":"2.1.5","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","pdfjs-dist":"^3.8.162","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/pdfjs-dist":"^2.10.378","@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"}}');
165954
165966
 
165955
165967
  /***/ })
165956
165968