Giter Club home page Giter Club logo

cornerstonetools-rotatedellipticalroitool's Introduction

sisobus

cornerstonetools-rotatedellipticalroitool's People

Contributors

sisobus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ranxe jimmiemunyi

cornerstonetools-rotatedellipticalroitool's Issues

Rendering measurement data with cornerstone.

Hello @sisobus, thanks for this great tool.
I am trying to integrate this tool into an application that uses cornerstone already and I have the drawings passed from another API with the points being cx, cy, radiusX, radiusY, and rotation. My question is how can I render these points?
Currently, this is how I do it but can't seem to render it well, the area and other values remain at zero.

  const measurementData = {
    visible: true,
    active: true,
    invalidated: true,
    handles: {
      end: {
        x: cx,
        y: cy,
        highlight: true,
        active: true,
        key: 'end',
      },
      initialRotation: rotation,
      perpendicularPoint: {
        x: radiusX,
        y: radiusY,
        highlight: true,
        active: false,
        isFirst: true,
        key: 'perpendicular',
      },
      textBox: {
        active: false,
        hasMoved: false,
        movesIndependently: false,
        drawnIndependently: true,
        allowedOutsideImage: true,
        hasBoundingBox: true,
      },
    },
  };

 cornerstoneTools.setToolActive('RotatedEllipticalRoi', {
    mouseButtonMask: 1,
  });
  cornerstoneTools.addToolState(
    element,
    'RotatedEllipticalRoi',
    measurementData
  );

This is how it is rendered, any advice to make this work?

image

Drawing manually with the tool does actually produce nice results, as seen here.

image

how to use in ohif viewer?

I want to use this tool in ohif, but don't know how to use it. I would be very grateful if anyone could help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.