volumeslices

VolumeSlices

volumeslices(x, y, z, v)              

Draws heatmap slices of the volume v

Attributes

Available attributes and their defaults for MakieCore.Combined{Makie.volumeslices, T} where T are:

  bbox_color      RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.5f0)
  bbox_visible    true
  colormap        :viridis
  colorrange      MakieCore.Automatic()
  depth_shift     0.0f0
  diffuse         Float32[0.4, 0.4, 0.4]
  highclip        "nothing"
  inspectable     true
  interpolate     false
  levels          1
  linewidth       0.0
  lowclip         "nothing"
  nan_color       RGBA{Float32}(0.0f0,0.0f0,0.0f0,0.0f0)
  overdraw        false
  shininess       32.0f0
  specular        Float32[0.2, 0.2, 0.2]
  ssao            false
  transparency    false
  visible         true              

Examples

using GLMakie

fig = Figure()
ax = LScene(fig[1, 1], scenekw=(show_axis=false,))

x = LinRange(0, π, 50)
y = LinRange(0, 2π, 100)
z = LinRange(0, 3π, 150)

lsgrid = labelslidergrid!(
  fig,
  ["yz plane - x axis", "xz plane - y axis", "xy plane - z axis"],
  [1:length(x), 1:length(y), 1:length(z)]
)
fig[2, 1] = lsgrid.layout

vol = [cos(X)*sin(Y)*sin(Z) for X ∈ x, Y ∈ y, Z ∈ z]
plt = volumeslices!(ax, x, y, z, vol)

# connect sliders to `volumeslices` update methods
sl_yz, sl_xz, sl_xy = lsgrid.sliders

on(sl_yz.value) do v; plt[:update_yz][](v) end
on(sl_xz.value) do v; plt[:update_xz][](v) end
on(sl_xy.value) do v; plt[:update_xy][](v) end

set_close_to!(sl_yz, .5length(x))
set_close_to!(sl_xz, .5length(y))
set_close_to!(sl_xy, .5length(z))

# cam3d!(ax.scene, projectiontype=Makie.Orthographic)

fig