Comments (3)
it's clearly a bug in the k3d interface! Thanks a lot for spotting it,
while I fix it you can either:
- set a very small non-zero number like `array([0.00001, 0., 0.])
- use the 'itkwidget' backend instead of k3d:
from vtkplotter import Points, embedWindow
import numpy as np
embedWindow('itk')
positions = np.array(
[[0.16621395, 0.28789101, 0. ],
[0. , 0. , 0. ],
[0.24386514, 0. , 0. ],
[0.07767649, 0.04484654, 0.12684517],
[0. , 0. , 0. ],
[0.02198013, 0.01269023, 0.0358934 ],
[0.13108585, 0.00570134, 0.01612581],
[0.36077809, 0. , 0. ],
[0.22941974, 0.3399008 , 0.08126898],
[0.15449964, 0.01249786, 0.03534928]])
Points(positions, c='black').show(bg='white')
from vedo.
Thank you.
from vedo.
I just realized that you have a duplicated point in the list.. the k3d interface removes which causes the mismatch. I managed to fix that , the fix will be available in the next release.
If you use numpy.unique
that also solves the problem:
from numpy import array, unique
from vtkplotter import show, Points, Plotter
positions = array([[0.16621395, 0.28789101, 0. ],
[0. , 0. , 0. ],
[0.24386514, 0. , 0. ],
[0.07767649, 0.04484654, 0.12684517],
[0. , 0. , 0. ],
[0.02198013, 0.01269023, 0.0358934 ],
[0.13108585, 0.00570134, 0.01612581],
[0.36077809, 0. , 0. ],
[0.22941974, 0.3399008 , 0.08126898],
[0.15449964, 0.01249786, 0.03534928]])
positions = unique(positions, axis=0)
plot_cba = Plotter()
points_cba = Points(positions, c='black', r=10)
plot_cba += points_cba
show(points_cba)
Thanks!
Marco
from vedo.
Related Issues (20)
- Data type discrepancies between numpy and VTK HOT 11
- About the button in vedo. HOT 2
- How to set a camera with given intrinsic and extrinsic parameters HOT 1
- How to add the slider? HOT 1
- How to load multiple Volumes in 1 3D interactive plane HOT 4
- Segmentation and Visualization of CT Scan Structures Based on Density in Vedo HOT 4
- Overlap on inside of Tube HOT 1
- Mesh cut with cut_with_box results in non water tight mesh HOT 2
- Optimize Loading and Visualization of Multiple .nii.gz Segments in Vedo HOT 1
- Issue with `mask` Function Example and Request for Assistance with `hide_voxels()` Function HOT 8
- How to flatten mesh to 2D and get its internal and external boundaries? HOT 8
- Vedo only render the change when I move my mouse on the screen HOT 6
- Vedo and torch.multiprocessing HOT 1
- How to change ImageScalars from volume.slice_plane() to be turned to image (numpy) ? HOT 4
- How to integrate interactive volume objects on Webpage? HOT 1
- Running vedo in a Docker container not working. HOT 2
- (x,y) coordinate format not working on LegendBox HOT 1
- test extract_cells_by_type() failing on 32-bit arches: Expecting a numpy.int32 array, got int64 instead. HOT 2
- Close an extruded mesh with a cover HOT 4
- Access faces of a mesh based on their ouput colour HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vedo.