diff --git a/README.md b/README.md index 1c10b60..fadcc09 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ ## Image pipeline +### Preprocessing + +originally DICOMs were converted to 299x299 PNGs using `convert_dicom_list_to_png.sh` script + + ### Weight files are available [here](https://datashare.ucsf.edu/stash/dataset/doi:10.7272/Q6XK8CQ9) ### General image model diff --git a/convert_dicom_list_to_png.sh b/convert_dicom_list_to_png.sh new file mode 100644 index 0000000..a1243e1 --- /dev/null +++ b/convert_dicom_list_to_png.sh @@ -0,0 +1,20 @@ +#!/bin/bash +filelist=$1 +OUT_DIRECTORY="/data/UCSF_MAMMO/2017-07-png-16bit" +TMPFILE="tmp.dcm" + +nn=0 +for file in $filelist; do + nn=$((nn+1)) + dirn_=$(dirname $file) + id=`echo $file | awk -v FS="/" '{for (nn=NF-3;nn