Skip to content

Instantly share code, notes, and snippets.

@fcoclavero
Created September 13, 2025 20:06
Show Gist options
  • Select an option

  • Save fcoclavero/7388e37fe914a18cd9505271fca042ed to your computer and use it in GitHub Desktop.

Select an option

Save fcoclavero/7388e37fe914a18cd9505271fca042ed to your computer and use it in GitHub Desktop.
dicom2png
#!/bin/bash
input_dir="$HOME/Downloads/a"
output_dir="$HOME/Downloads/c"
mkdir -p "$output_dir"
for file in "$input_dir"/*.DCM; do
filename=$(basename "$file" .DCM)
dcm2img "$file" "$output_dir/${filename}.png"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment