We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Somehow, this WGLMakie example makes everything stutter like crazy, even on a fast PC:
using WGLMakie, FileIO, NIfTI, ImageTransformations WGLMakie.activate!() brain = restrict(niread(Makie.assetpath("brain.nii.gz")).raw) mini, maxi = extrema(brain) cube_with_holes = Float32.((brain .- mini) ./ (maxi - mini)) function labeled_slider(r, name, start=first(r)) s = JSServe.Slider(r) s.value[] = start return DOM.div(name, s, map(x-> string(round(x, digits=2)), s.value)), s end App() do session levelsd, levels = labeled_slider(2:10, "levels") absorptiond, absorption = labeled_slider(range(0, stop=5, step=0.5), "absorption", 3.0) isovalued, isovalue = labeled_slider(range(0, stop=1, step=0.1), "isovalue", 0.5) alphad, alpha = labeled_slider(range(0, stop=1, step=0.1), "alpha", 0.5) fig = Figure(resolution=(800, 800)) # Make a colormap, with the first value being transparent colormap = RGBAf.(to_colormap(:plasma), 1.0) colormap[1] = RGBAf(0,0,0,0) volume!(LScene(fig[1, 2], show_axis=false), cube_with_holes, algorithm = :absorption, absorption=absorption, colormap=colormap) volume!(LScene(fig[1, 2], show_axis=false), cube_with_holes, algorithm = :mip, colormap=colormap) colgap!(fig.layout, 0) rowgap!(fig.layout, 0) return JSServe.record_states(session, DOM.div(absorptiond, isovalued, levelsd, alphad, fig)) end
The text was updated successfully, but these errors were encountered:
SimonDanisch
No branches or pull requests
Somehow, this WGLMakie example makes everything stutter like crazy, even on a fast PC:
The text was updated successfully, but these errors were encountered: