This is a simple script for converting dozens of .dcm slices to a single .raw file.
Modify the dicomPath to the parent directory of your .dcm files (only .dcm files would be processed, no warry about other file types).
Then run the script, an all_in_one.raw file would be generated!