Skip to content

quantimpy.minkowski.functionals does not take norm input. #3

@SasiMitraB

Description

@SasiMitraB

I'm trying to run the code provided at this link: https://github.com/boeleman/quantimpy/blob/main/test/functionals_3d.py

When I run pip install quantimpy, it installs version quantimpy-0.2.6
If I try to install a more recent release using pip, I find the following message:

ERROR: Could not find a version that satisfies the requirement quantimpy==0.4.6 (from versions: 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6)
ERROR: No matching distribution found for quantimpy==0.4.6

I'm trying to set the norm parameter equal to True, and it's not working.
The first time I run the code, I get this error, with regards to the res2 parameter being less than 1.

(venv) (base) astro@sasim:~/Desktop/another_sem_project_folder/quantimpy-0.4.6/test$ python3 functionals_3d.py 
Traceback (most recent call last):
  File "/home/astro/Desktop/another_sem_project_folder/quantimpy-0.4.6/test/functionals_3d.py", line 45, in <module>
    minkowski2 = mk.functionals(image2,res2)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "quantimpy/minkowski.pyx", line 25, in quantimpy.minkowski.functionals
  File "quantimpy/minkowski.pyx", line 147, in quantimpy.minkowski.functionals
ValueError: All elements of the resolution array need to be larger than or equal to one

Fixing the res2 and res3 to be greater than 1 (just multiply both arrays by 2), I run the code again. This time, I get the following error,

(venv) (base) astro@sasim:~/Desktop/another_sem_project_folder/quantimpy-0.4.6/test$ python3 functionals_3d.py 
(462216.0, 3597.046912631977, 30.542037333492438, 0.23873241463784298)
(462781.0, 3611.85086413857, 30.606235784646316, 0.238732414637843)
(3705093.0, 14470.748444222656, 61.17318003002065, 0.238732414637843)
(3704298.0, 14464.929709556634, 61.270572027309846, 0.238732414637843)
[463246.6863277365, 3619.1147369354417, 30.557749073643905, 0.238732414637843]

Traceback (most recent call last):
  File "/home/astro/Desktop/another_sem_project_folder/quantimpy-0.4.6/test/functionals_3d.py", line 55, in <module>
    minkowski0 = mk.functionals(image0,res0, norm=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "quantimpy/minkowski.pyx", line 25, in quantimpy.minkowski.functionals
TypeError: functionals() got an unexpected keyword argument 'norm'

It appears the library is unable to recognize the input of norm, and it accepts only two input values, of image, and res.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions