code: def __init__(
      self,
      interactor,
      scene,
      data,
      affine=None,
      world_coords=False,
      percentiles=[2, 98],
      rgb=False,
  ):
      self._interactor = interactor
      self._scene = scene
      self._data = data
      self._affine = affine
  
      if not world_coords:
          self._affine = np.eye(4)
  
      self._slice_actors = [None] * 3
  
      self._data_ndim = data.ndim
      self._data_shape = data.shape
      self._rgb = False
  
      vol_data = self._data
  
      if (
          self._data_ndim == 4 and rgb and self._data_shape[-1] == 3
      ) or self._data_ndim == 3:
          self._rgb = True and not self._data_ndim == 3
          self._int_range = np.percentile(vol_data, percentiles)
          _evaluate_intensities_range(self._int_range)
      else:
          if self._data_ndim == 4 and rgb and self._data_shape[-1] != 3:
              warnings.warn(
                  "The rgb flag is enabled but the color "
                  + "channel information is not provided"
              )
          vol_data = self._volume_calculations(percentiles)
  
      self._vol_max = np.max(vol_data)
      self._vol_min = np.min(vol_data)
  
      self._resliced_vol = None
  
      print(f"Original shape: {self._data_shape}")
      self._create_and_resize_actors(vol_data, self._int_range)
      print(f"Resized to RAS shape: {self._data_shape}")
  
      self._sel_slices = np.rint(
          np.asarray(self._data_shape[:3]) / 2
      ).astype(int)
  
      self._add_slice_actors_to_scene(self._sel_slices)
  
      self._picker_callback = None
      self._picked_voxel_actor = None
  
imports: import warnings
  import numpy
  from scipy import stats
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 1 to create a new SlicesVisualizer object  with example: obj = SlicesVisualizer(interactor, scene, data, affine, world_coords, percentiles, rgb)