src/mixins/segmentation/freehandSegmentationMixin.js
/**
 * Render hook: draws the FreehandScissors's outline
 *
 * @param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
 * @memberof Tools.ScissorsTool
 * @returns {void}
 */
Render hook: draws the FreehandScissors's outline
@param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
@memberof Tools.ScissorsTool
@returns {void}
Render hook : draws the FreehandScissors ' s outline @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 points = this.handles.points;
  if (points.length < 2) {
    return;
  }
  draw(context, context => {
    for (let j = 0; j < points.length; j++) {
      const lines = [...points[j].lines];
      if (j === points.length - 1) {
        lines.push(points[0]);
      }
      drawJoinedLines(context, element, points[j], lines, {
        color,
      });
    }
  });
}
function renderToolData ( evt ) { const eventData = evt . detail ; const { element } = eventData ; const color = getters . brushColor ( element , true ) ; const context = getNewContext ( eventData . canvasContext . canvas ) ; const points = this . handles . points ; if ( points . length < 2 ) { return ; } draw ( context , context => { for ( let j = 0 ; j < points . length ; j ++ ) { const lines = [ ... points [ j ] . lines ] ; if ( j === points . length - 1 ) { lines . push ( points [ 0 ] ) ; } drawJoinedLines ( context , element , points [ j ] , lines , { color , } ) ; } } ) ; }
Render hook: draws the FreehandScissors's outline
 @param {Object} evt Cornerstone.event#cornerstoneimagerendered > cornerstoneimagerendered event
 @memberof Tools.ScissorsTool
 @returns {void}
Render hook : draws the FreehandScissors ' s outline @param { Object } evt Cornerstone . event#cornerstoneimagerendered > cornerstoneimagerendered event @memberof Tools . ScissorsTool @returns { void }
// If it's still being actively drawn, keep the last line to // The mouse location