For IMA files, these files can be handled fairly simply using Dimon to organize your Dicom files into the proper order, and then use the script it produces to call to3d.
Dimon -GERT_Reco -quit -dicom_org -infile_pattern "ima/*.IMA"
./GERT_Reco_dicom
You can edit the GERT_Reco_dicom script if you would like to change the defaults for to3d (like the file prefix, for example).
For the files you sent as .dcm, it's a bit more complicated. These are actually at least 4 different sets of data. Each one includes a separate base set labeled as 0102, 0103 or 0104 inside the filename. Each run of data is different with different orientations (axial, coronal and sagittal) and obliquities. Additionally, there is a marker slice in an alternate orientation in each run that can not be read in with the others that needs to be ignored, all labeled as slice 00000, or at least read in separately as a single slice. None of this data was out of order, so Dimon was not necessary to compute the correct order of files.
mkdir sagmarker
mv *00000.dcm sagmarker/
cd ..
to3d -prefix testto3d_0104 ima2/*0104*.dcm
to3d -prefix testto3d_0102 ima2/*0102*.dcm
to3d -prefix testto3d_0103 ima2/*0103*.dcm
Several of these datasets were also acquired obliquely, so you will need to be careful about their processing and comparisons with other datasets. You will need to consider using the 3dWarp options for oblique data.