reformat CT scanning tiff file to a afni-readable dicom file

Hi,
I’m trying to upload the Tiff file of a CT scanning brain skull to afni. Before that, I reformat the tiff file into dicom file in Matlab using dicomwrite function.
However when I use afni to read the dicom file for futher processing, afni cannot read them properly let alone to save them. I’m using Dimon -gert_create_dataset function.

I’ve attached the warning from the afni.

Thank you very much for your help.

Veronica

Hmmm… plenty of things that could be causing the header to go wonky. I wonder if you could use matlab’s niftiwrite function to write a NIFTI that we could then read into AFNI.

Thank you. I’ll try it out.

Best
Veronica

You could try using to3d with the TIFF files as input. Dimon is meant mostly for DICOM files, not TIFF files, but it calls to3d to do the conversion to AFNI or NIFTI format. The netpbm package must be installed too, but that’s typically part of AFNI installation. Note, not all TIFF files will be readable. It’s sometimes useful to use something like ImageJ/Fiji for some of the formats. You may still need to fix orientation issues afterwards in AFNI with 3drefit.