AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
June 16, 2015 08:07PM
Hi Daniel,


Thanks for your help. I am digging this data back up now and never really worked through this problem.

I tried your fix and it's almost there but I think that the real problem is the phase-encoding direction needs to be switched. I've used the help page from 3dQwarp to get me slightly further, I think.


##I used Dimon to bring all of the DICOM files into one functional file. I have checked the ${subID}_dicom_info file and the order seems to be correct.

Dimon -infile_pattern "*dcm" \
-gert_create_dataset \
-dicom_org \
-sort_by_acq_time \
-gert_write_as_nifti \
-gert_to3d_prefix tmp_${subID}_rest \
-save_details ${subID}_dicom_info

##But, as I described before, every other volume in this file seems to be oriented in opposite directions. I believe this is from the alternating phase-encoding directions for every other volume, i.e, vol.1 was acquired L-R and vol.2 was acquired R-L.
##Thus, I separated out the L-R and R-L volumes respectively.

3dbucket -overwrite -prefix tmp_${subID}_rest_LR.nii -fbuc 'tmp_${subID}_rest.nii[0..$(2)]'
3dbucket -overwrite -prefix tmp_${subID}_rest_RL.nii -fbuc 'tmp_${subID}_rest.nii[1..$(2)]'

##I then used 3dQwarp to find the appropriate warping matrix to warp the R-L volumes to L-R.

3dQwarp -overwrite -base tmp_${subID}_rest_LR.nii -source tmp_${subID}_rest_RL.nii -plusminus -pmNAMES RL LR -prefix tmp_${subID}_rest_phaseflip

##Finally, I applied this warp ONLY to the R-L volumes of the output from Dimon.

3dNwarpApply -overwrite -nwarp tmp_P0959_rest_phaseflip_LR_WARP+orig. -source 'tmp_P0959_rest.nii[1..$(2)]' -prefix P0959_rest.nii

##However, the output from 3dNwarpApply is only those warped volumes (R-L --> L-R). Is there a way to bring the original L-R volumes back as they were, interleaved with the R-L phase-encoded volumes?


Thanks so much for your help!
Subject Author Posted

Alternating Phase-encoding direction help

Andrew_Lynn April 17, 2015 07:20PM

Re: Alternating Phase-encoding direction help

Daniel Glen April 19, 2015 05:24PM

Re: Alternating Phase-encoding direction help

Andrew_Lynn June 16, 2015 08:07PM

Re: Alternating Phase-encoding direction help

Isaac Schwabacher June 17, 2015 04:27PM