Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: icometrix
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 239 MB
Statistics
  • Stars: 372
  • Watchers: 12
  • Forks: 82
  • Open Issues: 61
  • Releases: 0
Created over 10 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.rst

=============
 dicom2nifti
=============

Python library for converting dicom files to nifti

:Author: Arne Brys
:Organization: `icometrix `_
:Repository: https://github.com/icometrix/dicom2nifti
:API documentation: https://icometrix.github.io/dicom2nifti/

=====================
 Using dicom2nifti
=====================
---------------
 Installation
---------------

conda:

.. code-block:: bash

   conda install -c conda-forge dicom2nifti

pip:

.. code-block:: bash

   pip install dicom2nifti

To support compressed dicom formats (JPEG, JPEG2000) we use GDCM in combination with pydicom.
Please install gdcm as required. https://pydicom.github.io/pydicom/stable/tutorials/installation.html

---------------
 Updating
---------------

conda:

.. code-block:: bash

   conda update dicom2nifti

pip:

.. code-block:: bash

   pip install dicom2nifti --upgrade

---------------
 Usage
---------------
Command line
^^^^^^^^^^^^^
.. code-block:: bash

   dicom2nifti [-h] [-G] [-r] [-o RESAMPLE_ORDER] [-p RESAMPLE_PADDING] [-M] [-C] [-R] input_directory output_directory


for more information

.. code-block:: bash

   dicom2nifti -h

From python
^^^^^^^^^^^^

Converting a directory with dicom files to nifti files

.. code-block:: python

   import dicom2nifti

   dicom2nifti.convert_directory(dicom_directory, output_folder, compression=True, reorient=True)

Converting a directory with only 1 series to 1 nifti file

.. code-block:: python

   import dicom2nifti

   dicom2nifti.dicom_series_to_nifti(original_dicom_directory, output_file, reorient_nifti=True)

----------------
 Supported data
----------------
Most anatomical data for CT and MR should be supported as long as they are in classical dicom files.

Try avoiding "Implicit VR Endian" if possible as this makes converting non anatomical (i.e. DTI, fMRI, ...) much more difficult.

There is some vendor specific support, more specifically for 4D imaging like fMRI and DTI/DKI

Gantry tilted CT
^^^^^^^^^^^^^^^^^
By default support for gantry tilted ct is disabled as we validate image orthogonality.
You can explicitly allow gantry tilted data by disabling this validation.

Standard this will result in a nifti file where the gantry tilt is captured by the affine matrix.
We also provide the option to resample the data to an orthogonal nifti.
For this resampling we use scipy.ndimage.interpolation.affine_transform.
You should configure the padding value and spline interpolation order.
IMPORTANT NOTE: When using the orthogonal resampling the output nifti will always be reoriented

Command line:

.. code-block:: bash

   dicom2nifti -G -r -o 1 -p -1000 input_directory output_directory


Python code:

.. code-block:: python

   import dicom2nifti
   import dicom2nifti.settings as settings

   settings.disable_validate_orthogonal()
   settings.enable_resampling()
   settings.set_resample_spline_interpolation_order(1)
   settings.set_resample_padding(-1000)

   dicom2nifti.convert_directory(dicom_directory, output_folder)



Inconsistent slice incremement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default support for inconsistent slice increments is disabled.
You can explicitly allow the images but should also use resampling (similar to the gantry tilted support)
to avoid geometric distortions due to the inconsistent slice increments.
You should configure the padding value and spline interpolation order

Command line:

.. code-block:: bash

   dicom2nifti -I -r -o 1 -p -1000 input_directory output_directory


Python code:

.. code-block:: python

   import dicom2nifti
   import dicom2nifti.settings as settings

   settings.disable_validate_slice_increment()
   settings.enable_resampling()
   settings.set_resample_spline_interpolation_order(1)
   settings.set_resample_padding(-1000)

   dicom2nifti.convert_directory(dicom_directory, output_folder)


Single slice
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default we do not convert single slice images.
You can explicitly allow the conversion of single slices.

Command line:

.. code-block:: bash

   dicom2nifti -S input_directory output_directory


Python code:

.. code-block:: python

   import dicom2nifti
   import dicom2nifti.settings as settings

   settings.disable_validate_slicecount()

   dicom2nifti.convert_directory(dicom_directory, output_folder)


GE MR
^^^^^^
Anatomical data should all be support.
4D images like fMRI and DTI/DKI are supported.

