Thanks for the reply @bnmajor
So, I am using the main release.
However it seems this viewer.mode = 'z'
only works on image
type inputs.
For example, this works:
from urllib.request import urlretrieve
import os
import itk
file_name = '005_32months_T2_RegT1_Reg2Atlas_ManualBrainMask_Stripped.nrrd'
if not os.path.exists(file_name):
url = 'https://data.kitware.com/api/v1/file/564a5b078d777f7522dbfaa6/download'
urlretrieve(url, file_name)
image = itk.imread(file_name)
viewer1 = view(image, rotate=True, axes=True, vmin=4000, vmax=17000, gradient_opacity=0.9)
viewer1
# In a new cell
viewer1.mode = 'z'
But this does not:
import numpy as np
from itkwidgets import view
number_of_points = 3000
gaussian_1_mean = [0.0, 0.0, 0.0]
gaussian_1_cov = [[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 0.5]]
point_set_1 = np.random.multivariate_normal(gaussian_1_mean, gaussian_1_cov,
number_of_points)
gaussian_2_mean = [4.0, 6.0, 7.0]
gaussian_2_cov = [[2.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 1.5]]
point_set_2 = np.random.multivariate_normal(gaussian_2_mean, gaussian_2_cov,
number_of_points)
gaussian_3_mean = [4.0, 0.0, 7.0]
gaussian_3_cov = [[4.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 3.5]]
point_set_3 = np.random.multivariate_normal(gaussian_3_mean, gaussian_3_cov,
number_of_points)
viewer2 = view(point_sets=[point_set_1, point_set_2, point_set_3])
viewer2
# In a new cell
viewer2.mode = 'z'