larvitar 2.1.4 → 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.4
11
+ ### Current version: 2.1.5
12
12
 
13
- ### Latest Published Release: 2.1.4
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,22 @@ 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
163070
  },
163071
163071
  StackScrollMouseWheel: {
163072
163072
  name: "StackScrollMouseWheel",
@@ -163074,12 +163074,12 @@ const DEFAULT_TOOLS = {
163074
163074
  configuration: {
163075
163075
  loop: false, // default false
163076
163076
  allowSkipping: true, // default true
163077
- invert: false
163077
+ invert: false,
163078
163078
  },
163079
163079
  options: {},
163080
163080
  cleanable: false,
163081
163081
  defaultActive: true,
163082
- class: "StackScrollMouseWheelTool"
163082
+ class: "StackScrollMouseWheelTool",
163083
163083
  },
163084
163084
  CustomMouseWheelScroll: {
163085
163085
  name: "CustomMouseWheelScroll",
@@ -163091,17 +163091,17 @@ const DEFAULT_TOOLS = {
163091
163091
  fixedFrame: 1,
163092
163092
  fixedSlice: 0,
163093
163093
  currentMode: "stack", // 'stack' or 'slice'
163094
- framesNumber: 1
163094
+ framesNumber: 1,
163095
163095
  },
163096
163096
  options: {
163097
- mouseButtonMask: 0
163097
+ mouseButtonMask: 0,
163098
163098
  },
163099
163099
  cleanable: false,
163100
163100
  defaultActive: true,
163101
163101
  class: "CustomMouseWheelScrollTool",
163102
163102
  description: "scroll images/frames",
163103
163103
  shortcut: "mouse wheel",
163104
- type: "utils"
163104
+ type: "utils",
163105
163105
  },
163106
163106
  Pan: {
163107
163107
  name: "Pan",
@@ -163109,14 +163109,14 @@ const DEFAULT_TOOLS = {
163109
163109
  configuration: {},
163110
163110
  options: {
163111
163111
  mouseButtonMask: 1,
163112
- supportedInteractionTypes: ["Mouse", "Touch"]
163112
+ supportedInteractionTypes: ["Mouse", "Touch"],
163113
163113
  },
163114
163114
  cleanable: false,
163115
163115
  defaultActive: false,
163116
163116
  class: "PanTool",
163117
163117
  description: "Move image xy",
163118
163118
  shortcut: "ctrl-p",
163119
- type: "utils"
163119
+ type: "utils",
163120
163120
  },
163121
163121
  Zoom: {
163122
163122
  name: "Zoom",
@@ -163125,19 +163125,19 @@ const DEFAULT_TOOLS = {
163125
163125
  invert: false,
163126
163126
  preventZoomOutsideImage: false,
163127
163127
  minScale: 0.01,
163128
- maxScale: 25.0
163128
+ maxScale: 25.0,
163129
163129
  },
163130
163130
  options: {
163131
163131
  mouseButtonMask: 2,
163132
163132
  supportedInteractionTypes: ["Mouse", "Touch"],
163133
- defaultStrategy: "default" // can be 'default', 'translate' or 'zoomToCenter'
163133
+ defaultStrategy: "default", // can be 'default', 'translate' or 'zoomToCenter'
163134
163134
  },
163135
163135
  cleanable: false,
163136
163136
  class: "ZoomTool",
163137
163137
  defaultActive: true,
163138
163138
  description: "Zoom image at mouse position",
163139
163139
  shortcut: "ctrl-z",
163140
- type: "utils"
163140
+ type: "utils",
163141
163141
  },
163142
163142
  BorderMagnify: {
163143
163143
  name: "BorderMagnify",
@@ -163145,14 +163145,14 @@ const DEFAULT_TOOLS = {
163145
163145
  configuration: {},
163146
163146
  options: {
163147
163147
  mouseButtonMask: 1,
163148
- supportedInteractionTypes: ["Mouse", "Touch"]
163148
+ supportedInteractionTypes: ["Mouse", "Touch"],
163149
163149
  },
163150
163150
  cleanable: false,
163151
163151
  class: "BorderMagnifyTool",
163152
163152
  defaultActive: false,
163153
163153
  description: "Magnify image at mouse position",
163154
163154
  shortcut: "ctrl-m",
163155
- type: "utils"
163155
+ type: "utils",
163156
163156
  },
163157
163157
  DragProbe: {
163158
163158
  name: "DragProbe",
@@ -163160,13 +163160,13 @@ const DEFAULT_TOOLS = {
163160
163160
  configuration: {},
163161
163161
  options: {
163162
163162
  mouseButtonMask: 1,
163163
- supportedInteractionTypes: ["Mouse", "Touch"]
163163
+ supportedInteractionTypes: ["Mouse", "Touch"],
163164
163164
  },
163165
163165
  cleanable: false,
163166
163166
  class: "DragProbeTool",
163167
163167
  description: "Probe image at mouse position",
163168
163168
  shortcut: "ctrl-p",
163169
- type: "utils"
163169
+ type: "utils",
163170
163170
  },
163171
163171
  Rotate: {
163172
163172
  name: "Rotate",
@@ -163174,11 +163174,11 @@ const DEFAULT_TOOLS = {
163174
163174
  configuration: {},
163175
163175
  options: {
163176
163176
  mouseButtonMask: 1,
163177
- supportedInteractionTypes: ["Mouse", "Touch"]
163177
+ supportedInteractionTypes: ["Mouse", "Touch"],
163178
163178
  },
163179
163179
  cleanable: false,
163180
163180
  class: "RotateTool",
163181
- description: "Rotate image"
163181
+ description: "Rotate image",
163182
163182
  },
163183
163183
  Length: {
163184
163184
  name: "Length",
@@ -163186,10 +163186,10 @@ const DEFAULT_TOOLS = {
163186
163186
  configuration: {},
163187
163187
  options: {
163188
163188
  mouseButtonMask: 1,
163189
- supportedInteractionTypes: ["Mouse", "Touch"]
163189
+ supportedInteractionTypes: ["Mouse", "Touch"],
163190
163190
  },
163191
163191
  cleanable: true,
163192
- class: "LengthTool"
163192
+ class: "LengthTool",
163193
163193
  },
163194
163194
  Angle: {
163195
163195
  name: "Angle",
@@ -163197,10 +163197,10 @@ const DEFAULT_TOOLS = {
163197
163197
  configuration: {},
163198
163198
  options: {
163199
163199
  mouseButtonMask: 1,
163200
- supportedInteractionTypes: ["Mouse", "Touch"]
163200
+ supportedInteractionTypes: ["Mouse", "Touch"],
163201
163201
  },
163202
163202
  cleanable: true,
163203
- class: "AngleTool"
163203
+ class: "AngleTool",
163204
163204
  },
163205
163205
  Bidirectional: {
163206
163206
  name: "Bidirectional",
@@ -163208,7 +163208,7 @@ const DEFAULT_TOOLS = {
163208
163208
  configuration: {},
163209
163209
  options: { mouseButtonMask: 1 },
163210
163210
  cleanable: true,
163211
- class: "BidirectionalTool"
163211
+ class: "BidirectionalTool",
163212
163212
  },
163213
163213
  EllipticalRoi: {
163214
163214
  name: "EllipticalRoi",
@@ -163219,7 +163219,7 @@ const DEFAULT_TOOLS = {
163219
163219
  class: "EllipticalRoiTool",
163220
163220
  description: "Draw an ellipse",
163221
163221
  shortcut: "ctrl-f",
163222
- type: "annotation"
163222
+ type: "annotation",
163223
163223
  },
163224
163224
  RectangleRoi: {
163225
163225
  name: "RectangleRoi",
@@ -163231,7 +163231,7 @@ const DEFAULT_TOOLS = {
163231
163231
  class: "RectangleRoiTool",
163232
163232
  description: "Draw a rectangle",
163233
163233
  shortcut: "ctrl-a",
163234
- type: "annotation"
163234
+ type: "annotation",
163235
163235
  },
163236
163236
  EllipticalRoiOverlay: {
163237
163237
  name: "EllipticalRoiOverlay",
@@ -163242,7 +163242,7 @@ const DEFAULT_TOOLS = {
163242
163242
  class: "EllipticalRoiOverlayTool",
163243
163243
  description: "Draw an ellipse",
163244
163244
  shortcut: "ctrl-f",
163245
- type: "annotation"
163245
+ type: "annotation",
163246
163246
  },
163247
163247
  RectangleRoiOverlay: {
163248
163248
  name: "RectangleRoiOverlay",
@@ -163254,7 +163254,7 @@ const DEFAULT_TOOLS = {
163254
163254
  class: "RectangleRoiOverlayTool",
163255
163255
  description: "Draw a rectangle",
163256
163256
  shortcut: "ctrl-a",
163257
- type: "annotation"
163257
+ type: "annotation",
163258
163258
  },
163259
163259
  FreehandRoi: {
163260
163260
  name: "FreehandRoi",
@@ -163265,7 +163265,7 @@ const DEFAULT_TOOLS = {
163265
163265
  class: "FreehandRoiTool",
163266
163266
  description: "Draw a polyline / freehand form",
163267
163267
  shortcut: "ctrl-s",
163268
- type: "annotation"
163268
+ type: "annotation",
163269
163269
  },
163270
163270
  Probe: {
163271
163271
  name: "Probe",
@@ -163273,7 +163273,7 @@ const DEFAULT_TOOLS = {
163273
163273
  configuration: {},
163274
163274
  options: { mouseButtonMask: 1 },
163275
163275
  cleanable: true,
163276
- class: "ProbeTool"
163276
+ class: "ProbeTool",
163277
163277
  },
163278
163278
  ArrowAnnotate: {
163279
163279
  name: "ArrowAnnotate",
@@ -163284,7 +163284,7 @@ const DEFAULT_TOOLS = {
163284
163284
  class: "ArrowAnnotateTool",
163285
163285
  description: "Draw an arrow",
163286
163286
  shortcut: "ctrl-d",
163287
- type: "annotation"
163287
+ type: "annotation",
163288
163288
  },
163289
163289
  TextMarker: {
163290
163290
  name: "TextMarker",
@@ -163293,18 +163293,18 @@ const DEFAULT_TOOLS = {
163293
163293
  markers: Object.keys(new Array(100).fill(0)),
163294
163294
  current: "0",
163295
163295
  ascending: true,
163296
- loop: true
163296
+ loop: true,
163297
163297
  },
163298
163298
  options: { mouseButtonMask: 1 },
163299
163299
  cleanable: true,
163300
- class: "TextMarkerTool"
163300
+ class: "TextMarkerTool",
163301
163301
  },
163302
163302
  Eraser: {
163303
163303
  name: "Eraser",
163304
163304
  viewports: "all",
163305
163305
  configuration: {},
163306
163306
  options: { mouseButtonMask: 1 },
163307
- class: "EraserTool"
163307
+ class: "EraserTool",
163308
163308
  },
163309
163309
  ZoomTouchPinch: {
163310
163310
  name: "ZoomTouchPinch",
@@ -163312,25 +163312,25 @@ const DEFAULT_TOOLS = {
163312
163312
  configuration: {},
163313
163313
  options: {
163314
163314
  mouseButtonMask: 1,
163315
- supportedInteractionTypes: ["TouchPinch"]
163315
+ supportedInteractionTypes: ["TouchPinch"],
163316
163316
  },
163317
163317
  cleanable: false,
163318
163318
  class: "ZoomTouchPinchTool",
163319
- defaultActive: false
163319
+ defaultActive: false,
163320
163320
  },
163321
163321
  PanMultiTouch: {
163322
163322
  name: "PanMultiTouch",
163323
163323
  viewports: "all",
163324
163324
  configuration: {
163325
- touchPointers: 2
163325
+ touchPointers: 2,
163326
163326
  },
163327
163327
  options: {
163328
163328
  mouseButtonMask: 1,
163329
- supportedInteractionTypes: ["MultiTouch"]
163329
+ supportedInteractionTypes: ["MultiTouch"],
163330
163330
  },
163331
163331
  cleanable: false,
163332
163332
  class: "PanMultiTouchTool",
163333
- defaultActive: false
163333
+ defaultActive: false,
163334
163334
  },
163335
163335
  Brush: {
163336
163336
  name: "Brush",
@@ -163341,7 +163341,7 @@ const DEFAULT_TOOLS = {
163341
163341
  class: "BrushTool",
163342
163342
  description: "A simple brush",
163343
163343
  shortcut: "ctrl-q",
163344
- type: "segmentation"
163344
+ type: "segmentation",
163345
163345
  },
163346
163346
  ThresholdsBrush: {
163347
163347
  name: "ThresholdsBrush",
@@ -163352,7 +163352,7 @@ const DEFAULT_TOOLS = {
163352
163352
  class: "ThresholdsBrushTool",
163353
163353
  description: "Brush only values inside thresholds",
163354
163354
  shortcut: "ctrl-t",
163355
- type: "segmentation"
163355
+ type: "segmentation",
163356
163356
  },
163357
163357
  RectangleScissors: {
163358
163358
  name: "RectangleScissors",
@@ -163363,7 +163363,7 @@ const DEFAULT_TOOLS = {
163363
163363
  class: "RectangleScissorsTool",
163364
163364
  description: "A rectangular segmentation tool",
163365
163365
  shortcut: "ctrl-w",
163366
- type: "segmentation"
163366
+ type: "segmentation",
163367
163367
  },
163368
163368
  FreehandScissors: {
163369
163369
  name: "FreehandScissors",
@@ -163374,7 +163374,7 @@ const DEFAULT_TOOLS = {
163374
163374
  class: "FreehandScissorsTool",
163375
163375
  description: "A free-hand segmentation tool",
163376
163376
  shortcut: "ctrl-e",
163377
- type: "segmentation"
163377
+ type: "segmentation",
163378
163378
  },
163379
163379
  CircleScissors: {
163380
163380
  name: "CircleScissors",
@@ -163385,7 +163385,7 @@ const DEFAULT_TOOLS = {
163385
163385
  class: "CircleScissorsTool",
163386
163386
  description: "A circular segmentation tool",
163387
163387
  shortcut: "ctrl-r",
163388
- type: "segmentation"
163388
+ type: "segmentation",
163389
163389
  },
163390
163390
  CorrectionScissors: {
163391
163391
  name: "CorrectionScissors",
@@ -163396,7 +163396,7 @@ const DEFAULT_TOOLS = {
163396
163396
  class: "CorrectionScissorsTool",
163397
163397
  description: "A correction segmentation tool",
163398
163398
  shortcut: "ctrl-p",
163399
- type: "segmentation"
163399
+ type: "segmentation",
163400
163400
  },
163401
163401
  PolylineScissors: {
163402
163402
  name: "PolylineScissors",
@@ -163407,8 +163407,8 @@ const DEFAULT_TOOLS = {
163407
163407
  class: "PolylineScissorsTool",
163408
163408
  description: "A polyline segmentation tool",
163409
163409
  shortcut: "ctrl-s",
163410
- type: "segmentation"
163411
- }
163410
+ type: "segmentation",
163411
+ },
163412
163412
  };
163413
163413
  exports.DEFAULT_TOOLS = DEFAULT_TOOLS;
163414
163414
  /**
@@ -163421,7 +163421,7 @@ const dvTools = {
163421
163421
  RectangleRoiOverlayTool: rectangleRoiOverlayTool_1.default,
163422
163422
  EllipticalRoiOverlayTool: ellipticalRoiOverlayTool_1.default,
163423
163423
  BorderMagnifyTool: BorderMagnifyTool_1.default,
163424
- CustomMouseWheelScrollTool: customMouseWheelScrollTool_1.default
163424
+ CustomMouseWheelScrollTool: customMouseWheelScrollTool_1.default,
163425
163425
  };
163426
163426
  exports.dvTools = dvTools;
163427
163427
  /**
@@ -163438,7 +163438,7 @@ const DEFAULT_STYLE = {
163438
163438
  fillColor: "#0000FF",
163439
163439
  fontFamily: "Roboto",
163440
163440
  fontSize: 18,
163441
- backgroundColor: "rgba(1, 1, 1, 0.7)"
163441
+ backgroundColor: "rgba(1, 1, 1, 0.7)",
163442
163442
  };
163443
163443
  exports.DEFAULT_STYLE = DEFAULT_STYLE;
163444
163444
  /**
@@ -163450,7 +163450,7 @@ const DEFAULT_SETTINGS = {
163450
163450
  showSVGCursors: true,
163451
163451
  globalToolSyncEnabled: false,
163452
163452
  autoResizeViewports: true,
163453
- lineDash: [4, 4]
163453
+ lineDash: [4, 4],
163454
163454
  };
163455
163455
  exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
163456
163456
  /**
@@ -163461,19 +163461,19 @@ const DEFAULT_MOUSE_KEYS = {
163461
163461
  mouse_button_left: {
163462
163462
  shift: "Zoom",
163463
163463
  ctrl: "Pan",
163464
- default: "Wwwc"
163464
+ default: "Wwwc",
163465
163465
  },
163466
163466
  mouse_button_right: {
163467
163467
  shift: "Zoom",
163468
163468
  ctrl: "Pan",
163469
- default: "Wwwc"
163469
+ default: "Wwwc",
163470
163470
  },
163471
163471
  keyboard_shortcuts: {
163472
163472
  // alt key + letter
163473
163473
  KEY_R: "Rotate",
163474
163474
  KEY_A: "Angle",
163475
- KEY_L: "Length"
163476
- }
163475
+ KEY_L: "Length",
163476
+ },
163477
163477
  };
163478
163478
  exports.DEFAULT_MOUSE_KEYS = DEFAULT_MOUSE_KEYS;
163479
163479
  /**
@@ -163491,7 +163491,7 @@ exports.getDefaultToolsByType = getDefaultToolsByType;
163491
163491
  */
163492
163492
  const setDefaultToolsProps = function (newProps) {
163493
163493
  if ((0, lodash_1.isArray)(newProps)) {
163494
- newProps.forEach(props => {
163494
+ newProps.forEach((props) => {
163495
163495
  if (!props.name) {
163496
163496
  console.error("newProps must have a name property");
163497
163497
  return;
@@ -163519,8 +163519,7 @@ exports.setDefaultToolsProps = setDefaultToolsProps;
163519
163519
  */
163520
163520
  const registerExternalTool = function (toolName, toolClass) {
163521
163521
  if (dvTools[toolName] || DEFAULT_TOOLS[toolName]) {
163522
- console.error(`${toolName} already exists`);
163523
- return;
163522
+ console.warn(`${toolName} already exists, it will be replaced`);
163524
163523
  }
163525
163524
  dvTools[toolClass.name] = toolClass;
163526
163525
  DEFAULT_TOOLS[toolName] = {
@@ -163529,7 +163528,7 @@ const registerExternalTool = function (toolName, toolClass) {
163529
163528
  viewports: "all",
163530
163529
  configuration: {},
163531
163530
  options: { mouseButtonMask: 1 },
163532
- defaultActive: false
163531
+ defaultActive: false,
163533
163532
  };
163534
163533
  };
163535
163534
  exports.registerExternalTool = registerExternalTool;
@@ -164015,13 +164014,13 @@ const csToolsCreateStack = function (element, imageIds, currentImageIndex) {
164015
164014
  if (imageIds) {
164016
164015
  stack = {
164017
164016
  currentImageIdIndex: currentImageIndex === undefined ? 0 : currentImageIndex,
164018
- imageIds: imageIds
164017
+ imageIds: imageIds,
164019
164018
  };
164020
164019
  }
164021
164020
  else {
164022
164021
  stack = {
164023
164022
  currentImageIdIndex: 0,
164024
- imageIds: "imageLoader://0"
164023
+ imageIds: "imageLoader://0",
164025
164024
  };
164026
164025
  if (cornerstone_core_1.default.getEnabledElements().length == 0) {
164027
164026
  cornerstone_core_1.default.enable(element);
@@ -164090,7 +164089,7 @@ const addTool = function (toolName, customConfig, targetElementId) {
164090
164089
  if (!toolClassName) {
164091
164090
  throw new Error(`Tool ${toolName} class not found. Please check tools/default or pass a valid tool class name in the configuration object.`);
164092
164091
  }
164093
- const toolClass = cornerstone_tools_1.default[toolClassName] || default_1.dvTools[toolClassName];
164092
+ const toolClass = default_1.dvTools[toolClassName] || cornerstone_tools_1.default[toolClassName];
164094
164093
  if (targetElementId) {
164095
164094
  let element = document.getElementById(targetElementId);
164096
164095
  cornerstone_tools_1.default.addToolForElement(element, toolClass, defaultConfig);
@@ -164115,7 +164114,7 @@ const addDefaultTools = function (elementId) {
164115
164114
  cornerstone_core_1.default.enable(element);
164116
164115
  }
164117
164116
  // for each default tool
164118
- (0, lodash_1.each)(default_1.DEFAULT_TOOLS, tool => {
164117
+ (0, lodash_1.each)(default_1.DEFAULT_TOOLS, (tool) => {
164119
164118
  // check if already added
164120
164119
  if (!isToolMissing(tool.name)) {
164121
164120
  console.log("missing");
@@ -164127,14 +164126,14 @@ const addDefaultTools = function (elementId) {
164127
164126
  }
164128
164127
  else {
164129
164128
  // call add tool for element for each element
164130
- (0, lodash_1.each)(tool.viewports, targetElementId => {
164129
+ (0, lodash_1.each)(tool.viewports, (targetElementId) => {
164131
164130
  addTool(tool.name, tool.configuration, targetElementId);
164132
164131
  });
164133
164132
  }
164134
164133
  // if sync tool, enable
164135
164134
  if (tool.sync) {
164136
164135
  const synchronizer = new cornerstone_tools_1.default.Synchronizer("cornerstoneimagerendered", cornerstone_tools_1.default[tool.sync]);
164137
- elements.forEach(element => {
164136
+ elements.forEach((element) => {
164138
164137
  synchronizer.add(element.element);
164139
164138
  });
164140
164139
  synchronizer.enabled = true;
@@ -164183,7 +164182,7 @@ const setToolActive = function (toolName, options, viewports, doNotSetInStore) {
164183
164182
  // activate and update all
164184
164183
  cornerstone_tools_1.default.setToolActive(toolName, defaultOpt);
164185
164184
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164186
- (0, lodash_1.each)(enabledElements, enel => {
164185
+ (0, lodash_1.each)(enabledElements, (enel) => {
164187
164186
  tryUpdateImage(enel.element);
164188
164187
  });
164189
164188
  }
@@ -164235,7 +164234,7 @@ const setToolDisabled = function (toolName, viewports, resetCursor = true) {
164235
164234
  // disable and update all
164236
164235
  cornerstone_tools_1.default.setToolDisabled(toolName);
164237
164236
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164238
- (0, lodash_1.each)(enabledElements, enel => {
164237
+ (0, lodash_1.each)(enabledElements, (enel) => {
164239
164238
  if (resetCursor) {
164240
164239
  // restore native cursor
164241
164240
  enel.element.style.cursor = "initial";
@@ -164273,7 +164272,7 @@ const setToolEnabled = function (toolName, viewports, resetCursor = true) {
164273
164272
  // enable and update all
164274
164273
  cornerstone_tools_1.default.setToolEnabled(toolName);
164275
164274
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164276
- (0, lodash_1.each)(enabledElements, enel => {
164275
+ (0, lodash_1.each)(enabledElements, (enel) => {
164277
164276
  if (resetCursor) {
164278
164277
  // restore native cursor
164279
164278
  enel.element.style.cursor = "initial";
@@ -164306,7 +164305,7 @@ const setToolPassive = function (toolName, viewports) {
164306
164305
  // activate and update all
164307
164306
  cornerstone_tools_1.default.setToolPassive(toolName);
164308
164307
  let enabledElements = cornerstone_core_1.default.getEnabledElements();
164309
- (0, lodash_1.each)(enabledElements, enel => {
164308
+ (0, lodash_1.each)(enabledElements, (enel) => {
164310
164309
  tryUpdateImage(enel.element);
164311
164310
  });
164312
164311
  }
@@ -165963,7 +165962,7 @@ module.exports = JSON.parse('{"x00000000":{"tag":"x00000000","vr":"UL","vm":"1",
165963
165962
  /***/ ((module) => {
165964
165963
 
165965
165964
  "use strict";
165966
- module.exports = JSON.parse('{"name":"larvitar","keywords":["DICOM","imaging","medical","cornerstone"],"version":"2.1.4","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"}}');
165967
165966
 
165968
165967
  /***/ })
165969
165968