src/mixins/segmentation/circleSegmentationMixin.js
/**
 * Render hook: draws the Scissors's outline, box, or circle
 *
 * @param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
 * @memberof Tools.ScissorsTool
 * @returns {void}
 */
Render hook: draws the Scissors's outline, box, or circle
@param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
@memberof Tools.ScissorsTool
@returns {void}
Render hook : draws the Scissors ' s outline box or circle @param { Object } evt Cornerstone . event#cornerstoneimagerendered > cornerstoneimagerendered event @memberof Tools . ScissorsTool @returns { void }
function renderToolData(evt) {
  const eventData = evt.detail;
  const { element } = eventData;
  const color = getters.brushColor(element, true);
  const context = getNewContext(eventData.canvasContext.canvas);
  const { distance } = external.cornerstoneMath.point;
  draw(context, context => {
    if (!this.handles) {
      return null;
    }
    const startCanvas = external.cornerstone.pixelToCanvas(
      element,
      this.handles.start
    );
    const endCanvas = external.cornerstone.pixelToCanvas(
      element,
      this.handles.end
    );
    const radius = distance(startCanvas, endCanvas);
    drawCircle(context, element, this.handles.start, radius, { color });
  });
}
function renderToolData ( evt ) { const eventData = evt . detail ; const { element } = eventData ; const color = getters . brushColor ( element , true ) ; const context = getNewContext ( eventData . canvasContext . canvas ) ; const { distance } = external . cornerstoneMath . point ; draw ( context , context => { if ( ! this . handles ) { return null ; } const startCanvas = external . cornerstone . pixelToCanvas ( element , this . handles . start ) ; const endCanvas = external . cornerstone . pixelToCanvas ( element , this . handles . end ) ; const radius = distance ( startCanvas , endCanvas ) ; drawCircle ( context , element , this . handles . start , radius , { color } ) ; } ) ; }
Render hook: draws the Scissors's outline, box, or circle
 @param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
 @memberof Tools.ScissorsTool
 @returns {void}
Render hook : draws the Scissors ' s outline box or circle @param { Object } evt Cornerstone . event#cornerstoneimagerendered > cornerstoneimagerendered event @memberof Tools . ScissorsTool @returns { void }
// Calculating the radius where startCanvas is the center of the circle to be drawn // Draw Circle