Giter Site home page Giter Site logo

rivuletstudio / rivuletpy Goto Github PK

View Code? Open in Web Editor NEW
64.0 7.0 17.0 1.24 MB

Robust 3D Neuron Tracing / General 3D tree structure extraction in Python for 3D images powered by the Rivulet2 algorithm. Pain-free Install & use in 5 mins.

License: BSD 3-Clause "New" or "Revised" License

Python 74.18% Shell 2.10% MATLAB 2.82% C 20.90%
neuron neuroinformatics morphology image-processing rivulet2-algorithm python tracing curvilinear-coordinates medical-imaging medical-image-processing

rivuletpy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rivuletpy's Issues

Get Voxel array

Hi ,I'm try Rivulet2 on other tree structures from 3D medical images.Finally I also got .swc file and .vtk file.I opened the .vtk file, and the 3D model is the same as Lung Airway Tracing example mentioned in the Readme, but I don’t know how to get the voxel array of the model.
Thanks for your suggestions

Installation documentation error

Hi, there is a typo on the documentation:

$ conda create -n riv python=python3.6 anaconda # We tested on 3.5 and 3.6. Other python versions >= 3.4 should also work

should be
$ conda create -n riv python=3.6 anaconda # We tested on 3.5 and 3.6. Other python versions >= 3.4 should also work

Otherwise, you get the following error:

PackagesNotFoundError: The following packages are not available from current channels:
  - python=python3.6

setup.py not compatible with pip>10.0.0

Saw this

Obtaining file:///data/z003a00h/siqi/Airway/rivuletpy
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/data/z003a00h/siqi/Airway/rivuletpy/setup.py", line 63, in <module>
        REQS = parse_reqs(os.path.join(BASEDIR, 'requirements.txt'))
      File "/data/z003a00h/siqi/Airway/rivuletpy/setup.py", line 47, in parse_reqs
        from pip.download import PipSession  # pylint:disable=E0611
    ModuleNotFoundError: No module named 'pip.download'

Need to figure out a way to revise the setup.py for the new pip!

Failed to find TIFF library

Hi, had this issue come up the first time I tried rtrace

