src/util/segmentation/triggerLabelmapModifiedEvent.js
/**
 * Triggers the LABELMAP_MODIFIED event for the active element, providing the labelmapIndex that was modified.
 *
 * @param {HTMLElement} element
 * @param {number} labelmapIndex The labelmapIndex. Defaults to the active for that element if not set.
 */
Triggers the LABELMAP_MODIFIED event for the active element, providing the labelmapIndex that was modified.
@param {HTMLElement} element
@param {number} labelmapIndex The labelmapIndex. Defaults to the active for that element if not set.
Triggers the LABELMAP_MODIFIED event for the active element providing the labelmapIndex that was modified . @param { HTMLElement } element @param { number } labelmapIndex The labelmapIndex . Defaults to the active for that element if not set .
function triggerLabelmapModifiedEvent(element, labelmapIndex) {
  const { getters } = getModule('segmentation');
  labelmapIndex =
    labelmapIndex === undefined
      ? getters.activeLabelmapIndex(element)
      : labelmapIndex;
  external.cornerstone.triggerEvent(element, EVENTS.LABELMAP_MODIFIED, {
    labelmapIndex,
  });
}
function triggerLabelmapModifiedEvent ( element , labelmapIndex ) { const { getters } = getModule ( 'segmentation' ) ; labelmapIndex = labelmapIndex === undefined ? getters . activeLabelmapIndex ( element ) : labelmapIndex ; external . cornerstone . triggerEvent ( element , EVENTS . LABELMAP_MODIFIED , { labelmapIndex , } ) ; }
Triggers the LABELMAP_MODIFIED event for the active element, providing the labelmapIndex that was modified.
Triggers the LABELMAP_MODIFIED event for the active element providing the labelmapIndex that was modified .