Измерения не отображаются в OHIF

Я создаю реализацию DICOM web и указываю на нее обычную программу просмотра OHIF. Что-то, что происходит в пользовательском интерфейсе, препятствует сохранению любых измерений в средстве просмотра OHIF. Итак, прежде чем веб-сайт dicom имеет к этому какое-либо отношение, у меня возникла проблема с самим средством просмотра в javascript. Я получаю следующие ошибки:

      DevTools failed to load source map: Could not parse content for http://localhost:8800/index.umd.js.map: Unexpected token < in JSON at position 0

и

      Failed to map 'CornerstoneTools@4' measurement for definition stack: Cannot read property 'toMeasurementSchema' of undefined

и

      Failed to map 'CornerstoneTools@4' measurement for definition stackPrefetch: Cannot read property 'toMeasurementSchema' of undefined

Проблема toMeasurementSchema возникает в функции OHIF, которая определяется следующим образом:

      function addOrUpdate(source, definition, sourceMeasurement) {
    if (!this._isValidSource(source)) {
        log["a" /* default */].warn('Invalid source. Exiting early.');
        return;
    }

    var sourceInfo = this._getSourceInfo(source);

    if (!definition) {
        console.log('TEST');
        log["a" /* default */].warn('No source definition provided. Exiting early.');
        return;
    }

    if (!this._sourceHasMappings(source)) {
        log["a" /* default */].warn("No measurement mappings found for '".concat(sourceInfo, "' source. Exiting early."));
        return;
    }

    var measurement = {};

    try {
        var sourceMappings = this.mappings[source.id];

        var _sourceMappings$find = sourceMappings.find(function (mapping) {
            return mapping.definition === definition;
        }),
        toMeasurementSchema = _sourceMappings$find.toMeasurementSchema;
        /* Convert measurement */

        measurement = toMeasurementSchema(sourceMeasurement);
        /* Assign measurement source instance */

        measurement.source = source;
    } catch (error) {
        log["a" /* default */].warn("Failed to map '".concat(sourceInfo, "' measurement for definition ").concat(definition, ":"), error.message);
        return;
    }

    if (!this._isValidMeasurement(measurement)) {
        log["a" /* default */].warn("Attempting to add or update a invalid measurement provided by '".concat(sourceInfo, "'. Exiting early."));
        return;
    }

    var internalId = sourceMeasurement.id;

    if (!internalId) {
        internalId = Object(guid["a" /* default */])();
        log["a" /* default */].warn("Measurement ID not found. Generating UID: ".concat(internalId));
    }

    var newMeasurement = _objectSpread({}, measurement, {
        modifiedTimestamp: Math.floor(Date.now() / 1000),
        id: internalId
    });

    if (this.measurements[internalId]) {
        log["a" /* default */].info("Measurement already defined. Updating measurement.", newMeasurement);
        this.measurements[internalId] = newMeasurement;

        this._broadcastChange(this.EVENTS.MEASUREMENT_UPDATED, source, newMeasurement);
    } else {
        log["a" /* default */].info("Measurement added.", newMeasurement);
        this.measurements[internalId] = newMeasurement;

        this._broadcastChange(this.EVENTS.MEASUREMENT_ADDED, source, newMeasurement);
    }

    return newMeasurement.id;
  }

Думаю, в настройке что-то упустил? Заранее спасибо!

0 ответов

Другие вопросы по тегам