You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently k3d is rendering Sparse volume as voxels that are centered around the center of the voxel coordinate. This should at least be up to the user to display Sparse with voxel being aligned to a corner.
Here is what I get for a dummy data that I intend to be plotted as the same volume:
from chunky3d import Sparse
from chunky3d.k3d_connector import get_k3d_obj
import k3d
import numpy as np
sp1 = Sparse((3,3,3), spacing=(1,1,1))
sp01 = Sparse((30,30,30), spacing=(0.1,0.1,0.1))
sp1[1, 1, 1] = 1
sp01[10:20,10:20,10:20] = 1
So the issue is about the ability to pick the way data should be interpreted - I think that this should be achievable by configuring k3d to do so, without modification of the k3d codebase.
The text was updated successfully, but these errors were encountered:
Description
Currently k3d is rendering Sparse volume as voxels that are centered around the center of the voxel coordinate. This should at least be up to the user to display Sparse with voxel being aligned to a corner.
Here is what I get for a dummy data that I intend to be plotted as the same volume:
plot with:
and I get:
This comes from the
get_voxel_bounds
method from Sparse:https://github.com/K3D-tools/chunky3d/blob/d902a5f1338e0b3b612b8be6fef91310a4520fb2/chunky3d/chunky.py#L1177
If I implement a method that aligns voxel corner with the origin:
And use it when plotting:
I get what I intend to:
So the issue is about the ability to pick the way data should be interpreted - I think that this should be achievable by configuring k3d to do so, without modification of the k3d codebase.
The text was updated successfully, but these errors were encountered: