@ohif/app 3.13.0-beta.58 → 3.13.0-beta.59

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.
Files changed (34) hide show
  1. package/dist/{4579.bundle.d5ef5d2773b62664e752.js → 4579.bundle.0a6b2f49a7e136a79e37.js} +82 -82
  2. package/dist/{4688.bundle.00d9c8d8c0447b8dcaae.js → 4688.bundle.c817780f93ca0fa7ff08.js} +4 -1
  3. package/dist/{6386.bundle.6667cdf4dbea2109a438.js → 6386.bundle.5d82d1f41d1c37a0358d.js} +4 -1
  4. package/dist/{7537.bundle.03b36e2bf6285e71718d.js → 7537.bundle.1726a7f7a4c378296085.js} +37 -21
  5. package/dist/{9039.bundle.8686977ad015d1bda4ab.js → 9039.bundle.7afa93b103c3b26d4855.js} +21 -13
  6. package/dist/{9195.bundle.9ed8ee206373aa57505b.js → 9195.bundle.05baee0d667832b5a679.js} +2 -2
  7. package/dist/{9205.bundle.6b78bf79808aee905cd5.js → 9205.bundle.315c3b56464a7590235a.js} +21 -12
  8. package/dist/{app.bundle.22d651b74df3f9866394.js → app.bundle.5e9bd3853479e9f2178c.js} +39 -24
  9. package/dist/{compute.bundle.3b615c718f2b47a606dd.js → compute.bundle.a41ec0ba4f935200ab93.js} +1 -1
  10. package/dist/index.html +1 -1
  11. package/dist/{polySeg.bundle.742a17aa1a2d5e60bd5c.js → polySeg.bundle.be57af5b834dd833a418.js} +1 -1
  12. package/dist/sw.js +1 -1
  13. package/package.json +21 -21
  14. /package/dist/{1459.bundle.d0d9f899b59b642c4823.js → 1459.bundle.1a52c0d128f1431e5321.js} +0 -0
  15. /package/dist/{1933.bundle.16f4a3ca8104512993ca.js → 1933.bundle.448c6e97834ccd69074b.js} +0 -0
  16. /package/dist/{2018.bundle.e4f69805ca878b7f4164.js → 2018.bundle.1e91bc504ffad3cf59f9.js} +0 -0
  17. /package/dist/{213.bundle.b4df2221c839a89c69e0.js → 213.bundle.cc3e760f2dd0635e1f2e.js} +0 -0
  18. /package/dist/{2424.bundle.e9b4312b2c29e42b7fb8.js → 2424.bundle.80d265b694f36a8d6c3f.js} +0 -0
  19. /package/dist/{3138.bundle.cf06f8c3df2a7ddf1f5e.js → 3138.bundle.0211e0caf715d7faa924.js} +0 -0
  20. /package/dist/{3461.bundle.755d4b0ea7a7b09cd203.js → 3461.bundle.dfa7fd8cda25ebc6665b.js} +0 -0
  21. /package/dist/{4507.bundle.4fe4fd15498c80ff31ba.js → 4507.bundle.c8ee19fc9689aa362207.js} +0 -0
  22. /package/dist/{4819.bundle.948569e5842f44df5daf.js → 4819.bundle.a0f639384f0bb2ec7a4a.js} +0 -0
  23. /package/dist/{5015.bundle.29c23f04a14c8d0f4d4d.js → 5015.bundle.4cd219119d2966d886ed.js} +0 -0
  24. /package/dist/{5028.bundle.4f67b73e5c513cbede4d.js → 5028.bundle.4f15333fd752c46570d8.js} +0 -0
  25. /package/dist/{5457.bundle.6df3e42d2b4c99afe2af.js → 5457.bundle.789af50b3e9318017153.js} +0 -0
  26. /package/dist/{5485.bundle.413ebac4973dbf61913c.js → 5485.bundle.e6a16033567e73803b7c.js} +0 -0
  27. /package/dist/{6027.bundle.fbed12595cd910d7399c.js → 6027.bundle.87a14d8c064618560228.js} +0 -0
  28. /package/dist/{7639.bundle.c6e1a41b969f9777306a.js → 7639.bundle.e94c967acf71d94199a1.js} +0 -0
  29. /package/dist/{8305.bundle.9a753f78c7acca626a36.js → 8305.bundle.561034b71c762fdbee81.js} +0 -0
  30. /package/dist/{8499.bundle.7141e11b295e045bd96c.js → 8499.bundle.7249b7db2e23884c689b.js} +0 -0
  31. /package/dist/{85.bundle.aba00dcf591e387a652e.js → 85.bundle.0541ddda5fc48ccd5b94.js} +0 -0
  32. /package/dist/{8558.bundle.cf865c72683a72f867dd.js → 8558.bundle.eeadfbd16886a60eef8e.js} +0 -0
  33. /package/dist/{8583.bundle.87eb8f0ef8d9e88a0b6d.js → 8583.bundle.8ea4b9115aa7d731c33a.js} +0 -0
  34. /package/dist/{9927.bundle.43add2b2ddd1909a1daf.js → 9927.bundle.7206fcedcf759a5c9b5e.js} +0 -0
