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

Tractometry_flow fails if not enough streamlines #843

Open
arnaudbore opened this issue Dec 12, 2023 · 1 comment
Open

Tractometry_flow fails if not enough streamlines #843

arnaudbore opened this issue Dec 12, 2023 · 1 comment

Comments

@arnaudbore
Copy link
Contributor

scil_compute_bundle_voxel_label_map.py

  INFO:    Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
  Traceback (most recent call last):
    File "/usr/local/bin/scil_compute_bundle_voxel_label_map.py", line 33, in <module>
      sys.exit(load_entry_point('scilpy', 'console_scripts', 'scil_compute_bundle_voxel_label_map.py')())
    File "/scilpy/scripts/scil_compute_bundle_voxel_label_map.py", line 212, in main
      kd_tree = cKDTree(final_streamlines._data)
    File "_ckdtree.pyx", line 560, in scipy.spatial._ckdtree.cKDTree.__init__
  ValueError: data must be 2 dimensions
@yizhwan
Copy link

yizhwan commented Mar 23, 2024

May I ask if there is a solution to this issue yet? I am receiving the same error when running tractometry_flow:
Error executing process > 'Bundle_Label_And_Distance_Maps (S17 - [:])'

Caused by:
Process Bundle_Label_And_Distance_Maps (S17 - [:]) terminated with an error exit status (1)

Command executed:

for bundle in S17__AC_ic.trk S17__AF_L_ic.trk S17__AF_R_ic.trk S17__CC_Fr_1_ic.trk S17__CC_Fr_2_ic.trk S17__CC_Oc_ic.trk S17__CC_Pa_ic.trk S17__CC_Pr_Po_ic.trk S17__CG_L_Po_ic.trk S17__CG_L_curve_ic.trk S17__CG_L_ic.trk S17__CG_R_Po_ic.trk S17__CG_R_ic.trk S17__FAT_L_ic.trk S17__FAT_R_ic.trk S17__FPT_L_Brainstem_ic.trk S17__FPT_L_ic.trk S17__FPT_R_ic.trk S17__ICP_L_ic.trk S17__IFOF_L_ic.trk S17__IFOF_R_ic.trk S17__ILF_L_ic.trk S17__ILF_R_ic.trk S17__MCP_ic.trk S17__MdLF_L_ic.trk S17__MdLF_R_ic.trk S17__OR_ML_L_ic.trk S17__OR_ML_R_ic.trk S17__POPT_L_Brainstem_ic.trk S17__POPT_L_ic.trk S17__POPT_R_Brainstem_ic.trk S17__POPT_R_ic.trk S17__PYT_L_Brainstem_ic.trk S17__PYT_L_ic.trk S17__PYT_R_Brainstem_ic.trk S17__PYT_R_ic.trk S17__SCP_L_ic.trk S17__SCP_R_ic.trk S17__SLF_L_ic.trk S17__SLF_R_ic.trk S17__UF_L_ic.trk S17__UF_R_ic.trk;
do if [[ $bundle == "__" ]]; then
pos=$(($(echo $bundle | grep -b -o __ | cut -d: -f1)+2))
bname=${bundle:$pos}
bname=$(basename $bname .trk)
else
bname=$(basename $bundle .trk)
fi
bname=${bname/_ic/}

  centroid=S17__${bname}_centroid_50.trk
  if [[ -f ${centroid} ]]; then
      scil_compute_bundle_voxel_label_map.py $bundle ${centroid} tmp_out -f

      mv tmp_out/labels_map.nii.gz S17__${bname}_labels.nii.gz
      mv tmp_out/distance_map.nii.gz S17__${bname}_distances.nii.gz

      mv tmp_out/labels.trk S17__${bname}_labels.trk
      mv tmp_out/distance.trk S17__${bname}_distances.trk
  fi

done

Command exit status:
1

Command output:
(empty)

Command error:
Traceback (most recent call last):
File "/usr/local/bin/scil_compute_bundle_voxel_label_map.py", line 33, in
sys.exit(load_entry_point('scilpy', 'console_scripts', 'scil_compute_bundle_voxel_label_map.py')())
File "/scilpy/scripts/scil_compute_bundle_voxel_label_map.py", line 212, in main
kd_tree = cKDTree(final_streamlines._data)
File "_ckdtree.pyx", line 560, in scipy.spatial._ckdtree.cKDTree.init
ValueError: data must be 2 dimensions

Work dir:

/tract_flow/work/68/cd58748452dccb9c386f18767a2238

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

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