Skip to content

shizuo-kaji/CTKernelConversion

Repository files navigation

Python code for converting sharp-kernel reconstructed CT images to soft-kernel images

This is a companion code for the paper

The code is based on

Requirements

  • python 3: Anaconda is recommended
  • chainer >= 7.2.0, chainercv, opecv, pydicom: install them by
pip install -U git+https://github.com/chainer/chainer.git
pip install -U chainercv opencv-contrib-python pydicom

(optional, but recommended) To use GPU, you have to install CUDA and CuPy.

  • CUDA: follow the instruction here
  • CuPy: follow the instruction here

How to use

  • Arrange DICOM files into the directory structure as in the following example: (phantom images are included as demo)
sharp_kernel
+-- patient1
|   +-- patient1_001.dcm
|   +-- patient1_002.dcm
|   +-- ...
+-- patient2
|   +-- patient2_001.dcm
|   +-- patient2_002.dcm
|   +-- ...
  • Execute the following commands from the terminal/command prompt:
    python convert.py -a args_partial -R sharp_kernel -o partial
    python convert.py -a args_full -R sharp_kernel -o full
    python dicom_overlay.py -i0 sharp_kernel -i1 full -i2 partial -o converted
  • The first line creates a (temporary) directory named partial which contains converted images by the partial model (that is, CT values are cropped to -300 to 300 HU).
  • The second line creates a (temporary) directory named full which contains converted images by the full model.
  • The third line creates a directory named converted which contains the final converted images obtained by fusing the above two.

Licence

MIT Licence

About

Python code for converting sharp-kernel reconstructed CT images to soft-kernel images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages