docstr: Rebuild the workspace control panel
docstr_tok: ["Rebuild","the","workspace","control","panel"]
code: def set_workspace(self, workspace):
      """Rebuild the workspace control panel"""
      self.workspace = workspace
      self.ignore_redraw = True
  
      try:
          self.update_menu(self.frame.menu_subplots)
          self.update_choices(self.image_rows)
          self.update_choices(self.object_rows)
          self.update_choices(self.mask_rows)
          for measurement_row in self.measurement_rows:
              measurement_row.update(workspace)
      finally:
          self.ignore_redraw = False
  
      self.redraw()
  
imports: import matplotlib
  import matplotlib.axes
  import numpy
  import wx
  import wx.lib.scrolledpanel
  from cellprofiler_core.constants.measurement import EXPERIMENT
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_X
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_Y
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.preferences import IM_BILINEAR
  from cellprofiler_core.preferences import get_primary_outline_color
  from cellprofiler_core.preferences import get_secondary_outline_color
  from cellprofiler_core.preferences import get_tertiary_outline_color
  from cellprofiler_core.preferences import IM_NEAREST
  from cellprofiler_core.preferences import get_interpolation_mode
  from ..artist import INTERPOLATION_BILINEAR
  from ..artist import INTERPOLATION_NEAREST
  from ..artist import INTERPOLATION_BICUBIC
  from ..artist import MODE_HIDE
  from ..artist import CPImageArtist
  from ..constants.workspace_view import C_CHOOSER, WORKSPACE_VIEWER_HELP
  from ..constants.workspace_view import C_COLOR
  from ..constants.workspace_view import C_SHOW
  from ..constants.workspace_view import C_REMOVE
  from ..help.content import FIGURE_HELP
  from ..html.utils import rst_to_html_fragment
  from ..htmldialog import HTMLDialog
  from ._workspace_view_figure import WorkspaceViewFigure
  from ._workspace_view_image_row import WorkspaceViewImageRow
  from ._workspace_view_mask_row import WorkspaceViewMaskRow
  from ._workspace_view_measurement_row import WorkspaceViewMeasurementRow
  from ._workspace_view_objects_row import WorkspaceViewObjectsRow
label_desc: Use image node_id 14 for calling the WorkspaceView obj's underlying member method code with example usage: obj.set_workspace(workspace) without return types