Skip to content

csabaiBio/mammo-data-utils

Repository files navigation

DICOM conversion

For some reason some DICOMs are encoded with some propietary format...

First need to encode these:

find . -name '*.dcm'  | xargs -n1 -P8 -I{} bash -c 'f={}; gdcmconv --raw -F $f ${f/.dcm/_raw.dcm}'

After converting to normal DICOMs we can finally decode to PNG:

find . -name '*_raw.dcm'  | xargs -n1 -P8 -I{} bash -c 'f={}; dcmj2pnm $f | convert - ${f/_raw.dcm/.png}'

Finally we have a lot of PNGs decoded from the dicom files. :)

Steps

Setup a virtual env:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Run process_data_dir.py
  2. Run process_annotations.py
  3. Run create_coco.py
  4. Run visualize.py # to visualize

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages