Open LenaOestreich13 opened 1 year ago
What are the commands you are using for processing your data?
Copied and pasted below. I tried it with and without flipping the peaks:
calc_FA -i ${subj}_dwi_b1000.nii.gz -o ${subj}_FA.nii.gz --bvals ${subj}_dwi_b1000.bval --bvecs ${subj}_dwi_b1000.bvec \ --brain_mask nodif_brain_mask.nii.gz
flirt -ref /Users/uqloestr/anaconda3/lib/python3.10/site-packages/tractseg/resources/MNI_FA_template.nii.gz -in ${subj}_FA.nii.gz -out ${subj}_FA_MNI.nii.gz -omat FA_2_MNI.mat -dof 6 -cost mutualinfo -searchcost mutualinfo
flirt -ref /Users/uqloestr/anaconda3/lib/python3.10/site-packages/tractseg/resources/MNI_FA_template.nii.gz -in ${subj}_dwi_b1000.nii.gz -out ${subj}_dwi_b1000_MNI.nii.gz -applyxfm -init FA_2_MNI.mat -dof 6 cp ${subj}_dwi_b1000.bval MNI.bvals rotate_bvecs -i ${subj}_dwi_b1000.bvec -t FA_2_MNI.mat -o MNI.bvecs
TractSeg -i ${subj}_dwi_b1000_MNI.nii.gz -o tractseg_output --raw_diffusion_input --preprocess
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
flip_peaks -i tractseg_output/peaks.nii.gz -o tractseg_output/peaks_flipped.nii.gz -a y
Tracking -i tractseg_output/peaks_flipped.nii.gz -o tractseg_output
Can you try again without the --preprocess
option (because you basically did that yourself with the flirt commands) and without the line flip_peaks -i tractseg_output/peaks.nii.gz -o tractseg_output/peaks_flipped.nii.gz -a y
. Do the binary masks from the first TractSeg call already look good?
I just did but it's not working either. The binary maps look good to me. Here 2 examples of the left arcuate and CC1:
I also managed to reconstruct white matter tracts using tckgen in MRtriX, so the endpoints seem to be fine, too.
I tried running it by installing Cython first with pip install https://github.com/MIC-DKFZ/TractSeg/archive/cython_tracking.zip but that made everything worse, so that I couldn't run any of the tractseg command with the options anympre.
I was also wondering if it's an access issue to anaconda scripts, so I reinstalled it with homebrew, but that also gave me an error when trying to run tracking:
If you send me the data for one subject where the error occurs I can try to reproduce the issue.
Thanks! Here is a link to the data for 1 pp. I included the raw data and the folders with the processed data, as far as I got: https://www.dropbox.com/scl/fo/5fjuprjtnkpj7gsv37kqo/h?dl=0&rlkey=ze4jtoqdkjraox746evde3mr7
From: Jakob Wasserthal @.> Reply to: MIC-DKFZ/TractSeg @.> Date: Friday, 14 April 2023 at 4:59 pm To: MIC-DKFZ/TractSeg @.> Cc: Lena Oestreich @.>, Author @.***> Subject: Re: [MIC-DKFZ/TractSeg] error message when tracking (Issue #231)
If you send me the data for one subject where the error occurs I can try to reproduce the issue.
— Reply to this email directly, view it on GitHubhttps://github.com/MIC-DKFZ/TractSeg/issues/231#issuecomment-1508020032, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMHPIYVI2ETT3WNVFZHLNQLXBDYVVANCNFSM6AAAAAAWX52DDQ. You are receiving this because you authored the thread.Message ID: @.***>
Thanks for sending the data. If you run the following commands, it works for me.
TractSeg -i dwi_b1000_MNI.nii.gz -o tractseg_output --raw_diffusion_input
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
Thanks, I just tried that but still get the same error when I run tracking:
@.***
Do you have any idea what it might cause this? Should I try reinstalling tractseg and all dependencies? Would that be anaconda3, pytorch, MRtriX3 and FSL or am I missing anything?
Thanks ,Lena
From: Jakob Wasserthal @.> Reply to: MIC-DKFZ/TractSeg @.> Date: Monday, 17 April 2023 at 10:55 pm To: MIC-DKFZ/TractSeg @.> Cc: Lena Oestreich @.>, Author @.***> Subject: Re: [MIC-DKFZ/TractSeg] error message when tracking (Issue #231)
Thanks for sending the data. If you run the following commands, it works for me.
TractSeg -i dwi_b1000_MNI.nii.gz -o tractseg_output --raw_diffusion_input
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
— Reply to this email directly, view it on GitHubhttps://github.com/MIC-DKFZ/TractSeg/issues/231#issuecomment-1511285453, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMHPIYWW4T35XG5B4LFHLCDXBU4VDANCNFSM6AAAAAAWX52DDQ. You are receiving this because you authored the thread.Message ID: @.***>
I would try again on a different computer
That worked. I ran it on a computer that had miniconda instead of anaconda, but I think the other software and versions were the same. It’s odd cause the one I ran it on previously is brand new and I only installed everything about 3 weeks ago, so should have the most up to date versions.
Anyway, I’ll try reinstalling and using miniconda instead.
Thanks for your help and sorry for essentially wasting your time.
Cheers, Lena
From: Jakob Wasserthal @.> Date: Tuesday, 18 April 2023 at 4:46 pm To: MIC-DKFZ/TractSeg @.> Cc: Lena Oestreich @.>, Author @.> Subject: Re: [MIC-DKFZ/TractSeg] error message when tracking (Issue #231)
I would try again on a different computer
— Reply to this email directly, view it on GitHubhttps://github.com/MIC-DKFZ/TractSeg/issues/231#issuecomment-1512529309, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMHPIYSKSCYQVGJXFDONQOTXBY2DJANCNFSM6AAAAAAWX52DDQ. You are receiving this because you authored the thread.Message ID: @.***>
Hi there,
I have been able to process my data according to the tutorial. The output files look good, but I get the following error when running tracking:
Tracking -i tractseg_output/peaks.nii.gz -o tractseg_output
0%| | 0/72 [00:05<?, ?it/s] multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Users/uqloestr/anaconda3/lib/python3.10/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, *kwds)) File "/Users/uqloestr/anaconda3/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar return list(map(args)) File "/Users/uqloestr/anaconda3/lib/python3.10/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 "/Users/uqloestr/anaconda3/lib/python3.10/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 "/Users/uqloestr/anaconda3/lib/python3.10/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])] TypeError: 'NoneType' object is not subscriptable """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Users/uqloestr/anaconda3/bin/Tracking", line 168, in
main()
File "/Users/uqloestr/anaconda3/bin/Tracking", line 158, in main
tracking.track(bundle, input_path, Config.PREDICT_IMG_OUTPUT,
File "/Users/uqloestr/anaconda3/lib/python3.10/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 "/Users/uqloestr/anaconda3/lib/python3.10/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 "/Users/uqloestr/anaconda3/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/uqloestr/anaconda3/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
TypeError: 'NoneType' object is not subscriptable
Any help would be hugely appreciated!
Thanks, Lena