Skip to content

fyrdahl/dicominator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DICOMinator

DICOMinator is an open-source Python script for sorting images from common 4D Flow pulse sequences.

Features ✨

  • 📂 Recursively traverses the input directory to find all DICOM files.
  • 📂 Sorts the DICOM files into a specified output directory based on encoding direction.
  • 💾 Provides options to save the sorted data in various formats:
    • 📦 NIfTI: The NIfTI files are split along the time dimension, allowing them to be imported as a Sequence (or MultiVolume) in 3D Slicer.
    • 📦 h5: The h5 format should be compatible with Edward Ferdian's 4DFlowNet.
    • 📦 mat: The mat format should be compatible with Julio Sotelo's 4D-Flow-Matlab-Toolbox.

Installation 🛠️

  1. Clone the repository:

    git clone https://github.com/fyrdahl/dicominator.git
    cd dicominator
  2. Install the required dependencies:

    pip install -r requirements.txt

Prerequisites 📋

  • Python 3.6 or higher
  • Required Python libraries (listed in requirements.txt)

Usage 🚀

Arguments

  • input_root: The root folder where DICOMs are stored.
  • output_root: The root folder where DICOMs will be stored (will be created if it does not exist).
  • -d, --desc: Optional 'SeriesDescription' to search for.
  • -p, --purge: Purge the output folder before processing.
  • --nii: Save as NIfTI.
  • --h5: Save as h5.
  • --mat: Save as mat.
  • --pcmra: Save PCMRA image in NIfTI format
  • -l, --list: List all unique Series Descriptions in the dataset without further processing.
  • -f, --force: Force process files thay may or may not be flow datasets.

Example

python dicominator.py /path/to/input /path/to/output --desc "4D Flow" --nii --h5 --mat

Contact 📫

For support, please contact [email protected] or open an issue.

Acknowledgments 🙏

Contributing 🤝

Contributions are welcome! Is your 4D Flow sequence not supported? Please feel free to open an issue or submit a pull request.

Code Formatting

This project uses Ruff for code formatting.

License ⚖️

This project is licensed under the MIT License.

About

A tool to sort 4D Flow images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages