class_docstr: Interaction tab for slice visualization.
  
  Attributes
  ----------
  name : str
      Name of the tab.
class_docstr_tok: ["Interaction","tab","for","slice","visualization",".","Attributes","--","--","--","--","--","name",":","str","Name","of","the","tab","."]
code: def _change_volume(self, slider):
      value = int(np.rint(slider.value))
      if value != self._volume.selected_value:
          visible_slices = (
              self._slice_x.selected_value,
              self._slice_y.selected_value,
              self._slice_z.selected_value,
          )
          valid_vol = self._visualizer.change_volume(
              self._volume.selected_value,
              value,
              [
                  self._intensities.selected_value[0],
                  self._intensities.selected_value[1],
              ],
              visible_slices,
          )
          if not valid_vol:
              warnings.warn(
                  f"Volume N°{value} does not have any contrast. Please, "
                  "check the value ranges of your data. Returning to "
                  "previous volume."
              )
              self._volume.obj.value = self._volume.selected_value
          else:
              intensities_range = self._visualizer.intensities_range
  
              # Updating the colormap
              self._intensities.selected_value[0] = intensities_range[0]
              self._intensities.selected_value[1] = intensities_range[1]
              self._update_colormap()
  
              # Updating intensities slider
              self._intensities.obj.initial_values = intensities_range
              self._intensities.obj.min_value = (
                  self._visualizer.volume_min
              )
              self._intensities.obj.max_value = (
                  self._visualizer.volume_max
              )
              self._intensities.obj.update(0)
              self._intensities.obj.update(1)
  
              # Updating opacities
              self._update_opacities()
  
              # Updating visibilities
              slices = [self._slice_x, self._slice_y, self._slice_z]
              for i, s in enumerate(slices):
                  self._update_slice_visibility(
                      None,
                      s,
                      self._visualizer.slice_actors[i],
                      s.visibility,
                  )
  
              self._volume.selected_value = value
              self._force_render(self)
  
imports: import warnings
  from functools import partial
  import numpy
  from dipy.utils.optpkg import optional_package
  from dipy.viz.horizon.tab import HorizonTab, build_label, build_slider, build_switcher, build_checkbox
label_desc: Use image node_id 9 for calling the SlicesTab obj's underlying member method code with example usage: obj._change_volume(slider) without return types