@cornerstonejs/adapters 0.4.0 → 0.4.1

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.
@@ -3531,21 +3531,26 @@ var MeasurementReport = /** @class */ (function () {
3531
3531
  });
3532
3532
  measurementGroups.forEach(function (measurementGroup) {
3533
3533
  var _a;
3534
- var measurementGroupContentSequence = toArray(measurementGroup.ContentSequence);
3535
- var TrackingIdentifierGroup = measurementGroupContentSequence.find(function (contentItem) {
3536
- return contentItem.ConceptNameCodeSequence.CodeMeaning ===
3537
- TRACKING_IDENTIFIER;
3538
- });
3539
- var TrackingIdentifierValue = TrackingIdentifierGroup.TextValue;
3540
- var toolClass = ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.getToolClass) === null || _a === void 0 ? void 0 : _a.call(hooks, measurementGroup, dataset, registeredToolClasses)) ||
3541
- registeredToolClasses.find(function (tc) {
3542
- return tc.isValidCornerstoneTrackingIdentifier(TrackingIdentifierValue);
3534
+ try {
3535
+ var measurementGroupContentSequence = toArray(measurementGroup.ContentSequence);
3536
+ var TrackingIdentifierGroup = measurementGroupContentSequence.find(function (contentItem) {
3537
+ return contentItem.ConceptNameCodeSequence.CodeMeaning ===
3538
+ TRACKING_IDENTIFIER;
3543
3539
  });
3544
- if (toolClass) {
3545
- var measurement = toolClass.getMeasurementData(measurementGroup, sopInstanceUIDToImageIdMap, imageToWorldCoords, metadata);
3546
- console.log("=== ".concat(toolClass.toolType, " ==="));
3547
- console.log(measurement);
3548
- measurementData[toolClass.toolType].push(measurement);
3540
+ var TrackingIdentifierValue_1 = TrackingIdentifierGroup.TextValue;
3541
+ var toolClass = ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.getToolClass) === null || _a === void 0 ? void 0 : _a.call(hooks, measurementGroup, dataset, registeredToolClasses)) ||
3542
+ registeredToolClasses.find(function (tc) {
3543
+ return tc.isValidCornerstoneTrackingIdentifier(TrackingIdentifierValue_1);
3544
+ });
3545
+ if (toolClass) {
3546
+ var measurement = toolClass.getMeasurementData(measurementGroup, sopInstanceUIDToImageIdMap, imageToWorldCoords, metadata);
3547
+ console.log("=== ".concat(toolClass.toolType, " ==="));
3548
+ console.log(measurement);
3549
+ measurementData[toolClass.toolType].push(measurement);
3550
+ }
3551
+ }
3552
+ catch (e) {
3553
+ console.warn("Unable to generate tool state for", measurementGroup, e);
3549
3554
  }
3550
3555
  });
3551
3556
  // NOTE: There is no way of knowing the cornerstone imageIds as that could be anything.