Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use create_arbitrary_line #21

Closed
dsourajit opened this issue Nov 18, 2024 · 1 comment
Closed

How to use create_arbitrary_line #21

dsourajit opened this issue Nov 18, 2024 · 1 comment

Comments

@dsourajit
Copy link

Trying the example at Display an arbitray line — CIGVis with my own volume data in m_cube gives me this error.

>>> type(m_cube)
<class 'numpy.ndarray'>
>>> m_cube.shape
(251, 501, 241)
>>> nodes=cigvis.create_slices(m_cube)
>>> nodes+=cigvis.create_arbitrary_line(anchor=[[0, 0], [90, 190], [190, 50]],volume=m_cube,nodes=nodes)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/anaconda3/envs/pynew/lib/python3.12/site-packages/cigvis/vispyplot.py", line 1135, in create_arbitrary_line
    return [ArbLineNode(path, anchor, data, volume, cmap, clim, hstep, vstep, **kwargs)] # yapf: disable
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/pynew/lib/python3.12/site-packages/cigvis/vispynodes/meshnode.py", line 274, in __init__
    self.preprocess(path, anchor, data, volume)
  File "/home/anaconda3/envs/pynew/lib/python3.12/site-packages/cigvis/vispynodes/meshnode.py", line 326, in preprocess
    pout, pdata = surfaceutils.extract_data(self.volume, self.path)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/pynew/lib/python3.12/site-packages/cigvis/utils/surfaceutils.py", line 292, in extract_data
    N = p.shape[0]
        ^^^^^^^
AttributeError: 'tuple' object has no attribute 'shape'

Is this a bug or am I using something incorrectly?

@JintaoLee-Roger
Copy link
Owner

Related to #20 and fixed by v0.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants