Error Generating tractograms in subject space
Dear experts,
I'm unable to generate tractograms in subject space.
When I execute the command:
Tracking -i tractseg_output/peaks.nii.gz -o tractseg_output,
I get the following error
/bin/sh: 1: export: Files/Microsoft/jdk-11.0.12.7-hotspot/bin:/mnt/c/Program: bad variable name
0%| | 0/72 [00:00<?, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/amitjc/.local/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 157, in process_seedpoint
streamline_part1, length_1 = process_one_way(peaks, streamline1, max_nr_steps, step_size, probabilistic,
File "/home/amitjc/.local/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 52, in process_one_way
dir_raw = get_at_idx(peaks, (last_point[0], last_point[1], last_point[2]))
File "/home/amitjc/.local/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 43, in get_at_idx
return img[int(idx[0]), int(idx[1]), int(idx[2])]
IndexError: index 59 is out of bounds for axis 2 with size 57
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/amitjc/.local/bin/Tracking", line 169, in <module>
main()
File "/home/amitjc/.local/bin/Tracking", line 159, in main
tracking.track(bundle, input_path, Config.PREDICT_IMG_OUTPUT,
File "/home/amitjc/.local/lib/python3.8/site-packages/tractseg/libs/tracking.py", line 220, in track
streamlines = tractseg_prob_tracking.track(tom_peaks, max_nr_fibers=nr_fibers, smooth=5,
File "/home/amitjc/.local/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 263, in track
streamlines_tmp = pool.map(partial(process_seedpoint, next_step_displacement_std=next_step_displacement_std,
File "/usr/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
IndexError: index 59 is out of bounds for axis 2 with size 57
Look forward to guidance to address the issue.
Thank you.
Best Regards, Amit.
Which version of TractSeg are you using? And on which operating system are you running it?
Dear Sir,
I'm using TractSeg v2.5 on WSL with Ubuntu20.04. I've also tried running this on native installation of Ubuntu 20.04, but encountered same error.
Thank you.
Best Regards, Amit.
Would you be able to share the data so I can try to reproduce the issue?
Dear Sir,
Please accept the invitation to my data repository.
Thank you.
Best Regards, Amit.
Thanks for sharing the data. I ran the following commands and everything worked fine for me.
TractSeg -i Diffusion.nii.gz --raw_diffusion_input --keep_intermediate_files
TractSeg -i tractseg_output/peaks.nii.gz -o tractseg_output --output_type endings_segmentation
TractSeg -i tractseg_output/peaks.nii.gz -o tractseg_output --output_type TOM
Tracking -i tractseg_output/peaks.nii.gz -o tractseg_output --tracking_format tck
Dear Sir,
With above commands, I face no issue generating the tracts in the MNI space.
Even the first 3 commands run perfectly fine, for generating Segmentations and TOMs in subject space viz.,
TractSeg -i Diffusion.nii.gz -o tractseg_output --output_type tract_segmentation --raw_diffusion_input --preprocess
TractSeg -i tractseg_output/peaks.nii.gz -o tractseg_output --output_type endings_segmentation --preprocess
TractSeg -i tractseg_output/peaks.nii.gz -o tractseg_output --output_type TOM --preprocess
Following this, the above error is encountered while executing
Tracking -i tractseg_output/peaks.nii.gz -o tractseg_output
Appreciate your support through the troubleshooting. Look forward to further guidance.
Thank you.
Best Regards, Amit.