Comments (8)
Hi, I might have introduced a bug in the dev version ....
Is the error also showing up in the released version?
pip uninstall vedo
pip install vedo -U
from vedo.
it did not work. I got this error now:
ImportError: cannot import name 'Volume' from 'vedo' (unknown location)
from vedo.
I think there must be something else going wrong there.. you should post a minimal script with the complete error message, e.g
from vedo import Volume
vol= Volume()
print(vol)
Does it work from command line eg.
vedo --run numpy2volume0
from vedo.
sure, here is my complete code:
import numpy as np
from vedo import Volume
from vedo.applications import Slicer3DPlotter
import matplotlib.pyplot as plt
f = open('data.bin', 'rb')
content = f.read()
f.close()
data = np.frombuffer(content, np.float32)
print(data)
data_3d = data.reshape((200,200,700),order='F')
vol = Volume(data_3d)
plot3D = Slicer3DPlotter(vol)
plot3D.show()
I have numpy 1.26.4, vedo 2024.5.1 and matplotlib 3.8.4
from vedo.
You did not show the exact error message. Can you reproduce this?
import numpy as np
from vedo import Volume
from vedo.applications import Slicer3DPlotter
data = np.zeros([70, 80, 90], dtype=np.uint8)
data[ 0:30, 0:30, 0:30] = 1
data[30:50, 30:60, 30:70] = 2
data[50:70, 60:80, 70:90] = 3
vol = Volume(data)
plot3D = Slicer3DPlotter(vol)
plot3D.show()
from vedo.
I reproduced your code in spyder with vedo 2024.5.1 and I get the following error:
AttributeError: 'NoneType' object has no attribute 'pos'
If I use:
pip uninstall vedo
pip install vedo -U
and run the same code with spyder I get the following error: ImportError: cannot import name 'Volume' from 'vedo' (unknown location)
from vedo.
The second error message points to a problem in your anaconda installation.
I just run the above script in a spyder version 5 console and it runs normally..
from vedo.
Let me know if need further help on this.
I'm closing the issue for the moment.
from vedo.
Related Issues (20)
- 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
- DistanceTool Not Working HOT 2
- plane normal HOT 3
- Adding item to Group HOT 2
- Arrow object's top point HOT 2
- Group objects HOT 1
- Help ! Legosurface Error HOT 2
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.