Open meliamne opened 1 year ago
Hi @meliamne. This is happening because the msfm package isn't being compiled properly for some reason.
The most immediate fix is to remove the import msfm
call at the top of the module, and only be imported if using quality=True
for R2Tracer.
So this:
def _fast_marching(self):
speed = self._make_speed()
# # Fast Marching
if self._quality:
# if not self._silent: print('--MSFM...')
self._t = msfm.run(speed, self._bimg.copy().astype(
'int64'), self._soma.centroid, True, True)
else:
# if not self._silent: print('--FM...')
marchmap = np.ones(self._bimg.shape)
marchmap[self._soma.centroid[0],
self._soma.centroid[1], self._soma.centroid[2]] = -1
self._t = skfmm.travel_time(marchmap, speed, dx=5e-3)
should be changed to this:
def _fast_marching(self):
speed = self._make_speed()
# # Fast Marching
if self._quality:
# only import msfm if quality = True
import msfm
# if not self._silent: print('--MSFM...')
self._t = msfm.run(speed, self._bimg.copy().astype(
'int64'), self._soma.centroid, True, True)
else:
# if not self._silent: print('--FM...')
marchmap = np.ones(self._bimg.shape)
marchmap[self._soma.centroid[0],
self._soma.centroid[1], self._soma.centroid[2]] = -1
self._t = skfmm.travel_time(marchmap, speed, dx=5e-3)
Dear dev,
I installed the library in a fresh conda env as suggested and pip installed rivuletpy from both pip and github. After the installation, the rtrace command cannot be found by the system. Running either the quicktest or the rtrace app from the github repo reports
ModuleNotFoundError: No module named 'msfm'
.Do you have any idea what the issue could be?
Kind regards.
Python 3.9.16
pip list