run_Dimon.csh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/tcsh
  2. ## Get the list of unique image files
  3. ## * The reason for doing this unique image list
  4. ## is that sometimes multiple copies of the same
  5. ## image are output by DICOM server software,
  6. ## and that is confusing to the Dimon program.
  7. ## * The uniq_images program will make a list of
  8. ## images that are not identical.
  9. ## * uniq_images is an AFNI package program.
  10. uniq_images I*[0123456789] > uniq_image_list.txt
  11. ## run Dimon to read in the files and create a NIFTI format dataset
  12. ## * the list of input files is from uniq_images
  13. ## * the output filename prefix will be T1.3D
  14. ## * the output file will be stored in the directory
  15. ## above this one
  16. ## * the input files will be sorted by acquisition time,
  17. ## not by filename
  18. ## * if the DICOM header has duplicate elements, use
  19. # the last copy found, not the first
  20. Dimon -infile_list uniq_image_list.txt \
  21. -gert_create_dataset \
  22. -gert_write_as_nifti \
  23. -gert_to3d_prefix T1.3D \
  24. -gert_outdir .. \
  25. -dicom_org \
  26. -use_last_elem \
  27. -save_details Dimon.details \
  28. -gert_quit_on_err
  29. ## delete the list of unique images
  30. \rm uniq_image_list.txt