How to use the @ohif/core.log function in @ohif/core

To help you get started, we’ve selected a few @ohif/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OHIF / Viewers / platform / viewer / src / connectedComponents / Viewer.js View on Github external
retrieveTimepoints = filter => {
    OHIF.log.info('retrieveTimepoints');

    // Get the earliest and latest study date
    let earliestDate = new Date().toISOString();
    let latestDate = new Date().toISOString();
    if (this.props.studies) {
      latestDate = new Date('1000-01-01').toISOString();
      this.props.studies.forEach(study => {
        const studyDate = moment(study.studyDate, 'YYYYMMDD').toISOString();
        if (studyDate < earliestDate) {
          earliestDate = studyDate;
        }
        if (studyDate > latestDate) {
          latestDate = studyDate;
        }
      });
    }
github OHIF / Viewers / platform / viewer / src / appExtensions / MeasurementsPanel / ConnectedMeasurementTable.js View on Github external
dispatchRelabel: (event, measurementData, viewportsState) => {
      event.persist();

      const activeViewportIndex =
        (viewportsState && viewportsState.activeViewportIndex) || 0;

      const enabledElements = cornerstone.getEnabledElements();
      if (!enabledElements || enabledElements.length <= activeViewportIndex) {
        OHIF.log.error('Failed to find the enabled element');
        return;
      }

      const { toolType, measurementId } = measurementData;
      const tool = MeasurementApi.Instance.tools[toolType].find(measurement => {
        return measurement._id === measurementId;
      });

      // Clone the tool not to set empty location initially
      const toolForLocation = Object.assign({}, tool, { location: null });

      if (ownProps.onRelabel) {
        ownProps.onRelabel(toolForLocation);
      }
    },
    dispatchEditDescription: (event, measurementData, viewportsState) => {
github OHIF / Viewers / platform / viewer / src / connectedComponents / Viewer.js View on Github external
storeTimepoints = timepointData => {
    OHIF.log.info('storeTimepoints');
    return Promise.resolve();
  };