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  

|
May 12, 2022 10:31AM
Hey,

I'm trying running distortion correction on an oblique functional dataset of 54 slices through Matlab 2019a.
Everything seemed to work until I found out some black spots on the undistorted data.

These are the commands I use - and please find attached an example picture of the problem

- to convert dicom in afni readable nifti
dcm_to_nii_command = sprintf("Dimon -infile_prefix '%s/*.dcm' -use_obl_origin -gert_create_dataset -gert_write_as_nifti -gert_outdir %s -gert_to3d_prefix %s", input_directory_path, ...
output_filepath, ...
output_filename);

- to perform the distortion correction
warp_command = sprintf("3dQwarp -plusminus -pmNames reverse forward -source %s -base %s -prefix %s_warp.nii", inv_sbref_path, ...
sbref_path, ...
bids_id);
system(warp_command);

mb_appy_warp_command = sprintf("3dNwarpApply -quintic -nwarp %s_warp_forward_WARP.nii -source %s -prefix %s", bids_id, ...
mb_path, ...
corrected_mb_outpath);
system(mb_appy_warp_command);

sbref_apply_warp_command = sprintf("3dNwarpApply -quintic -nwarp %s_warp_forward_WARP.nii -source %s -prefix %s", bids_id, ...
sbref_path, ...
system(sbref_apply_warp_command);

So when I run this it suggests me to consider to3D -ushort2float. I tried but it seems I'm not allow to do it, and the commans is just ignored.
Any help?

Thanks
Cecilia
Attachments:
open | download - AFNI_undistorted_black_spots.PNG (129.2 KB)
Subject Author Posted

dark spots on undistorted data Attachments

cecistein May 12, 2022 10:31AM

Re: dark spots on undistorted data

rick reynolds May 12, 2022 10:39AM

Re: dark spots on undistorted data Attachments

cecistein May 12, 2022 10:52AM

Re: dark spots on undistorted data

rick reynolds May 12, 2022 10:58AM

Re: dark spots on undistorted data

cecistein May 12, 2022 11:33AM

Re: dark spots on undistorted data

rick reynolds May 12, 2022 11:39AM

Re: dark spots on undistorted data Attachments

cecistein May 12, 2022 12:23PM

Re: dark spots on undistorted data

cecistein May 12, 2022 12:24PM