<commit_before>from __future__ import absolute_import, division, print_function

import os

from glue.external.modest_image import imshow
from glue.external.qt.QtCore import Qt
from glue.external.qt import QtGui, QtCore
from glue.core.callback_property import add_callback, delay_callback
from glue import core
from glue.viewers.image.ds9norm import DS9Normalize
from glue.viewers.image.client import MplImageClient
from glue.viewers.common.qt.toolbar import GlueToolbar
from glue.viewers.common.qt.mouse_mode import (RectangleMode, CircleMode, PolyMode,
                                ContrastMode)
from glue.icons.qt import get_icon
from glue.utils.qt.widget_properties import CurrentComboProperty, ButtonProperty, connect_current_combo, _find_combo_data
from glue.viewers.common.qt.data_slice_widget import DataSlice
from glue.viewers.common.qt.data_viewer import DataViewer
from glue.viewers.common.qt.mpl_widget import MplWidget, defer_draw
from glue.utils import nonpartial, Pointer
from glue.utils.qt import cmap2pixmap, update_combobox, load_ui

WARN_THRESH = 10000000  # warn when contouring large images

__all__ = ['ImageWidget', 'StandaloneImageWidget', 'ImageWidgetBase']


class ImageWidgetBase(DataViewer):

    """
    Widget for ImageClient<commit_msg>Make sure RGBEdit is loaded when using the image viewer<commit_after>from __future__ import absolute_import, division, print_function

import os

from glue.external.modest_image import imshow
from glue.external.qt.QtCore import Qt
from glue.external.qt import QtGui, QtCore
from glue.core.callback_property import add_callback, delay_callback
from glue import core
from glue.viewers.image.ds9norm import DS9Normalize
from glue.viewers.image.client import MplImageClient
from glue.viewers.common.qt.toolbar import GlueToolbar
from glue.viewers.common.qt.mouse_mode import (RectangleMode, CircleMode, PolyMode,
                                ContrastMode)
from glue.icons.qt import get_icon
from glue.utils.qt.widget_properties import CurrentComboProperty, ButtonProperty, connect_current_combo, _find_combo_data
from glue.viewers.common.qt.data_slice_widget import DataSlice
from glue.viewers.common.qt.data_viewer import DataViewer
from glue.viewers.common.qt.mpl_widget import MplWidget, defer_draw
from glue.utils import nonpartial, Pointer
from glue.utils.qt import cmap2pixmap, update_combobox, load_ui

# We do the following import to register the custom Qt Widget there
from glue.viewers.image.qt.rgb_edit import RGBEdit  # pylint: disable=W0611

WARN_THRESH = 10000000  # warn when contouring large images

__all__ = ['ImageWidget', 'StandaloneImageWidget', 'ImageWidgetBase']


class ImageWidgetBase(DataViewer):

    """
    Widget for ImageClient
{'fraction_non_alphanumeric': 0.06233956729006234, 'fraction_numerical': 0.009534286762009535, 'mean_word_length': 5.433962264150943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6329872', 'n_tokens_mistral': 848, 'n_tokens_neox': 785, 'n_words': 226}