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

Another issue with examples #8

Open
kubagrzelak opened this issue Apr 30, 2024 · 4 comments
Open

Another issue with examples #8

kubagrzelak opened this issue Apr 30, 2024 · 4 comments

Comments

@kubagrzelak
Copy link

kubagrzelak commented Apr 30, 2024

Hello, I have just installed AugmentA and I tried to run the examples from README. When I did examples, all of them displayed the widows for manual selection of appendage apex and centers of PVs, but the it threw errors. For instance, when I run the Example 4 (Example using a closed surface derived from MRI segmentation to produce a volumetric atrial model), it seems to work for the left atrium but then when it proceeds to the right atrium it gives me this error:

Warning: `use_mesh` is deprecated. See `use_picker` instead.
Apex coordinates:  [ -2.40036964 -63.04809952  31.02440071]
Extracting rings...
Traceback (most recent call last):
  File "/home/jg23/Software/AugmentA/main.py", line 121, in <module>
    run()
  File "/home/jg23/Software/AugmentA/main.py", line 116, in run
    AugmentA(args)
  File "/home/jg23/Software/AugmentA/pipeline.py", line 247, in AugmentA
    label_atrial_orifices_TOP_epi_endo(processed_mesh+'.obj',RAA_id=int(df[args.atrium+"A_id"]))
  File "/home/jg23/Software/AugmentA/Atrial_LDRBM/Generate_Boundaries/extract_rings_TOP_epi_endo.py", line 281, in label_atrial_orifices_TOP_epi_endo
    cutting_plane_to_identify_tv_f_tv_s_epi_endo(mesh, RA, RA_rings, outdir)
  File "/home/jg23/Software/AugmentA/Atrial_LDRBM/Generate_Boundaries/extract_rings_TOP_epi_endo.py", line 1017, in cutting_plane_to_identify_tv_f_tv_s_epi_endo
    if tv_id_epi not in pts_surf:
ValueError: operands could not be broadcast together with shapes (125,) (78,)

Maybe it is something related to the dependencies and python versions? I had to install a lower vtk package version (9.2.2) because some functions were depreciated in 9.3.0 (I think the vtk versioning might be also related to the other Issue you have opened). My versions are:

Python: 3.10.12
pymeshfix: 0.16.3
pymeshlab: 2022.2.post4
pandas: 1.5.3
transformations: 2022.9.26
h5py: 3.7.0
meshio: 5.3.5
scikit-learn: 1.2.1
vtk: 9.2.2
carputils: latest
meshtool: latest

Also, does AugmentA take .vtk files as input or only .vtp? And can I input tetrahedral mesh of the atria?

Thank you.

@patymardi
Copy link
Collaborator

Hi @kubagrzelak,
AugmentA uses a surface mesh as an input. In Atrial_LDRBM/LDRBM/Fiber_LA/Methods_LA.py inside the smart_reader function you can see all the input formats that can be used, so .vtk can also be used as input. I am not familiar with the error you are showing but it seems to be related to the identification of the plane diving the TV. Have you tried selecting a different node in the RAA? These were the dependencies I was using when generating biatrial models:
python = "^3.9"
pymeshfix = ">=0.16.1,<0.17.0"
pymeshlab = "~2022.2.post2"
pandas = "~1.5.2"
transformations = "~2022.9.26"
h5py = "~3.7.0"
meshio = "~5.3.4"
scikit-learn = "~1.2.1"
Let me know how it goes :)

@kubagrzelak
Copy link
Author

kubagrzelak commented May 4, 2024

Hi @patymardi

I was trying to run the last example and even after checking the compatibility of our dependencies I am still getting the same error. It works for LA but not for RA. Here are screenshots of some points I tried.
Screenshot from 2024-05-04 16-44-01
Screenshot from 2024-05-04 16-39-24
Screenshot from 2024-05-04 16-35-27
Screenshot from 2024-05-04 17-07-38
Screenshot from 2024-05-04 17-06-40
Screenshot from 2024-05-04 17-05-58

@patymardi
Copy link
Collaborator

Your third attempt should be fine. What is the error you get? Is the error immediately after closing the Pyvista window?

@kubagrzelak
Copy link
Author

kubagrzelak commented May 5, 2024

Yes, the error is immediately after closing the Pyvista and is the same as reported so: ValueError: operands could not be broadcast together with shapes (125,) (78,).

Is it possible that you could try to run the example on your machine and see whether it works? If it works then could you share your virtual env pip list so I could compare my versions of the packages? I have a feeling that it could be an issue with some dependencies of the packages from requirements txt, i.e. vtk package etc.

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