code: function removeEnabledElementCallback(enabledElement) {
    if (!external.cornerstone) {
      return;
    }
  
    const cornerstoneEnabledElement = external.cornerstone.getEnabledElement(
      enabledElement
    );
  
    const enabledElementUID = cornerstoneEnabledElement.uuid;
    const colormap = external.cornerstone.colors.getColormap(state.colorMapId);
    const numberOfColors = colormap.getNumberOfColors();
  
    // Remove enabledElement specific data.
    delete state.visibleSegmentations[enabledElementUID];
    delete state.imageBitmapCache[enabledElementUID];
  }
docs: RemoveEnabledElementCallback - Element specific memory cleanup.
  @public
  @param  {Object} enabledElement  The element being removed.
  @returns {void}
   TODO -> Test this before adding it to the module.