Replies: 4 comments 1 reply
-
It seems that this code has not been properly ported and tested for python3. in the source file |
Beta Was this translation helpful? Give feedback.
-
I have pushed a fix in the sources but I don't know it it will be enough since I have not tested it and I have not run the process on my side. |
Beta Was this translation helpful? Give feedback.
-
Hi densiri: Thanks for your help ! ! I also tried run the python scripts in brainvisa-4.6.1 with python2.7, it gaves me the same error (seems the code was built in a more old version ). I found the easiest way to fix the problem is add .astype(int) after variables should be looped as an integer, a litter similar with your modified scripts. I guess the sulcal basins extraction pipeline in 4.6.1 and 5.1.1 seems not very different, is it ? after download files according to your instruction, I also seek a way to load brainvisa library in a python idel for convenient version error debug. If I want to use the scripts in 5.1.1, I believe your worried would be true... I used bv command to load a idel like pycharm outsied the container, but only the soma-base were found in loaded enviroment. I greatly hope that a fixed version can be used in the near future ...... |
Beta Was this translation helpful? Give feedback.
-
The sulcal basins extraction pipelines are not different between 4.6 and 5.1, you're right. There has been very little evolution in the toolboxes during the last years.
|
Beta Was this translation helpful? Give feedback.
-
Dear BrainVisa expeerts :
I'm still somewhat confused about some of the data formats, so my questions may seem a bit naive, please forgive me. I have run the sulcalpitextraction from axon-process. The command I used is
axon-runprocess SulcalPitsExtraction /casa/home/f01200624V005/surf/lh.white.gii left /casa/home/f01200624V005/surf/lh.white_pole_cingular.gii 0.03 1.5 20.0 236.18 50.0 91312.2 /casa/home/f01200624V005/surf/lh.white_DPF.gii /casa/home/f01200624V005/lh.white_pits.gii /casa/home/f01200624V005/surf/lh.white_noisy_pits.gii /casa/home/f01200624V005/surf/lh.white_ridges.gii /casa/home/f01200624V005/surf/lh.white_basins.gii
lh.white.gii is converted by mris_convert from a freesurfer recon-all output.
But I fouod it always return errors like below:
`Initializing brainvisa... (takes a while)...
Process Sulcal Pits Extraction started on 2023/05/19 23:07
computing DPF
DPF done
Computing the Fiedler geodesic length and surface area
Computing GEODESIC distance between the max and min
i: 778426number of the points in the path = 503, length of the path = 225.546
Computing the watershed with distance and ridge criteria for basins merging
i: 778426
ERROR: in Sulcal Pits Extraction 1 **
TypeError: 'float' object cannot be interpreted as an integer
**
**TypeError**
TypeError: 'float' object cannot be interpreted as an integer
Process Sulcal Pits Extraction finished on 2023/05/19 23:09 (1 minutes 48
seconds)
Traceback (most recent call last):
File "/casa/install/bin/axon-runprocess", line 4, in
run_module('brainvisa.axon.runprocess')
File "/usr/lib/python3.10/runpy.py", line 227, in run_module
return _run_code(code, {}, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/casa/install/python/brainvisa/axon/runprocess.py", line 512, in
run_process_with_distribution(
File "/casa/install/python/brainvisa/axon/runprocess.py", line 270, in run_process_with_distribution
brainvisa.processes.defaultContext().runProcess(process)
File "/casa/install/python/brainvisa/processes.py", line 3120, in runProcess
six.reraise(type(e[0]), e[0], e[1])
File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
raise value
File "/casa/install/python/brainvisa/processes.py", line 3412, in _processExecution
result = process.execution(self)
File "/casa/install/brainvisa/toolboxes/cortical_surface/processes/anatomy/SulcalPitsExtraction.py", line 151, in execution
labels_1, pitsKept_1, pitsRemoved_1, ridgePoints, parent_1 = watershed.watershed(mesh, vert_voronoi, dpf[0], mask, thresh_dist, self.thresh_ridge)
File "/casa/install/python/brainvisa/cortical_surface/surface_tools/mesh_watershed.py", line 79, in watershed
idx=np.arange((vert.size)/3).reshape((vert.size)/3,1) # vertices index
TypeError: 'float' object cannot be interpreted as an integer
Exception ignored in: <function TemporaryDiskItem.del at 0x7f9f4558d900>
Traceback (most recent call last):
File "/casa/install/python/brainvisa/data/neuroDiskItems.py", line 2756, in del
File "/casa/install/python/soma/singleton.py", line 88, in new
TypeError: Application.singleton_init() missing 2 required positional arguments: 'name' and 'version'
Exception ignored in: <function TemporaryDirectory.del at 0x7f9f4558d750>
Traceback (most recent call last):
File "/casa/install/python/brainvisa/data/neuroDiskItems.py", line 2699, in del
TypeError: 'NoneType' object is not callable`
"I'm confused about which variable corresponds to the "NoneType" in the error messages, and what the 'float' object is. I'm using all default parameters, so I'm not sure if I've set some incorrect inputs?"
Really appreaciated for any help !
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions