How to use react-vtkjs-viewport - 6 common examples

To help you get started, we’ve selected a few react-vtkjs-viewport 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 / extensions / vtk / src / OHIFVTKViewport.js View on Github external
loadProgressively(imageDataObject) {
    loadImageData(imageDataObject);

    const { isLoading, insertPixelDataPromises } = imageDataObject;

    const numberOfFrames = insertPixelDataPromises.length;

    if (!isLoading) {
      this.setState({ isLoaded: true });
      return;
    }

    insertPixelDataPromises.forEach(promise => {
      promise.then(numberProcessed => {
        const percentComplete = Math.floor(
          (numberProcessed * 100) / numberOfFrames
        );
github OHIF / Viewers / extensions / vtk / src / OHIFVTKViewport.js View on Github external
stack.imageIds,
          displaySetInstanceUid
        );

        imageDataObject = data.referenceDataObject;
        labelmapDataObject = data.labelmapDataObject;

        return loadImageData(imageDataObject).then(() => {
          return {
            data: imageDataObject.vtkImageData,
            labelmap: labelmapDataObject,
          };
        });
        */
      default:
        imageDataObject = getImageData(stack.imageIds, displaySetInstanceUid);

        return imageDataObject;
    }
  };
github OHIF / Viewers / extensions / vtk / src / commandsModule.js View on Github external
apis.forEach((api, apiIndex) => {
        const istyle = vtkInteractorStyleMPRCrosshairs.newInstance();

        api.setInteractorStyle({
          istyle,
          configuration: { apis, apiIndex },
        });
      });
    },
github OHIF / Viewers / extensions / vtk / src / commandsModule.js View on Github external
apis.forEach(api => {
        const istyle = vtkInteractorStyleMPRRotate.newInstance();

        api.setInteractorStyle({ istyle });
      });
    },
github OHIF / Viewers / extensions / vtk / src / commandsModule.js View on Github external
apis.forEach(api => {
        const istyle = vtkInteractorStyleMPRWindowLevel.newInstance();

        api.setInteractorStyle({ istyle, callbacks });
      });
    },
github OHIF / Viewers / extensions / vtk / src / commandsModule.js View on Github external
apis.forEach((api, apiIndex) => {
        api.addSVGWidget(
          vtkSVGCrosshairsWidget.newInstance(),
          'crosshairsWidget'
        );

        const istyle = vtkInteractorStyleMPRCrosshairs.newInstance();

        api.setInteractorStyle({
          istyle,
          configuration: { apis, apiIndex },
        });
      });
    },