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
it happens to me that I would like to create the image from multiple slice_plane()
The text was updated successfully, but these errors were encountered:
I dont understand the question sorry.
Sorry, something went wrong.
I want to export the image from slice_plane obliquely out to np.array or image data with the same resolution as the slice_plane.
Try:
from vedo import * normal = [0, 0, 1] cmap = "gist_stern_r" def func(w, _): c, n = pcutter.origin, pcutter.normal vslice = vol.slice_plane(c, n, autocrop=True).cmap(cmap) vslice.name = "Slice" plt.at(1).remove("Slice").add(vslice) T = vslice.transform.compute_inverse() vslice2 = vslice.clone().apply_transform(T) shape = vslice2.metadata["shape"] arr = vslice2.pointdata["ImageScalars"].copy().reshape(shape) img = Image(arr).cmap(cmap) # img.write("slice.png") plt.at(2).remove("Image").add(img) vol = Volume(dataurl + "embryo.slc").cmap(cmap) vslice = vol.slice_plane(vol.center(), normal).cmap(cmap) vslice.name = "Slice" plt = Plotter(N=3, bg="k", bg2="bb", interactive=False) plt.at(0).show(vol, zoom=1.5) pcutter = PlaneCutter( vslice, normal=normal, alpha=0, c="white", padding=0, can_translate=False, can_scale=False, ) pcutter.add_observer("interaction", func) plt.at(1).add(pcutter) plt.interactive().close()
No branches or pull requests
it happens to me that I would like to create the image from multiple slice_plane()
The text was updated successfully, but these errors were encountered: