code: def run_as_data_tool(self):
      from cellprofiler.gui.editobjectsdlg import EditObjectsDialog
      import wx
      from wx.lib.filebrowsebutton import FileBrowseButton
      from cellprofiler_core.reader import get_image_reader
      import imageio
  
      with wx.Dialog(None) as dlg:
          dlg.Title = "Choose files for editing"
          dlg.Sizer = wx.BoxSizer(wx.VERTICAL)
          sub_sizer = wx.BoxSizer(wx.HORIZONTAL)
          dlg.Sizer.Add(sub_sizer, 0, wx.EXPAND | wx.ALL, 5)
          new_or_existing_rb = wx.RadioBox(
              dlg, style=wx.RA_VERTICAL, choices=("New", "Existing")
          )
          sub_sizer.Add(new_or_existing_rb, 0, wx.EXPAND)
          objects_file_fbb = FileBrowseButton(
              dlg,
              size=(300, -1),
              fileMask="Objects file (*.tif, *.tiff, *.png, *.bmp, *.jpg)|*.tif;*.tiff;*.png;*.bmp;*.jpg",
              dialogTitle="Select objects file",
              labelText="Objects file:",
          )
          objects_file_fbb.Enable(False)
          sub_sizer.AddSpacer(5)
          sub_sizer.Add(
              objects_file_fbb, 0, wx.ALIGN_TOP | wx.ALIGN_RIGHT
          )
  
          def on_radiobox(event):
              objects_file_fbb.Enable(
                  new_or_existing_rb.GetSelection() == 1
              )
  
          new_or_existing_rb.Bind(wx.EVT_RADIOBOX, on_radiobox)
  
          image_file_fbb = FileBrowseButton(
              dlg,
              size=(300, -1),
              fileMask="Objects file (*.tif, *.tiff, *.png, *.bmp, *.jpg)|*.tif;*.tiff;*.png;*.bmp;*.jpg",
              dialogTitle="Select guide image file",
              labelText="Guide image:",
          )
          dlg.Sizer.Add(image_file_fbb, 0, wx.EXPAND | wx.ALL, 5)
  
          allow_overlap_checkbox = wx.CheckBox(
              dlg, -1, "Allow objects to overlap"
          )
          allow_overlap_checkbox.Value = True
          dlg.Sizer.Add(
              allow_overlap_checkbox, 0, wx.EXPAND | wx.ALL, 5
          )
  
          buttons = wx.StdDialogButtonSizer()
          dlg.Sizer.Add(
              buttons,
              0,
              wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL,
              5,
          )
          buttons.Add(wx.Button(dlg, wx.ID_OK))
          buttons.Add(wx.Button(dlg, wx.ID_CANCEL))
          buttons.Realize()
          dlg.Fit()
          result = dlg.ShowModal()
          if result != wx.ID_OK:
              return
          self.allow_overlap.value = allow_overlap_checkbox.Value
          fullname = objects_file_fbb.GetValue()
          guidename = image_file_fbb.GetValue()
  
      if new_or_existing_rb.GetSelection() == 1:
          provider = ObjectsImage(
              "InputObjects", pathname2url(fullname), None, None
          )
          image = provider.provide_image(None)
          pixel_data = image.pixel_data
          labels = [
              pixel_data[:, :, i] for i in range(pixel_data.shape[2])
          ]
      else:
          labels = None
      #
      # Load the guide image
      #
      guide_image_reader = get_image_reader(guidename)
      guide_image = guide_image_reader.read()
      if numpy.min(guide_image) != numpy.max(guide_image):
          guide_image = (guide_image - numpy.min(guide_image)) / (
              numpy.max(guide_image) - numpy.min(guide_image)
          )
      if labels is None:
          shape = guide_image.shape[:2]
          labels = [numpy.zeros(shape, int)]
      with EditObjectsDialog(
          guide_image,
          labels,
          self.allow_overlap,
          self.object_name.value,
      ) as dialog_box:
          result = dialog_box.ShowModal()
          if result != wx.OK:
              return
          labels = dialog_box.labels
      with wx.FileDialog(
          None, style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT
      ) as dlg:
          dlg.Path = fullname
          dlg.Wildcard = (
              "Object image file (*.tif,*.tiff)|*.tif;*.tiff|"
              "Ilastik project file (*.ilp)|*.ilp"
          )
          result = dlg.ShowModal()
          fullname = dlg.Path
          if result == wx.ID_OK:
              if fullname.endswith(".ilp"):
                  self.save_into_ilp(fullname, labels, guidename)
              else:
                  if os.path.exists(fullname):
                      os.unlink(fullname)
                  imageio.volwrite(
                      fullname, numpy.stack(labels, axis=-1)
                  )
  
imports: from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT
  from cellprofiler_core.constants.measurement import FF_PARENT
  from cellprofiler_core.image import ObjectsImage
  from cellprofiler_core.module import Identify
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import LabelName
  from cellprofiler_core.utilities.core.module.identify import add_object_count_measurements
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements_ijv
  from cellprofiler_core.utilities.core.module.identify import get_object_measurement_columns
  from cellprofiler.modules import _help
  import os
  import numpy
  from cellprofiler_core.object import Objects
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.utilities.pathname import pathname2url
label_desc: Use image node_id 6 for calling the EditObjectsManually obj's underlying member method code with example usage: obj.run_as_data_tool() without return types