Skip to content

Commit

Permalink
New stable release: update documentation (v1.0.20181114)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Nov 24, 2018
1 parent e02f1e4 commit 3d74eab
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
6 changes: 6 additions & 0 deletions GE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ In addition to the public DICOM tags, previous versions of dcm2niix attempted to
- The VIEWORDER tag is used to set the polarity of the BIDS tag PhaseEncodingDirection, with VIEWORDER of 1 suggesting bottom up phase encoding. Unfortunately, users can separately reverse the phase encoding direction making this tag unreliable.
- The SLICEORDER tag could be used to set the SliceTiming for the BIDS tag PhaseEncodingDirection, with a SLICEORDER of 1 suggesting interleaved acquisition.
- There are reports that newer versions of GE equipement (e.g. DISCOVERY MR750 / 24\MX\MR Software release:DV24.0_R01_1344.a) are now storing an [XML](https://groups.google.com/forum/#!msg/comp.protocols.dicom/mxnCkv8A-i4/W_uc6SxLwHQJ) file within the Protocolo Data Block (compressed). In theory this might also provide useful information.

## Sample Datasets

- [A validation dataset for dcm2niix commits](https://github.com/neurolabusc/dcm_qa_nih).
- [Examples of phase encoding polarity, slice timing and diffusion gradients](https://github.com/nikadon/cc-dcm2bids-wrapper/tree/master/dicom-qa-examples/).
- The dcm2niix (wiki)[https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage] includes examples of diffusion data, slice timing, and other variations.
27 changes: 27 additions & 0 deletions RENAMING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## About

dcm2niix is primarily designed to convert DICOM images into NIfTI images. However, it does include a primitive ability to organize and rename DICOM images without converting them. This can be useful, as DICOM images are often stored with random file names that make it difficult to recognize the images.

## Limitation

dcm2niix renames and copies the DICOM images, but the current version does not copy or create a new [DICOMDIR](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_F.2.2.2.html) file. Most users ignore these files. However, you should not use this featire if you wish to preserve your DICOMDIR files.

Note that this feature only copies your DICOM images with a new filename. It does not modify the contents of the DICOM header. This means it will not compress or anonymize your files. Free tools for these functions include (dcmcjpeg)[https://dicom.offis.de/dcmtk.php.en], [gdcmanon](http://gdcm.sourceforge.net/html/gdcmanon.html) and [gdcmconv](http://gdcm.sourceforge.net/html/gdcmconv.html).

In addition, this tool assumes that the DICOM images can be uniquely identified by the filenaming argument you provide.

## Usage

The command line argument `-r y` instructs dcm2niix to rename your DICOM files rather than convert them. It does not delete your DICOM images, but rather creates a copy with the organization specified by the [filenaming argument `-f`](FILENAMING.md). Here is an example where the DICOM images will be sorted into folders, with the folder name reflecting the study time (`%t`) and series number (`%s`), each DICOM image will be named based on the image number (`%r`) which will be padded with zeros to fill 5 characters.
- `dcm2niix -r y -f %t_%s/%5r.dcm -o ~/out ~/in`

Therefore, the 9th DICOM image from series 3 acquired on 4 February 2012 would be saved as ~/out/20120204084424_3/00009.dcm.

## Alternatives

An advantage of using dcm2niix is simplicity: it is a free, single file executable that you can [download](https://github.com/rordenlab/dcm2niix/releases) that is available for MacOS, Linux and Windows that you can run from the command line. On the other hand, this simplicity means it is fairly inflexible. You may want to consider a DICOM renamer built in your favorite scripting language.

- [dicom-rename is a Python script](https://github.com/joshy/dicom-rename).
- [dicomsort is a Python script](https://github.com/pieper/dicomsort).
- [rename_dir is a Matlab script that requires the proprietary Image Processing Toolbox](https://gist.github.com/htygithub/ad3597577e1de004e9f5).
- [dicm2nii includes the Matlab script rename_dicm that does not require any additional toolboxes](https://github.com/xiangruili/dicm2nii).
9 changes: 8 additions & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## Versions

14-November-2018
- [GE images provide more BIDS tags](https://github.com/rordenlab/dcm2niix/issues/163).
- [Bruker enhanced DICOM support](https://github.com/rordenlab/dcm2niix/issues/241).
- [Siemens Vida XA10 support](https://github.com/rordenlab/dcm2niix/issues/240). Note that Vida DICOM data is crippled [if the user exports as mosaics or anonymized/reduced](https://github.com/rordenlab/dcm2niix/issues/236).
- [UIH enhanced DICOM support](https://github.com/rordenlab/dcm2niix/issues/225).
- New DICOM [renaming](RENAMING.md) feature.

22-June-2018
- [fix issues where 6-June-2018 release could save Enhanced DICOM Philips bvec/bval with different order than .nii images](https://github.com/rordenlab/dcm2niix/issues/201).
- [Fix issues where 6-June-2018 release could save Enhanced DICOM Philips bvec/bval with different order than .nii images](https://github.com/rordenlab/dcm2niix/issues/201).

6-June-2018
- [Improved Philips PAR/REC support](https://github.com/rordenlab/dcm2niix/issues/171)
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ int * nii_SaveDTI(char pathoutname[],int nConvert, struct TDCMsort dcmSort[],str
*numADC = 0;
bvals = (float *) malloc(numDti * sizeof(float));
int numGEwarn = 0;
bool isGEADC = (dcmList[indx0].numberOfDiffusionDirectionGE == 0) ;
bool isGEADC = (dcmList[indx0].numberOfDiffusionDirectionGE == 0);
for (int i = 0; i < numDti; i++) {
bvals[i] = vx[i].V[0];
//printMessage("---bxyz %g %g %g %g\n",vx[i].V[0],vx[i].V[1],vx[i].V[2],vx[i].V[3]);
Expand Down

0 comments on commit 3d74eab

Please sign in to comment.