code: def change_volume(
      self, prev_idx, next_idx, intensities, visible_slices
  ):
      vol_data = self._data[..., prev_idx]
      # NOTE: Supported only in latests versions of scipy
      # percs = stats.percentileofscore(np.ravel(vol_data), intensities)
      perc_0 = stats.percentileofscore(
          np.ravel(vol_data), intensities[0]
      )
      perc_1 = stats.percentileofscore(
          np.ravel(vol_data), intensities[1]
      )
      vol_data = self._data[..., next_idx]
      value_range = np.percentile(vol_data, [perc_0, perc_1])
      if np.sum(np.diff(self._int_range)) == 0:
          return False
  
      self._int_range = value_range
  
      self._vol_max = np.max(vol_data)
      self._vol_min = np.min(vol_data)
  
      for slice_actor in self._slice_actors:
          self._scene.rm(slice_actor)
  
      self._create_and_resize_actors(vol_data, self._int_range)
  
      self._add_slice_actors_to_scene(visible_slices)
  
      return True
  
imports: import warnings
  import numpy
  from scipy import stats
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 7 for calling the SlicesVisualizer obj's underlying member method code with example usage: obj.change_volume(prev_idx, next_idx, intensities, visible_slices) and returns: True, False