Good morning, AFNI team,
I am having trouble aligning my anatomical dataset to my DWI dataset. I am using fat_proc_mapt_to_dti but when I superimpose the output fp_dwi_aparc+aseg.nii.gz with my dt_FA.nii, they do not line up properly, and then tractography fails. For some reason, my QC images are not being generated by AFNI, which is why I am superimposing these two datasets as a means of quality checking.
Before running fat_proc_map_to_dti, I ran fat_proc_dwi_to_dti using the following command:
fat_proc_dwi_to_dt \
-in_dwi $BASE/$SUBJ/INTERMED/FILT_AP/FILT_AP_TORTOISE_final.nii \
-in_col_matT $BASE/$SUBJ/INTERMED/FILT_AP/FILT_AP_TORTOISE_final.bmtxt \
-prefix $BASE/$SUBJ/INTERMED/DTI/DTI \
-in_struc_res $BASE/$SUBJ/INTERMED/FILT_AP/structural_0.nii \
-flip_y \
-in_ref_orig $BASE/$SUBJ/ANATOM/${SUBJ}_t2w.nii \
Which was followed by:
fat_proc_map_to_dti \
-source $BASE/$SUBJ/ANATOM/brain.finalsurfs.nii.gz \
-followers_NN $BASE/$SUBJ/ANATOM/aparc+aseg.nii.gz \
-base $BASE/$SUBJ/INTERMED/FILT_AP/structural_0.nii \
-prefix $BASE/$SUBJ/INTERMED/fp_map2dti/fp_dwi
Using structural_0.nii as my -base gave better results in comparison to using FILT_AP_TORTOISE_final.nii'[0]'.
I suspect that the use of the T2w file in fat_proc_dwi_to_dti is what is skewing the alignment but I am just not sure.
Please assist if possible ![]()
P.S. Here is my error for the QC generation
------------------ start of optionizing ------------------
++ Found input file: /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/FILT_AP/structural_0.nii
++ Found input file: /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/__WORKING_map_to_dti_fp_dwi/f10_edges.nii
++ Using blowup factor: 2
++ Using opacity: 6
++ Making temporary work directory to copy vis files: /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH
++ Converted 0 to labels
++ Final subbrick indices: -1 -1 -1
++ Copy ulay to visualize (volumetric) within user's range:
++ Ulay to be visualized within user range:
[2%, 98%] -> [0.000000, 174.157455]
++ 3dcalc: AFNI version=AFNI_26.0.09 (Feb 23 2026) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH/tmp_ulay.nii
++ 3dcalc: AFNI version=AFNI_26.0.09 (Feb 23 2026) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH/tmp_olay.nii
++ For olay, the 50%ile value leads to
--> upper range value: 104.891083
++ Dimensions (xyzt): 128 128 128 1
++ (initial) Slice spacing ordered (x,y,z) is: 8 8 8
++ 3dmaskdump: AFNI version=AFNI_26.0.09 (Feb 23 2026) [64-bit]
++ Executing 3dcalc()
argv[0]=3dcalc argv[1]=-a argv[2]=/home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/FILT_AP/structural_0.nii[0] argv[3]=-expr argv[4]=a argv[5]=-byte argv[6]=-session argv[7]=/tmp argv[8]=-prefix argv[9]=3dcalc_AFN_35rwu2imiFSJvs5skyPnHw argv[10]=-verbose
++ 3dcalc: AFNI version=AFNI_26.0.09 (Feb 23 2026) [64-bit]
++ Authored by: A cast of thousands
++ Computing sub-brick 0
++ Scaling output to type byte brick(s)
++ Sub-brick 0 scale factor = 0.160148
++ Computing output statistics
++ Output dataset /tmp/3dcalc_AFN_35rwu2imiFSJvs5skyPnHw+orig.BRIK
++ 2097152 voxels in the entire dataset (no mask)
++ 1 voxels in the boxes and/or balls
++ Using only the boxes+balls mask
++ Will have: SET_IJK 64 63 64
------------------- end of optionizing -------------------
-- trying to start Xvfb :445
[1] 297614
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86CameraAccessEnable
> Warning: Could not resolve keysym XF86CameraAccessDisable
> Warning: Could not resolve keysym XF86CameraAccessToggle
> Warning: Could not resolve keysym XF86NextElement
> Warning: Could not resolve keysym XF86PreviousElement
> Warning: Could not resolve keysym XF86AutopilotEngageToggle
> Warning: Could not resolve keysym XF86MarkWaypoint
> Warning: Could not resolve keysym XF86Sos
> Warning: Could not resolve keysym XF86NavChart
> Warning: Could not resolve keysym XF86FishingChart
> Warning: Could not resolve keysym XF86SingleRangeRadar
> Warning: Could not resolve keysym XF86DualRangeRadar
> Warning: Could not resolve keysym XF86RadarOverlay
> Warning: Could not resolve keysym XF86TraditionalSonar
> Warning: Could not resolve keysym XF86ClearvuSonar
> Warning: Could not resolve keysym XF86SidevuSonar
> Warning: Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
+++ Command Echo:
afni -q -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=6 mont=5x3:8:0:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=6 mont=5x3:8:0:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=6 mont=5x3:8:0:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 red_monochrome -com DO_NOTHING -com SET_SUBBRICKS -1 -1 -1 -com SET_ULAY_RANGE A.all 0.000000 174.157455 -com SET_FUNC_RANGE 104.891083 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_IJK 64 63 64 -com SAVE_PNG axialimage /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/fp_dwi_qc_base_srce.axi blowup=2 -com SAVE_PNG sagittalimage /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/fp_dwi_qc_base_srce.sag blowup=2 -com SAVE_PNG coronalimage /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/fp_dwi_qc_base_srce.cor blowup=2 -com QUITT /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH
+/home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH
Fatal Signal 11 (SIGSEGV) received
Last STATUS: processing floats
mri_histogram
ISQ_statify_one
ISQ_process_mri
ISQ_manufacture_one
ISQ_make_montage
ISQ_make_image
ISQ_show_image
ISQ_redisplay
drive_MCW_imseq
AFNI_drive_open_window
AFNI_driver
AFNI_startup_timeout_CB
AFNI:main
Bottom of Debug Stack
** AFNI version = AFNI_26.0.09 Compile date = Feb 23 2026
** [[Precompiled binary linux_ubuntu_24_64: Feb 23 2026]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/pippa/.afni.crashlog
+* Removing temporary image directory '/home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/__tmp_chauf_PAEGifULhbH'.
[1] Done Xvfb :445 -screen 0 1024x768x24
++ DONE (good exit)
see: /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/fp_dwi_qc_base_srce*
++ QC image 01 (/home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/fp_dwi.nii.gz olay on /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/FILT_AP/structural_0.nii): fp_dwi_qc_base_src
++ My command:
@chauffeur_afni -ulay /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/FILT_AP/structural_0.nii -ulay_range 2% 98% -olay /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/fp_dwi.nii.gz -pbar_posonly -opacity 4 -prefix /home/pippa/UCT_HPC_backup/brtphi011/fasd_trial/pippa_DTI_subjects/2003/INTERMED/fp_map2dti/QC/fp_dwi_qc_base_src -montx 5 -monty 3 -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean
++ Using AFNI ver : AFNI_26.0.09
++ chauffeur ver : 7.1
Usually, the init_qc_00_overlap_usrc_obase.jpg file is the only file that is generated in the QC directory.