code: def __init__(self, clusters_visualizer, threshold):
      self.__visualizer = clusters_visualizer
  
      self.__centroid_actors = self.__visualizer.centroid_actors
      self.__cluster_actors = self.__visualizer.cluster_actors
      self.__name = "Clusters"
  
      self.__tab_id = 0
      self.__tab_ui = None
  
      length = 450
      lw = 3
      radius = 8
      fs = 16
      tt = "{value:.0f}"
  
      self.__slider_label_size = build_label(text="Size")
  
      sizes = self.__visualizer.sizes
      self.__selected_size = np.percentile(sizes, 50)
  
      self.__slider_size = ui.LineSlider2D(
          initial_value=self.__selected_size,
          min_value=np.min(sizes),
          max_value=np.percentile(sizes, 98),
          length=length,
          line_width=lw,
          outer_radius=radius,
          font_size=fs,
          text_template=tt,
      )
  
      color_single_slider(self.__slider_size)
  
      self.__slider_size.handle_events(self.__slider_size.handle.actor)
      self.__slider_size.on_left_mouse_button_released = (
          self.__change_size
      )
  
      self.__slider_label_length = build_label(text="Length")
  
      lengths = self.__visualizer.lengths
      self.__selected_length = np.percentile(lengths, 25)
  
      self.__slider_length = ui.LineSlider2D(
          initial_value=self.__selected_length,
          min_value=np.min(lengths),
          max_value=np.percentile(lengths, 98),
          length=length,
          line_width=lw,
          outer_radius=radius,
          font_size=fs,
          text_template=tt,
      )
  
      color_single_slider(self.__slider_length)
  
      self.__slider_length.handle_events(
          self.__slider_length.handle.actor
      )
      self.__slider_length.on_left_mouse_button_released = (
          self.__change_length
      )
  
      self.__slider_label_threshold = build_label(text="Threshold")
  
      self.__selected_threshold = threshold
  
      self.__slider_threshold = ui.LineSlider2D(
          initial_value=self.__selected_threshold,
          min_value=5,
          max_value=25,
          length=length,
          line_width=lw,
          outer_radius=radius,
          font_size=fs,
          text_template=tt,
      )
  
      color_single_slider(self.__slider_threshold)
  
      self.__slider_threshold.handle_events(
          self.__slider_threshold.handle.actor
      )
      self.__slider_threshold.on_left_mouse_button_released = (
          self.__change_threshold
      )
  
file_path: dipy/dipy/viz/horizon/tab/cluster.py
imports: import numpy
  from dipy.utils.optpkg import optional_package
  from dipy.viz.horizon.tab import HorizonTab, build_label, color_single_slider
label_desc: Use image node_id 1 to create a new ClustersTab object from inherited base classes: HorizonTab with example: obj = ClustersTab(clusters_visualizer, threshold)