@@ -1826,12 +1826,12 @@ function checkOrientation(multiframe, validOrientations, sourceDataDimensions, t
1826
1826
  const iop = sharedImageOrientationPatient || PerFrameFunctionalGroups.PlaneOrientationSequence.ImageOrientationPatient;
1827
1827
  const inPlane = validOrientations.some(operation => esm.utilities.isEqual(iop, operation, tolerance));
1828
1828
  if (inPlane) {
1829
- return "Planar";
1829
+ return 'Planar';
1830
1830
  }
1831
1831
  if (checkIfPerpendicular(iop, validOrientations[0], tolerance) && sourceDataDimensions.includes(multiframe.Rows) && sourceDataDimensions.includes(multiframe.Columns)) {
1832
- return "Perpendicular";
1832
+ return 'Perpendicular';
1833
1833
  }
1834
- return "Oblique";
1834
+ return 'Oblique';
1835
1835
  }
1836
1836
 
1837
1837
 
@@ -3136,9 +3136,9 @@ async function ParametricMap_generateToolState(imageIds, arrayBuffer, metadataPr
3136
3136
  const dataset = ParametricMap_DicomMetaDictionary.naturalizeDataset(dicomData.dict);
3137
3137
  dataset._meta = ParametricMap_DicomMetaDictionary.namifyDataset(dicomData.meta);
3138
3138
  const multiframe = ParametricMap_Normalizer.normalizeToDataset([dataset]);
3139
- const imagePlaneModule = metadataProvider.get("imagePlaneModule", imageIds[0]);
3139
+ const imagePlaneModule = metadataProvider.get('imagePlaneModule', imageIds[0]);
3140
3140
  if (!imagePlaneModule) {
3141
- console.warn("Insufficient metadata, imagePlaneModule missing.");
3141
+ console.warn('Insufficient metadata, imagePlaneModule missing.');
3142
3142
  }
3143
3143
  const ImageOrientationPatient = Array.isArray(imagePlaneModule.rowCosines) ? [...imagePlaneModule.rowCosines, ...imagePlaneModule.columnCosines] : [imagePlaneModule.rowCosines.x, imagePlaneModule.rowCosines.y, imagePlaneModule.rowCosines.z, imagePlaneModule.columnCosines.x, imagePlaneModule.columnCosines.y, imagePlaneModule.columnCosines.z];
3144
3144
  const validOrientations = [ImageOrientationPatient];
@@ -3147,20 +3147,20 @@ async function ParametricMap_generateToolState(imageIds, arrayBuffer, metadataPr
3147
3147
  const sopUIDImageIdIndexMap = imageIds.reduce((acc, imageId) => {
3148
3148
  const {
3149
3149
  sopInstanceUID
3150
- } = metadataProvider.get("generalImageModule", imageId);
3150
+ } = metadataProvider.get('generalImageModule', imageId);
3151
3151
  acc[sopInstanceUID] = imageId;
3152
3152
  return acc;
3153
3153
  }, {});
3154
- if (orientation !== "Planar") {
3154
+ if (orientation !== 'Planar') {
3155
3155
  const orientationText = {
3156
- Perpendicular: "orthogonal",
3157
- Oblique: "oblique"
3156
+ Perpendicular: 'orthogonal',
3157
+ Oblique: 'oblique'
3158
3158
  };
3159
3159
  throw new Error("Parametric maps ".concat(orientationText[orientation], " to the acquisition plane of the source data are not yet supported."));
3160
3160
  }
3161
3161
  const imageIdMaps = imageIds.reduce((acc, curr, index) => {
3162
3162
  acc.indices[curr] = index;
3163
- acc.metadata[curr] = metadataProvider.get("instance", curr);
3163
+ acc.metadata[curr] = metadataProvider.get('instance', curr);
3164
3164
  return acc;
3165
3165
  }, {
3166
3166
  indices: {},
@@ -3184,12 +3184,12 @@ function ParametricMap_insertPixelDataPlanar(sourcePixelData, multiframe, imageI
3184
3184
  const sourceSliceDataView = new sourcePixelData.constructor(sourcePixelData.buffer, i * sliceLength, sliceLength);
3185
3185
  const imageId = ParametricMap_findReferenceSourceImageId(multiframe, i, imageIds, metadataProvider, tolerance, sopUIDImageIdIndexMap);
3186
3186
  if (!imageId) {
3187
- console.warn("Image not present in stack, can't import frame : " + i + ".");
3187
+ console.warn("Image not present in stack, can't import frame : " + i + '.');
3188
3188
  continue;
3189
3189
  }
3190
3190
  const sourceImageMetadata = imageIdMaps.metadata[imageId];
3191
3191
  if (Rows !== sourceImageMetadata.Rows || Columns !== sourceImageMetadata.Columns) {
3192
- throw new Error("Parametric map have different geometry dimensions (Rows and Columns) " + "respect to the source image reference frame. This is not yet supported.");
3192
+ throw new Error('Parametric map have different geometry dimensions (Rows and Columns) ' + 'respect to the source image reference frame. This is not yet supported.');
3193
3193
  }
3194
3194
  const imageIdIndex = imageIdMaps.indices[imageId];
3195
3195
  const byteOffset = sliceLength * imageIdIndex * targetPixelData.BYTES_PER_ELEMENT;
@@ -3214,7 +3214,7 @@ function getPixelData(multiframe) {
3214
3214
  data = multiframe.DoubleFloatPixelData;
3215
3215
  }
3216
3216
  if (data === undefined) {
3217
- dcmjs_es/* log */.Rm.error("This parametric map pixel data is undefined.");
3217
+ dcmjs_es/* log */.Rm.error('This parametric map pixel data is undefined.');
3218
3218
  }
3219
3219
  if (Array.isArray(data)) {
3220
3220
  data = data[0];
@@ -3260,7 +3260,7 @@ function ParametricMap_findReferenceSourceImageId(multiframe, frameSegment, imag
3260
3260
  }
3261
3261
  }
3262
3262
  } else if (SourceImageSequence && SourceImageSequence.length !== 0) {
3263
- console.warn("DerivationImageSequence not present, using SourceImageSequence assuming SEG has the same geometry as the source image.");
3263
+ console.warn('DerivationImageSequence not present, using SourceImageSequence assuming SEG has the same geometry as the source image.');
3264
3264
  frameSourceImageSequence = SourceImageSequence[frameSegment];
3265
3265
  }
3266
3266
  if (frameSourceImageSequence) {
@@ -3285,7 +3285,7 @@ function ParametricMap_getImageIdOfSourceImagebyGeometry(ReferencedSeriesInstanc
3285
3285
  return undefined;
3286
3286
  }
3287
3287
  for (let imageIdsIndex = 0; imageIdsIndex < imageIds.length; ++imageIdsIndex) {
3288
- const sourceImageMetadata = metadataProvider.get("instance", imageIds[imageIdsIndex]);
3288
+ const sourceImageMetadata = metadataProvider.get('instance', imageIds[imageIdsIndex]);
3289
3289
  if (sourceImageMetadata === undefined || sourceImageMetadata.ImagePositionPatient === undefined || sourceImageMetadata.FrameOfReferenceUID !== FrameOfReferenceUID || sourceImageMetadata.SeriesInstanceUID !== ReferencedSeriesInstanceUID) {
3290
3290
  continue;
3291
3291
  }
@@ -3299,7 +3299,7 @@ function ParametricMap_getImageIdOfReferencedFrame(sopInstanceUid, frameNumber,
3299
3299
  if (!imageId) {
3300
3300
  return;
3301
3301
  }
3302
- const imageIdFrameNumber = Number(imageId.split("frame=")[1]);
3302
+ const imageIdFrameNumber = Number(imageId.split('frame=')[1]);
3303
3303
  return imageIdFrameNumber === frameNumber - 1 ? imageId : undefined;
3304
3304
  }
3305
3305
  const ParametricMapObj = {
@@ -4272,25 +4272,25 @@ function appendList(list, appendList) {
4272
4272
 
4273
4273
  class BaseAdapter3D {
4274
4274
  static registerType() {
4275
- let code = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
4276
- let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
4275
+ let code = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
4276
+ let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4277
4277
  let count = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
4278
4278
  let key = code;
4279
4279
  if (type) {
4280
- key = "".concat(key).concat(key.length ? "-" : "").concat(type);
4280
+ key = "".concat(key).concat(key.length ? '-' : '').concat(type);
4281
4281
  }
4282
4282
  if (count) {
4283
- key = "".concat(key).concat(key.length ? "-" : "").concat(count);
4283
+ key = "".concat(key).concat(key.length ? '-' : '').concat(count);
4284
4284
  }
4285
4285
  MeasurementReport_MeasurementReport.registerAdapterTypes(this, key);
4286
4286
  }
4287
4287
  static getPointsCount(graphicItem) {
4288
- const is3DMeasurement = graphicItem.ValueType === "SCOORD3D";
4288
+ const is3DMeasurement = graphicItem.ValueType === 'SCOORD3D';
4289
4289
  const pointSize = is3DMeasurement ? 3 : 2;
4290
4290
  return graphicItem.GraphicData.length / pointSize;
4291
4291
  }
4292
4292
  static getGraphicItems(measurementGroup, filter) {
4293
- const items = measurementGroup.ContentSequence.filter(group => group.ValueType === "SCOORD" || group.ValueType === "SCOORD3D");
4293
+ const items = measurementGroup.ContentSequence.filter(group => group.ValueType === 'SCOORD' || group.ValueType === 'SCOORD3D');
4294
4294
  return filter ? items.filter(filter) : items;
4295
4295
  }
4296
4296
  static getGraphicItem(measurementGroup) {
@@ -4348,7 +4348,7 @@ class BaseAdapter3D {
4348
4348
  if (this.trackingIdentifiers.has(trackingIdentifier)) {
4349
4349
  return true;
4350
4350
  }
4351
- if (!trackingIdentifier.includes(":")) {
4351
+ if (!trackingIdentifier.includes(':')) {
4352
4352
  return false;
4353
4353
  }
4354
4354
  return trackingIdentifier.startsWith(this.trackingIdentifierTextValue);
@@ -4361,7 +4361,7 @@ class BaseAdapter3D {
4361
4361
  state.annotation.data = {
4362
4362
  cachedStats: {},
4363
4363
  frameNumber: ReferencedFrameNumber,
4364
- seriesLevel: (trackingIdentifier === null || trackingIdentifier === void 0 ? void 0 : trackingIdentifier.indexOf(":Series")) > 0
4364
+ seriesLevel: (trackingIdentifier === null || trackingIdentifier === void 0 ? void 0 : trackingIdentifier.indexOf(':Series')) > 0
4365
4365
  };
4366
4366
  return state;
4367
4367
  }
@@ -4423,7 +4423,7 @@ class ArrowAnnotate_ArrowAnnotate extends BaseAdapter3D {
4423
4423
  } = MeasurementReport_MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
4424
4424
  const text = state.annotation.data.label;
4425
4425
  if (worldCoords.length === 1 && SCOORDGroup) {
4426
- const imagePixelModule = metadata.get("imagePixelModule", referencedImageId);
4426
+ const imagePixelModule = metadata.get('imagePixelModule', referencedImageId);
4427
4427
  let xOffset = 10;
4428
4428
  let yOffset = 10;
4429
4429
  if (imagePixelModule) {
@@ -4488,7 +4488,7 @@ class ArrowAnnotate_ArrowAnnotate extends BaseAdapter3D {
4488
4488
  }
4489
4489
  _ArrowAnnotate = ArrowAnnotate_ArrowAnnotate;
4490
4490
  (() => {
4491
- _ArrowAnnotate.init("ArrowAnnotate", TID300ArrowAnnotate);
4491
+ _ArrowAnnotate.init('ArrowAnnotate', TID300ArrowAnnotate);
4492
4492
  _ArrowAnnotate.registerLegacy();
4493
4493
  })();
4494
4494
 
@@ -4509,8 +4509,8 @@ function Bidirectional_objectSpread(e) { for (var r = 1; r < arguments.length; r
4509
4509
  const {
4510
4510
  Bidirectional: Bidirectional_TID300Bidirectional
4511
4511
  } = dcmjs_es/* utilities */.BF.TID300;
4512
- const Bidirectional_LONG_AXIS = "Long Axis";
4513
- const Bidirectional_SHORT_AXIS = "Short Axis";
4512
+ const Bidirectional_LONG_AXIS = 'Long Axis';
4513
+ const Bidirectional_SHORT_AXIS = 'Short Axis';
4514
4514
  class Bidirectional_Bidirectional extends BaseAdapter3D {
4515
4515
  static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata) {
4516
4516
  const {
@@ -4524,8 +4524,8 @@ class Bidirectional_Bidirectional extends BaseAdapter3D {
4524
4524
  } = MeasurementGroup;
4525
4525
  const longAxisNUMGroup = toArray(ContentSequence).find(group => group.ConceptNameCodeSequence.CodeMeaning === Bidirectional_LONG_AXIS);
4526
4526
  const shortAxisNUMGroup = toArray(ContentSequence).find(group => group.ConceptNameCodeSequence.CodeMeaning === Bidirectional_SHORT_AXIS);
4527
- const longAxisScoordGroup = toArray(longAxisNUMGroup.ContentSequence).find(group => group.ValueType === "SCOORD3D" || group.ValueType === "SCOORD");
4528
- const shortAxisScoordGroup = toArray(shortAxisNUMGroup.ContentSequence).find(group => group.ValueType === "SCOORD3D" || group.ValueType === "SCOORD");
4527
+ const longAxisScoordGroup = toArray(longAxisNUMGroup.ContentSequence).find(group => group.ValueType === 'SCOORD3D' || group.ValueType === 'SCOORD');
4528
+ const shortAxisScoordGroup = toArray(shortAxisNUMGroup.ContentSequence).find(group => group.ValueType === 'SCOORD3D' || group.ValueType === 'SCOORD');
4529
4529
  const worldCoords = [];
4530
4530
  worldCoords.push(...scoordToWorld(scoordArgs, longAxisScoordGroup));
4531
4531
  worldCoords.push(...scoordToWorld(scoordArgs, shortAxisScoordGroup));
@@ -4613,7 +4613,7 @@ class Bidirectional_Bidirectional extends BaseAdapter3D {
4613
4613
  }
4614
4614
  _Bidirectional = Bidirectional_Bidirectional;
4615
4615
  (() => {
4616
- _Bidirectional.init("Bidirectional", Bidirectional_TID300Bidirectional);
4616
+ _Bidirectional.init('Bidirectional', Bidirectional_TID300Bidirectional);
4617
4617
  _Bidirectional.registerLegacy();
4618
4618
  })();
4619
4619
 
@@ -4697,7 +4697,7 @@ class Angle_Angle extends BaseAdapter3D {
4697
4697
  }
4698
4698
  _Angle = Angle_Angle;
4699
4699
  (() => {
4700
- _Angle.init("Angle", Angle_TID300CobbAngle);
4700
+ _Angle.init('Angle', Angle_TID300CobbAngle);
4701
4701
  _Angle.registerLegacy();
4702
4702
  })();
4703
4703
 
@@ -4781,7 +4781,7 @@ class CobbAngle_CobbAngle extends BaseAdapter3D {
4781
4781
  }
4782
4782
  _CobbAngle = CobbAngle_CobbAngle;
4783
4783
  (() => {
4784
- _CobbAngle.init("CobbAngle", CobbAngle_TID300CobbAngle);
4784
+ _CobbAngle.init('CobbAngle', CobbAngle_TID300CobbAngle);
4785
4785
  _CobbAngle.registerLegacy();
4786
4786
  })();
4787
4787
 
@@ -4792,7 +4792,7 @@ function extractAllNUMGroups(MeasurementGroup, referencedSOPInstanceUID) {
4792
4792
  const numGroupsBySOPInstanceUID = {};
4793
4793
  if (MeasurementGroup.ContentSequence) {
4794
4794
  MeasurementGroup.ContentSequence.forEach(item => {
4795
- if (item.ValueType === "NUM" && item.ConceptNameCodeSequence) {
4795
+ if (item.ValueType === 'NUM' && item.ConceptNameCodeSequence) {
4796
4796
  var _item$MeasuredValueSe, _item$MeasuredValueSe2;
4797
4797
  const codeMeaning = item.ConceptNameCodeSequence.CodeMeaning;
4798
4798
  const numericValue = (_item$MeasuredValueSe = item.MeasuredValueSequence) === null || _item$MeasuredValueSe === void 0 ? void 0 : _item$MeasuredValueSe.NumericValue;
@@ -4803,7 +4803,7 @@ function extractAllNUMGroups(MeasurementGroup, referencedSOPInstanceUID) {
4803
4803
  }
4804
4804
  numGroupsBySOPInstanceUID[referencedSOPInstanceUID][codeMeaning] = {
4805
4805
  value: numericValue,
4806
- unit: unitCode || ""
4806
+ unit: unitCode || ''
4807
4807
  };
4808
4808
  }
4809
4809
  }
@@ -4813,22 +4813,22 @@ function extractAllNUMGroups(MeasurementGroup, referencedSOPInstanceUID) {
4813
4813
  }
4814
4814
  function restoreAdditionalMetrics(numGroups) {
4815
4815
  const additionalMetrics = {};
4816
- let modalityUnit = "";
4816
+ let modalityUnit = '';
4817
4817
  const metricMapping = {
4818
- Mean: "mean",
4819
- "Standard Deviation": "stdDev",
4820
- Maximum: "max",
4821
- Minimum: "min",
4822
- Area: "area",
4823
- Radius: "radius",
4824
- Perimeter: "perimeter",
4825
- Length: "length",
4826
- Width: "width"
4818
+ Mean: 'mean',
4819
+ 'Standard Deviation': 'stdDev',
4820
+ Maximum: 'max',
4821
+ Minimum: 'min',
4822
+ Area: 'area',
4823
+ Radius: 'radius',
4824
+ Perimeter: 'perimeter',
4825
+ Length: 'length',
4826
+ Width: 'width'
4827
4827
  };
4828
4828
  const unitCategory = {
4829
- area: "areaUnit",
4830
- radius: "radiusUnit",
4831
- width: "widthUnit"
4829
+ area: 'areaUnit',
4830
+ radius: 'radiusUnit',
4831
+ width: 'widthUnit'
4832
4832
  };
4833
4833
  for (const [codeMeaning, metricKey] of Object.entries(metricMapping)) {
4834
4834
  const group = numGroups[codeMeaning];
@@ -4963,7 +4963,7 @@ class CircleROI extends BaseAdapter3D {
4963
4963
  }
4964
4964
  _CircleROI = CircleROI;
4965
4965
  (() => {
4966
- _CircleROI.init("CircleROI", CircleROI_TID300Circle);
4966
+ _CircleROI.init('CircleROI', CircleROI_TID300Circle);
4967
4967
  _CircleROI.registerLegacy();
4968
4968
  })();
4969
4969
 
@@ -5077,7 +5077,7 @@ class EllipticalROI extends BaseAdapter3D {
5077
5077
  }
5078
5078
  }
5079
5079
  _EllipticalROI = EllipticalROI;
5080
- _EllipticalROI.init("EllipticalROI", EllipticalROI_TID300Ellipse);
5080
+ _EllipticalROI.init('EllipticalROI', EllipticalROI_TID300Ellipse);
5081
5081
 
5082
5082
 
5083
5083
 
@@ -5196,7 +5196,7 @@ function Length_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
5196
5196
  const {
5197
5197
  Length: Length_TID300Length
5198
5198
  } = dcmjs_es/* utilities */.BF.TID300;
5199
- const Length_LENGTH = "Length";
5199
+ const Length_LENGTH = 'Length';
5200
5200
  class Length_Length extends BaseAdapter3D {
5201
5201
  static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata) {
5202
5202
  const {
@@ -5516,7 +5516,7 @@ const {
5516
5516
  class Probe extends BaseAdapter3D {
5517
5517
  static isValidMeasurement(measurement) {
5518
5518
  const graphicItem = this.getGraphicItem(measurement);
5519
- return this.getGraphicType(graphicItem) === "POINT" && this.getPointsCount(graphicItem) <= 2;
5519
+ return this.getGraphicType(graphicItem) === 'POINT' && this.getPointsCount(graphicItem) <= 2;
5520
5520
  }
5521
5521
  static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, _trackingIdentifier) {
5522
5522
  var _NUMGroup$MeasuredVal, _NUMGroup$MeasuredVal2;
@@ -5577,10 +5577,10 @@ class Probe extends BaseAdapter3D {
5577
5577
  }
5578
5578
  _Probe = Probe;
5579
5579
  (() => {
5580
- _Probe.init("Probe", Probe_TID300Point);
5580
+ _Probe.init('Probe', Probe_TID300Point);
5581
5581
  _Probe.registerLegacy();
5582
- _Probe.registerType("DCM:111030", "POINT", 1);
5583
- _Probe.registerType("DCM:111030", "POINT", 2);
5582
+ _Probe.registerType('DCM:111030', 'POINT', 1);
5583
+ _Probe.registerType('DCM:111030', 'POINT', 2);
5584
5584
  })();
5585
5585
 
5586
5586
 
@@ -5630,7 +5630,7 @@ class UltrasoundDirectional extends BaseAdapter3D {
5630
5630
  referencedImageId
5631
5631
  } = metadata;
5632
5632
  if (!referencedImageId) {
5633
- throw new Error("UltrasoundDirectionalTool.getTID300RepresentationArguments: referencedImageId is not defined");
5633
+ throw new Error('UltrasoundDirectionalTool.getTID300RepresentationArguments: referencedImageId is not defined');
5634
5634
  }
5635
5635
  const start = worldToImageCoords(referencedImageId, handles.points[0]);
5636
5636
  const end = worldToImageCoords(referencedImageId, handles.points[1]);
@@ -5652,7 +5652,7 @@ class UltrasoundDirectional extends BaseAdapter3D {
5652
5652
  }
5653
5653
  }
5654
5654
  _UltrasoundDirectional = UltrasoundDirectional;
5655
- _UltrasoundDirectional.init("UltrasoundDirectionalTool", UltrasoundDirectional_TID300Length);
5655
+ _UltrasoundDirectional.init('UltrasoundDirectionalTool', UltrasoundDirectional_TID300Length);
5656
5656
 
5657
5657
 
5658
5658
 
@@ -5907,11 +5907,11 @@ async function createLabelmapsFromBufferInternal(referencedImageIds, arrayBuffer
5907
5907
  const dataset = labelmapImagesFromBuffer_DicomMetaDictionary.naturalizeDataset(dicomData.dict);
5908
5908
  dataset._meta = labelmapImagesFromBuffer_DicomMetaDictionary.namifyDataset(dicomData.meta);
5909
5909
  const multiframe = labelmapImagesFromBuffer_Normalizer.normalizeToDataset([dataset]);
5910
- const imagePlaneModule = metadataProvider.get("imagePlaneModule", referencedImageIds[0]);
5911
- const generalSeriesModule = metadataProvider.get("generalSeriesModule", referencedImageIds[0]);
5910
+ const imagePlaneModule = metadataProvider.get('imagePlaneModule', referencedImageIds[0]);
5911
+ const generalSeriesModule = metadataProvider.get('generalSeriesModule', referencedImageIds[0]);
5912
5912
  const SeriesInstanceUID = generalSeriesModule.seriesInstanceUID;
5913
5913
  if (!imagePlaneModule) {
5914
- console.warn("Insufficient metadata, imagePlaneModule missing.");
5914
+ console.warn('Insufficient metadata, imagePlaneModule missing.');
5915
5915
  }
5916
5916
  const ImageOrientationPatient = Array.isArray(imagePlaneModule.rowCosines) ? [...imagePlaneModule.rowCosines, ...imagePlaneModule.columnCosines] : [imagePlaneModule.rowCosines.x, imagePlaneModule.rowCosines.y, imagePlaneModule.rowCosines.z, imagePlaneModule.columnCosines.x, imagePlaneModule.columnCosines.y, imagePlaneModule.columnCosines.z];
5917
5917
  const validOrientations = Segmentation_4X_getValidOrientations(ImageOrientationPatient);
@@ -5919,11 +5919,11 @@ async function createLabelmapsFromBufferInternal(referencedImageIds, arrayBuffer
5919
5919
  const TransferSyntaxUID = multiframe._meta.TransferSyntaxUID.Value[0];
5920
5920
  let pixelData;
5921
5921
  let pixelDataChunks;
5922
- if (TransferSyntaxUID === "1.2.840.10008.1.2.5") {
5922
+ if (TransferSyntaxUID === '1.2.840.10008.1.2.5') {
5923
5923
  const rleEncodedFrames = Array.isArray(multiframe.PixelData) ? multiframe.PixelData : [multiframe.PixelData];
5924
5924
  pixelData = labelmapImagesFromBuffer_decode(rleEncodedFrames, multiframe.Rows, multiframe.Columns);
5925
5925
  if (multiframe.BitsStored === 1) {
5926
- console.warn("No implementation for rle + bit packing.");
5926
+ console.warn('No implementation for rle + bit packing.');
5927
5927
  return;
5928
5928
  }
5929
5929
  pixelDataChunks = [pixelData];
@@ -5932,26 +5932,26 @@ async function createLabelmapsFromBufferInternal(referencedImageIds, arrayBuffer
5932
5932
  maxBytesPerChunk
5933
5933
  });
5934
5934
  if (!pixelDataChunks) {
5935
- throw new Error("Fractional segmentations are not yet supported");
5935
+ throw new Error('Fractional segmentations are not yet supported');
5936
5936
  }
5937
5937
  }
5938
5938
  const orientation = checkOrientation(multiframe, validOrientations, [imagePlaneModule.rows, imagePlaneModule.columns, referencedImageIds.length], tolerance);
5939
5939
  const sopUIDImageIdIndexMap = referencedImageIds.reduce((acc, imageId) => {
5940
5940
  const {
5941
5941
  sopInstanceUID
5942
- } = metadataProvider.get("generalImageModule", imageId);
5942
+ } = metadataProvider.get('generalImageModule', imageId);
5943
5943
  acc[sopInstanceUID] = imageId;
5944
5944
  return acc;
5945
5945
  }, {});
5946
5946
  let insertFunction;
5947
5947
  switch (orientation) {
5948
- case "Planar":
5948
+ case 'Planar':
5949
5949
  insertFunction = labelmapImagesFromBuffer_insertPixelDataPlanar;
5950
5950
  break;
5951
- case "Perpendicular":
5952
- throw new Error("Segmentations orthogonal to the acquisition plane of the source data are not yet supported.");
5953
- case "Oblique":
5954
- throw new Error("Segmentations oblique to the acquisition plane of the source data are not yet supported.");
5951
+ case 'Perpendicular':
5952
+ throw new Error('Segmentations orthogonal to the acquisition plane of the source data are not yet supported.');
5953
+ case 'Oblique':
5954
+ throw new Error('Segmentations oblique to the acquisition plane of the source data are not yet supported.');
5955
5955
  }
5956
5956
  const segmentsOnFrame = [];
5957
5957
  const imageIdMaps = {
@@ -5962,7 +5962,7 @@ async function createLabelmapsFromBufferInternal(referencedImageIds, arrayBuffer
5962
5962
  for (let i = 0; i < referencedImageIds.length; i++) {
5963
5963
  const referenceImageId = referencedImageIds[i];
5964
5964
  imageIdMaps.indices[referenceImageId] = i;
5965
- imageIdMaps.metadata[referenceImageId] = metadataProvider.get("instance", referenceImageId);
5965
+ imageIdMaps.metadata[referenceImageId] = metadataProvider.get('instance', referenceImageId);
5966
5966
  const labelMapImage = esm.imageLoader.createAndCacheDerivedLabelmapImage(referenceImageId);
5967
5967
  labelMapImages.push(labelMapImage);
5968
5968
  }
@@ -6037,23 +6037,23 @@ function labelmapImagesFromBuffer_insertPixelDataPlanar(_ref4) {
6037
6037
  const pixelDataI2D = ndarray_default()(view, [Rows, Columns]);
6038
6038
  const alignedPixelDataI = Segmentation_4X_alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
6039
6039
  if (!alignedPixelDataI) {
6040
- throw new Error("Individual SEG frames are out of plane with respect to the first SEG frame. " + "This is not yet supported. Aborting segmentation loading.");
6040
+ throw new Error('Individual SEG frames are out of plane with respect to the first SEG frame. ' + 'This is not yet supported. Aborting segmentation loading.');
6041
6041
  }
6042
6042
  const segmentIndex = getSegmentIndex(multiframe, i);
6043
6043
  if (segmentIndex === undefined) {
6044
- throw new Error("Could not retrieve the segment index. Aborting segmentation loading.");
6044
+ throw new Error('Could not retrieve the segment index. Aborting segmentation loading.');
6045
6045
  }
6046
6046
  if (!segmentsPixelIndices.has(segmentIndex)) {
6047
6047
  segmentsPixelIndices.set(segmentIndex, {});
6048
6048
  }
6049
6049
  const imageId = findReferenceSourceImageId(multiframe, i, referencedImageIds, metadataProvider, tolerance, sopUIDImageIdIndexMap);
6050
6050
  if (!imageId) {
6051
- console.warn("Image not present in stack, can't import frame : " + i + ".");
6051
+ console.warn("Image not present in stack, can't import frame : " + i + '.');
6052
6052
  return;
6053
6053
  }
6054
6054
  const sourceImageMetadata = imageIdMaps.metadata[imageId];
6055
6055
  if (Rows !== sourceImageMetadata.Rows || Columns !== sourceImageMetadata.Columns) {
6056
- throw new Error("Individual SEG frames have different geometry dimensions (Rows and Columns) " + "respect to the source image reference frame. This is not yet supported. " + "Aborting segmentation loading. ");
6056
+ throw new Error('Individual SEG frames have different geometry dimensions (Rows and Columns) ' + 'respect to the source image reference frame. This is not yet supported. ' + 'Aborting segmentation loading. ');
6057
6057
  }
6058
6058
  const imageIdIndex = imageIdMaps.indices[imageId];
6059
6059
  const labelmapImage = labelMapImages[imageIdIndex];
@@ -6122,7 +6122,7 @@ function labelmapImagesFromBuffer_insertPixelDataPlanar(_ref4) {
6122
6122
  const pixelDataI2D = ndarray_default()(view, [Rows, Columns]);
6123
6123
  const alignedPixelDataI = Segmentation_4X_alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
6124
6124
  if (!alignedPixelDataI) {
6125
- throw new Error("Individual Labelmap SEG frames are out of plane with respect to the first SEG frame. " + "This is not yet supported. Aborting segmentation loading.");
6125
+ throw new Error('Individual Labelmap SEG frames are out of plane with respect to the first SEG frame. ' + 'This is not yet supported. Aborting segmentation loading.');
6126
6126
  }
6127
6127
  const imageId = findReferenceSourceImageId(multiframe, i, referencedImageIds, metadataProvider, tolerance, sopUIDImageIdIndexMap);
6128
6128
  if (!imageId) {
@@ -6131,7 +6131,7 @@ function labelmapImagesFromBuffer_insertPixelDataPlanar(_ref4) {
6131
6131
  }
6132
6132
  const sourceImageMetadata = imageIdMaps.metadata[imageId];
6133
6133
  if (Rows !== sourceImageMetadata.Rows || Columns !== sourceImageMetadata.Columns) {
6134
- throw new Error("Individual Labelmap SEG frames have different geometry dimensions (Rows and Columns) " + "respect to the source image reference frame. This is not yet supported. " + "Aborting segmentation loading. ");
6134
+ throw new Error('Individual Labelmap SEG frames have different geometry dimensions (Rows and Columns) ' + 'respect to the source image reference frame. This is not yet supported. ' + 'Aborting segmentation loading. ');
6135
6135
  }
6136
6136
  const imageIdIndex = imageIdMaps.indices[imageId];
6137
6137
  const labelmapImage = labelMapImages[imageIdIndex];
@@ -6173,7 +6173,7 @@ function labelmapImagesFromBuffer_insertPixelDataPlanar(_ref4) {
6173
6173
  });
6174
6174
  }
6175
6175
  };
6176
- if (multiframe.SegmentationType === "LABELMAP") {
6176
+ if (multiframe.SegmentationType === 'LABELMAP') {
6177
6177
  processLabelmapChunk(0);
6178
6178
  } else {
6179
6179
  processChunk(0);
@@ -6197,7 +6197,7 @@ const getAlignedPixelData = _ref5 => {
6197
6197
  const pixelDataI2D = ndarray_default()(view, [Rows, Columns]);
6198
6198
  const alignedPixelDataI = Segmentation_4X_alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
6199
6199
  if (!alignedPixelDataI) {
6200
- throw new Error("Individual SEG frames are out of plane with respect to the first SEG frame. " + "This is not yet supported. Aborting segmentation loading.");
6200
+ throw new Error('Individual SEG frames are out of plane with respect to the first SEG frame. ' + 'This is not yet supported. Aborting segmentation loading.');
6201
6201
  }
6202
6202
  return alignedPixelDataI;
6203
6203
  };
@@ -6208,9 +6208,9 @@ const checkImageDimensions = _ref6 => {
6208
6208
  Rows,
6209
6209
  Columns
6210
6210
  } = _ref6;
6211
- const sourceImageMetadata = metadataProvider.get("instance", imageId);
6211
+ const sourceImageMetadata = metadataProvider.get('instance', imageId);
6212
6212
  if (Rows !== sourceImageMetadata.Rows || Columns !== sourceImageMetadata.Columns) {
6213
- throw new Error("Individual SEG frames have different geometry dimensions (Rows and Columns) " + "respect to the source image reference frame. This is not yet supported. " + "Aborting segmentation loading. ");
6213
+ throw new Error('Individual SEG frames have different geometry dimensions (Rows and Columns) ' + 'respect to the source image reference frame. This is not yet supported. ' + 'Aborting segmentation loading. ');
6214
6214
  }
6215
6215
  };
6216
6216
  const getArrayOfLabelMapImagesWithSegmentData = _ref7 => {
@@ -6911,7 +6911,7 @@ class KeyImage extends Probe {
6911
6911
  const {
6912
6912
  data
6913
6913
  } = baseData.annotation;
6914
- data.isPoint = trackingIdentifier.indexOf("Point") !== -1;
6914
+ data.isPoint = trackingIdentifier.indexOf('Point') !== -1;
6915
6915
  return baseData;
6916
6916
  }
6917
6917
  static getTID300RepresentationArguments(tool) {
@@ -6939,7 +6939,7 @@ class KeyImage extends Probe {
6939
6939
  }
6940
6940
  }
6941
6941
  _KeyImage = KeyImage;
6942
- _KeyImage.init("KeyImage", KeyImage_TID300Point, {
6942
+ _KeyImage.init('KeyImage', KeyImage_TID300Point, {
6943
6943
  parentType: Probe.toolType
6944
6944
  });
6945
6945
  _KeyImage.trackingSeriesIdentifier = "".concat(_KeyImage.trackingIdentifierTextValue, ":Series");
@@ -10792,7 +10792,7 @@ function commandsModule({
10792
10792
  // get the active segmentIndex bidirectional annotation and jump to it
10793
10793
  const activeBidirectional = bidirectionalData.find(measurement => measurement.segmentIndex === targetIndex);
10794
10794
  commandsManager.run('jumpToMeasurement', {
10795
- uid: activeBidirectional.annotationUID
10795
+ uid: activeBidirectional?.annotationUID
10796
10796
  });
10797
10797
  },
10798
10798
  interpolateLabelmap: () => {
@@ -11092,6 +11092,9 @@ function commandsModule({
11092
11092
  uid,
11093
11093
  displayMeasurements = []
11094
11094
  }) => {
11095
+ if (!uid) {
11096
+ return;
11097
+ }
11095
11098
  measurementService.jumpToMeasurement(viewportGridService.getActiveViewportId(), uid);
11096
11099
  for (const measurement of displayMeasurements) {
11097
11100
  measurement.isActive = measurement.uid === uid;
@@ -3099,8 +3099,11 @@ function hasNaNValues(input) {
3099
3099
  /* harmony export */ A: () => (/* binding */ imageIdToURI)
3100
3100
  /* harmony export */ });
3101
3101
  function imageIdToURI(imageId) {
3102
+ if (!imageId) {
3103
+ return '';
3104
+ }
3102
3105
  const colonIndex = imageId.indexOf(':');
3103
- return imageId.substring(colonIndex + 1);
3106
+ return colonIndex === -1 ? imageId : imageId.substring(colonIndex + 1);
3104
3107
  }
3105
3108
 
3106
3109