marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
2.05k stars 266 forks source link

How do I get installed the "*.slc" files #687

Closed ivan-marroquin closed 2 years ago

ivan-marroquin commented 2 years ago

Hi,

Many thanks for making available such great package!

I am using Python 3.6.5 on an Ubuntu machine. I installed vedo 2022.3.0 without issues. However, when I try to run one of your examples. I get this error message:

vedo -g embryo.slc [vedo.io.py:275] ERROR: in load(), cannot load embryo.slc [vedo.cli.py:581] ERROR: expected a Volume but loaded a <class 'NoneType'> object

vedo -g embryo.slc [vedo.io.py:275] ERROR: in load(), cannot load embryo.slc [vedo.cli.py:581] ERROR: expected a Volume but loaded a <class 'NoneType'> object

It seems also that there are changes in the options for the command "vedo". See this example, in the webpage it mentions "vedo --slicer3d embryo.slc". When I tried, I got:

usage: vedo [-h] [-c] [-a] [-w] [-p] [-l] [-k] [-K] [-t] [-x] [-i] [-f] [-bg] [-bg2] [-z] [-n] [-s] [-g] [-gx] [-gy] [-gz] [--mode] [--cmap] [-e] [--slicer2d] [--slicer3d] [--lego] [-r] [--search] [--search-vtk] [--reload] [--info [INFO [INFO ...]]] [--convert [CONVERT [CONVERT ...]]] [--to] [--image] [--eog] [files [files ...]] vedo: error: ambiguous option: --slicer could match --slicer2d, --slicer3d

Then, I tried this command: "vedo --slicer3d embryo.slc", which produced this error: Traceback (most recent call last): File "/home/doctor_ivan/python_3.6.5/bin/vedo", line 8, in sys.exit(execute_cli()) File "/home/doctor_ivan/python_3.6.5/lib/python3.6/site-packages/vedo/cli.py", line 74, in execute_cli draw_scene(args) File "/home/doctor_ivan/python_3.6.5/lib/python3.6/site-packages/vedo/cli.py", line 610, in draw_scene sp = vol.spacing() AttributeError: 'NoneType' object has no attribute 'spacing'

Did I miss something during the installation?

Kind regards,

Ivan

marcomusy commented 2 years ago

Hi Ivan thanks for reporting, I think it might be due to the old python 3.6, I think it has reached its end of life by the end of 2021. In any case the file must be local in your command (or a url). Does this work? vedo --slicer3d https://vedo.embl.es/examples/data/embryo.slc

ivan-marroquin commented 2 years ago

Hi @marcomusy ,

Thanks for your prompt reply. The command worked fine! What version of Python would you suggest that works fine with vedo?

Ivan

marcomusy commented 2 years ago

Well, all pythons >3.6 should be fine. For some specific python versions there is no vtk9.0, but 9.1 and 9.2 still work ok with vedo, in that case you may need to install with command: pip install vedo -U --no-deps

ivan-marroquin commented 2 years ago

Thanks for your comments