/**
   * Get the volume that corresponds to the given dimensions.
   *
   * @param volume the volume to get
   * @return the corresponding volume
   */
  public final Viewer3DNodeVolume getVolume(final Viewer3DNodeAxes.Volume volume) {

    Viewer3DNodeVolume vol;

    final String key = volume.getCacheString();

    if (m_caching && m_cache.containsKey(key)) {
      vol = m_cache.get(key);
    } else {
      // create the new volume
      final vtkImageData vtkImg = m_converter.getVTKImageData(volume);

      // copy the current settings if possible
      if (m_current != null) {
        final TransferFunctionBundle gray = new TransferFunctionBundle(m_current.getBundleGray());
        final TransferFunctionBundle rgb = new TransferFunctionBundle(m_current.getBundleRGB());
        vol = new Viewer3DNodeVolume(vtkImg, volume, gray, rgb);
      } else {
        vol = new Viewer3DNodeVolume(vtkImg, volume);
      }

      if (m_caching) {
        m_cache.put(key, vol);
      }
    }

    m_current = vol;
    vol.setMapper(m_mapper);
    return vol;
  }