File "//anaconda/lib/python3.5/site-packages/libtiff/libtiff_ctypes.py", line 46, in
raise ImportError('Failed to find TIFF library. Make sure that libtiff '
ImportError: Failed to find TIFF library. Make sure that libtiff is installed and its location is listed in PATH|LD_LIBRARY_PATH|..

Thanks!

Missing module simpleitk Suggestion: edit instalation instructions

Hi, I would like to give a suggestion. It is probably necessary to add in the installation instructions additional information to install simpleitk module. I run Ubuntu 18.04 Anaconda (command line client - 1.16.14).

in my case, simple itk could not be added by simply running the command

$ conda install simpleitk anaconda

After installing and running rtrace an error message appeared:

ImportError: No module named 'SimpleITK'

I had to use the command below instead

$ conda install -c simpleitk simpleitk

After that, I was able to succefully run rtrace. I hope this suggestion is useful to others.

Example usage

I was wondering the developers could share an example usage for 3D CT slices such as for the lungs.

Thank you.

soma object has no attribute 'pad'

Hello,
I am tracing a neuron with a clear soma but I get this :

python ./apps/rtrace -f testlila4.tif -t 25 -z 0.5 --soma --save-soma

The shape of the image is (926, 742, 212)
-- Zooming image to 0.50 of original size
(1) -- Detecting Soma...Reconstructing Soma with Simple Mask
(2) --Boundary DT...
(3) --Fast Marching with low quality...
(4) --Compute Gradients...
(5) --Start Backtracking with standard stopping criteria ...
36888.0it [15:03, 24.15it/s] Traceback (most recent call last):
File "./apps/rtrace", line 147, in
soma.pad(crop_region)
AttributeError: 'Soma' object has no attribute 'pad'
36888.0it [15:08, 40.61it/s]

Also when I try to use --view option I get this:

The shape of the image is (926, 742, 212)
-- Zooming image to 0.50 of original size
(1) -- Detecting Soma...Reconstructing Soma with Simple Mask
(2) --Boundary DT...
(3) --Fast Marching with low quality...
(4) --Compute Gradients...
(5) --Start Backtracking with standard stopping criteria ...
26445.0it [09:24, 21.93it/s] -- Finshed: 687.66 sec.
Traceback (most recent call last):
File "./apps/rtrace", line 173, in
s.view()
File "c:\users\argunsah-adm\documents\github\rivuletpy\rivuletpy\swc.py", line 221, in view
viewer.render(return_rgb_array=False)
File "c:\users\argunsah-adm\documents\github\rivuletpy\rivuletpy\utils\rendering3.py", line 177, in render
self.transform.enable()
File "c:\users\argunsah-adm\documents\github\rivuletpy\rivuletpy\utils\rendering3.py", line 96, in enable
glPushMatrix()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyglet-2.0.dev0-py3.7.egg\pyglet\gl\lib.py", line 105, in errcheck
raise GLException(msg)
pyglet.gl.lib.GLException: b'invalid operation'

Do you have any recommendation about how to solve these issues?

Thanks,

Ali

Setup incompatible with pip3

Hello. When attempting to run the command
pip3 install rivuletpy

we get the error message
ERROR: Command errored out with exit status 1:
command: 'c:\users\rennalabsa1\.anaconda\prompts\envs\riv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jro22\\AppData\\Local\\Temp\\pip-install-12l0i5al\\rivuletpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\jro22\\AppData\\Local\\Temp\\pip-install-12l0i5al\\rivuletpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\jro22\AppData\Local\Temp\pip-install-12l0i5al\rivuletpy\
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in <module>
File "C:\Users\jro22\AppData\Local\Temp\pip-install-12l0i5al\rivuletpy\setup.py", line 7, in <module>
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

it seems that the line
from pip.req import parse_requirements

is causing a problem.

We are running this on a 64 bit Windows 10 machine with python version 3.7.4.
all of the dependencies are up to date.

ModuleNotFoundError: No module named 'msfm'

Dear dev,

I installed the library in a fresh conda env as suggested and pip installed rivuletpy from both pip and github.
After the installation, the rtrace command cannot be found by the system.
Running either the quicktest or the rtrace app from the github repo reports ModuleNotFoundError: No module named 'msfm'.

Do you have any idea what the issue could be?

Kind regards.

#Python 3.9.16
#pip list

Package             Version
------------------- ---------
contourpy           1.0.7
cycler              0.11.0
Cython              0.29.33
fonttools           4.38.0
imageio             2.26.0
importlib-resources 5.12.0
kiwisolver          1.4.4
matplotlib          3.7.0
networkx            3.0
nibabel             4.0.2
numpy               1.24.2
packaging           23.0
Pillow              9.4.0
pip                 23.0.1
pyglet              1.5.27
pylibtiff           0.4.4
pyparsing           3.0.9
python-dateutil     2.8.2
PyWavelets          1.4.1
rivuletpy           0.3.0
scikit-fmm          2022.8.15
scikit-image        0.19.3
scipy               1.10.1
setuptools          67.4.0
SimpleITK           2.2.1
six                 1.16.0
tifffile            2023.2.27
tqdm                4.64.1
wheel               0.38.4
zipp                3.15.0

swc.shape and soma.save, soma.pad don't exist

When I use --vtk to save in vtk format, it goes with
Traceback (most recent call last):
File "apps/rtrace", line 164, in
swc2vtk(swc, outpath.replace('.swc', '.vtk'))
File "/Users/hanke/Desktop/rivuletpy/rivuletpy/utils/io.py", line 125, in swc2vtk
vtkstr += 'POINTS {} float\n'.format(swc.shape[0])
AttributeError: 'SWC' object has no attribute 'shape'

And when I am trying to use --save-soma to save with tif format, it shows that soma doesn't have save() or pad() function, and I do check soma.py, I think maybe these three function need to be implemented.

scikit-image<0.14.2 will raise an ImportError with numpy

The setup states the minimum version requirement for scikit-image is 0.12.3, however, this version will raise an error:

ImportError: cannot import name '_validate_lengths'

when executing the following line

from skimage.filters import threshold_otsu

This can refer to an issue in old version of scikit-image package: scikit-image/scikit-image#3649

The minimum version requirement for scikit-image is suggested to be >=0.14.2.
Hope the suggestion is helpful to others.

Implement MSFM

Either implement it as an extension to scikit-fmm or compiled from the existing c code and then cpickle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.