Image-Py / sknw

build net work from skeleton image (2D-3D)
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

Does latest installed version include `iso`? #21

Open petermr opened 2 years ago

petermr commented 2 years ago

I am very interested in using iso, ring and other arguments. Currently I use

pip install sknw

Installing collected packages: sknw
Successfully installed sknw-0.14

but this does not seem to include iso

>       nx_graph = sknw.build_sknw(skeleton_image, multi=True, iso=False, ring=True, full=True)
E       TypeError: build_sknw() got an unexpected keyword argument 'iso'

Do I have to pull and build it locally?

(sknw is very useful to me and these additional features are just what I need)

petermr commented 2 years ago

I have now cloned sknw and the setup.py indicates it has an earlier version number

pm286macbook:workspace pm286$ git clone https://github.com/Image-Py/sknw.git
Cloning into 'sknw'...
remote: Enumerating objects: 80, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 80 (delta 10), reused 21 (delta 6), pack-reused 53
Receiving objects: 100% (80/80), 17.17 KiB | 1.32 MiB/s, done.
Resolving deltas: 100% (33/33), done.
(base) pm286macbook:workspace pm286$ cd sknw/
(base) pm286macbook:sknw pm286$ ls
LICENSE     README.md   setup.py    sknw
(base) pm286macbook:sknw pm286$ more setup.py 
from setuptools import setup

descr = """sknw: skeleton analysis in Python.
Inspired by Juan Nunez-Iglesias's skan.
"""

if __name__ == '__main__':
    setup(name='sknw',
        version='0.13',
        url='https://github.com/yxdragon/sknw',
        description='Analysis of object skeletons',
        long_description=descr,
        author='YXDragon',
        author_email='yxdragon@imagepy.org',
        license='BSD 3-clause',
        packages=['sknw'],
        package_data={},
        install_requires=[
            'numpy',
            'networkx',
            'numba'
        ],
    )
yxdragon commented 2 years ago

you can just copy the sknw.py beside your script. do a test for me. if it works, I would publish it to pypi later.

petermr commented 2 years ago

Which version should I use? V0.14 is the installed version but v0.13 appears more recent Should the checkout have V0.15

anuvc commented 2 years ago

@petermr The last PyPI package (v0.14) does not include the latest changes.

Right now we are using a copy of the sknw.py in our code with your reference. It seems to work! We'll import sknw from the package when you update the PyPI package.