Puja_Ghosh
(Puja Ghosh)
December 16, 2024, 5:17pm
1
How to use surface toolbox in 3d slicer in Windows? why it keeps giving this error: C:\Users\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py:2786: UserWarning: does not have observer
warn(“does not have observer”)
Can anyone please tell me if there is need for any installation or anything? if so, then how to do that?
cpinter
(Csaba Pinter)
December 18, 2024, 3:32pm
2
I don’t think this error has anything to do with why Surface Toolbox does not work for you. Unfortunately this error appears no matter what, but it’s harmless.
Can you describe in detail how Surface Toolbox does not work? What you do exactly , what steps in what order, then what do you expect, and what happens instead?
Puja_Ghosh
(Puja Ghosh)
December 30, 2024, 6:43pm
3
Thanks Pinter for your help. After running this command line: slicer.util.pip_install(“pyacvd<0.3”), surface toolbox is working now.
@Puja_Ghosh How did you determine that you needed pyacvd<0.3?
Was it from this post? Or self-discovery?
Unfortunately, pyacvd developers broke their package in their 0.3.0 version by adding C code that needs to be compiled and it is only compatible with VTK hosted on PyPI. I’ve submitted an issue to their tracker , but since probably they will not fix this for a long time, I’ll add a version restriction to only use pyacvd<0.3.
In the meantime, you can fix the issue by executing slicer.util.pip_install("pyacvd<0.3") in the Slicer Python console.
Can you confirm that pyacvd==0.3.1 works successfully? That would be a follow up to the below post.
A new version of pyacvd is ready that does not depend on OpenMP. Please try if it works:
pip_install("pyacvd==0.3.1")
Based on this information maybe @mau_igna_06 or @lassoan could update the install version at:
return
self.updateProcessCallback(message)
@staticmethod
def installRemeshPrerequisites(force=False):
# install required pyacvd package
try:
import pyacvd
except ModuleNotFoundError as e:
if force or slicer.util.confirmOkCancelDisplay("This function requires 'pyacvd' Python package. Click OK to install it now."):
slicer.util.pip_install("pyacvd")
else:
return False
return True
@staticmethod
def remesh(inputModel, outputModel, subdivide=0, clusters=10000):
"""Uniformly remesh the surface using ACVD algorithm (https://github.com/pyvista/pyacvd). It requires pyacvd Python package.
:param subdivide: Subdivide each cells this number of times before remesh. Each subdivision creates 4 triangles for each input triangle.
This is needed if the required number of desired points is higher than the number of points in the input mesh, or there are some too large cells in the input mesh.
Puja_Ghosh
(Puja Ghosh)
December 30, 2024, 10:27pm
5
Hi James,
I got this command from the post that you have shared and it worked successfully for me.
1 Like
mau_igna_06
(Mauro I. Dominguez)
December 30, 2024, 11:34pm
6
1 Like