K3D-jupyter
K3D-jupyter copied to clipboard
Scaling error
Description
It seems that scaling parameter is not working correctly. It should be sx,sy,sz but it is sz,sy,sx
What I Did
import numpy as np
import matplotlib.pyplot as plt
from skimage import draw
siz=200
img2 = np.zeros((siz, siz//2,1))
rr, cc = draw.ellipse(siz/2, siz/4, siz*.4, siz*.2, img2.shape[:2])
img2[rr, cc,:] = 1
def myshow(img,spacing):
import k3d
plot = k3d.plot()
plot+= k3d.voxels(img, opacity=0.1,scaling=spacing)
plot.display()
myshow(img2,(1,2,1))
myshow(img2,(100,2,1)) # it should scale x but actually it scales z
myshow(img2,(1,1,2)) # it should scale y but actually it scales x
outputs