Siemens MR
^^^^^^^^^^^
Anatomical data should all be support.
4D images like fMRI and DTI/DKI are supported.

Philips MR
^^^^^^^^^^^
For classic dicom files dicom2nifti support anatomical.
For classic dicom files 4D images like fMRI and DTI/DKI are supported.

For "Philips Enhanced Dicom" there is no support for "Implicit VR Endian" transfer syntax.
For the others we support anatomical and 4D images like fMRI and DTI/DKI.

Hitachi MR
^^^^^^^^^^^
Anatomical data should all be support.
4D images like fMRI and DTI/DKI are NOT supported.
Anyone willing to share DTI and/or fMRI dicom form Hitachi scanners please contact us.

------------------
 Unsupported data
------------------
If you encounter unsupported data you can help the development of dicom2nifti by providing a dataset. This dataset should be anonymised (but leave as much of the private fields as possible).


Owner

  • Name: icometrix
  • Login: icometrix
  • Kind: organization
  • Location: Leuven/Boston

GitHub Events

Total
  • Issues event: 10
  • Watch event: 30
  • Delete event: 6
  • Issue comment event: 9
  • Push event: 6
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 5
  • Fork event: 5
  • Create event: 9
Last Year
  • Issues event: 10
  • Watch event: 30
  • Delete event: 6
  • Issue comment event: 9
  • Push event: 6
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 5
  • Fork event: 5
  • Create event: 9

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 274
  • Total Committers: 6
  • Avg Commits per committer: 45.667
  • Development Distribution Score (DDS): 0.022
Past Year
  • Commits: 31
  • Committers: 1
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Arne Brys a****s@i****m 268
Alex Rothberg a****g@g****m 2
fmljr f****r@m****e 1
Dirk Loeckx D****x@i****m 1
Martin Elias Costa m****a@g****m 1
Jill Cates c****l@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 112
  • Total pull requests: 21
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 1 month
  • Total issue authors: 72
  • Total pull request authors: 16
  • Average comments per issue: 1.31
  • Average comments per pull request: 0.38
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 8
  • Average time to close issues: 17 days
  • Average time to close pull requests: 9 minutes
  • Issue authors: 8
  • Pull request authors: 3
  • Average comments per issue: 0.73
  • Average comments per pull request: 0.25
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • abrys (36)
  • bkonk (2)
  • C-nit (2)
  • ma-tripleT (2)
  • burns101 (2)
  • topspinj (2)
  • ruidc (1)
  • BramshQamar (1)
  • FredTestud (1)
  • samieti02 (1)
  • shrikanth95 (1)
  • clead6 (1)
  • GJChen919 (1)
  • ryan102590 (1)
  • moonforsun (1)
Pull Request Authors
  • hiaoxui (4)
  • woctezuma (2)
  • robertschweizer (2)
  • barnavoj (2)
  • ChenjieXu (1)
  • mingtian126 (1)
  • jdhenckel (1)
  • casperdcl (1)
  • ma-tripleT (1)
  • C-nit (1)
  • alex4men (1)
  • yaoli (1)
  • blakedewey (1)
  • topspinj (1)
  • vsaase (1)
Top Labels
Issue Labels
enhancement (31) bug (18) help wanted (12) wontfix (2) question (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 80,057 last-month
  • Total docker downloads: 3,490
  • Total dependent packages: 26
    (may contain duplicates)
  • Total dependent repositories: 248
    (may contain duplicates)
  • Total versions: 110
  • Total maintainers: 1
pypi.org: dicom2nifti

package for converting dicom files to nifti

  • Versions: 92
  • Dependent Packages: 26
  • Dependent Repositories: 248
  • Downloads: 80,057 Last month
  • Docker Downloads: 3,490
Rankings
Dependent packages count: 0.6%
Dependent repos count: 1.0%
Downloads: 1.9%
Docker downloads count: 2.2%
Average: 2.4%
Stargazers count: 3.7%
Forks count: 5.0%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: dicom2nifti

Python library for converting dicom files to nifti

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 20.3%
Stargazers count: 22.6%
Average: 32.0%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced: 11 months ago

Dependencies

requirements.txt pypi
  • nibabel *
  • numpy *
  • pydicom >=2.2.0
  • python-gdcm *
  • scipy *
setup.py pypi
  • nibabel *
  • numpy *
  • pydicom >=2.2.0
  • python-gdcm *
  • scipy *