-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from rordenlab/development
version 2-November-2020 (v1.0.20201102)
- Loading branch information
Showing
21 changed files
with
1,548 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,34 +137,26 @@ lipo -create dcm2niix32 dcm2niix64 -o dcm2niix | |
file ./dcm2niix | ||
``` | ||
|
||
##### OSX GRAPHICAL INTERFACE BUILD | ||
|
||
You can building the OSX graphical user interface using Xcode. First, Copy contents of "console" folder to /xcode/dcm2/core. Next, open and compile the project "dcm2.xcodeproj" with Xcode 4.6 or later | ||
|
||
##### THE QT AND wxWIDGETS GUIs ARE NOT YET SUPPORTED - FOLLOWING LINES FOR FUTURE VERSIONS | ||
|
||
Building QT graphical user interface: | ||
Open "dcm2.pro" with QTCreator. This should work on OSX and Linux. On Windows the printf information is not redirected to the user interface | ||
If compile gives you grief look at the .pro file which has notes for different operating systems. | ||
|
||
Building using wxWidgets | ||
wxWdigets makefiles are pretty complex and specific for your operating system. For simplicity, we will build the "clipboard" example that comes with wxwidgets and then substitute our own code. The process goes something like this. | ||
a.) Install wxwdigets | ||
b.) successfully "make" the samples/clipboard program | ||
c.) DELETE console/makefile. WE DO NOT WANT TO OVERWRITE the WX MAKEFILE | ||
d.) with the exception of "makefile", copy the contents of console to /samples/clipboard | ||
e.) overwrite the original /samples/clipboard.cpp with the dcm2niix file of the same name | ||
f.) Older Xcodes have problems with .cpp files, whereas wxWidgets's makefiles do not compile with "-x cpp". So the core files are called '.c' but we will rename them to .cpp for wxWidgets: | ||
rename 's/\.c$/\.cpp/' * | ||
g.) edit the /samples/clipboard makefile: Add "nii_dicom.o nifti1_io_core.o nii_ortho.o nii_dicom_batch.o \" to CLIPBOARD_OBJECTS: | ||
CLIPBOARD_OBJECTS = \ | ||
nii_dicom.o nifti1_io_core.o nii_ortho.o nii_dicom_batch.o \ | ||
$(__clipboard___win32rc) \ | ||
$(__clipboard_os2_lib_res) \ | ||
clipboard_clipboard.o | ||
h.) edit the /samples/clipboard makefile: With wxWidgets we will capture std::cout comments, not printf, so we need to add "-DDmyUseCOut" to CXXFLAGS: | ||
CXXFLAGS = -DmyUseCOut -DWX_PRECOMP .... | ||
i.) For a full refresh | ||
rm clipboard | ||
rm *.o | ||
make | ||
##### CMAKE INSTALLATION | ||
|
||
While most of this page describes how to use `make` to compile dcm2niix, `cmake` can automatically aid complex builds. The [home page](https://github.com/rordenlab/dcm2niix) describes typical cmake options. The cmake command will attempt to pull additional code from git as needed for zlib, OpenJPEG etc. If you get the following error: | ||
|
||
``` | ||
fatal: unable to connect to github.com: | ||
github.com[0: 140.82.121.4]: errno=Connection timed out | ||
``` | ||
|
||
This suggests git is unable to connect using ssh. You have two options, first you can disable the cmake option USE_GIT_PROTOCOL (which is on by default). Alternatively, to use https instead using the following lines prior to running cmake: | ||
|
||
``` | ||
git config --global url."https://github.com/".insteadOf [email protected]: | ||
git config --global url."https://".insteadOf git:// | ||
``` | ||
|
||
Once the installation is completed, you can revert these changes: | ||
|
||
``` | ||
git config --global --unset-all url.https://github.com/.insteadof | ||
git config --global --unset-all url.https://.insteadof | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## About | ||
|
||
dcm2niix will return an exit status to allow scripts to determine if a conversion was successful. Following Unix convention, the value value 0 is used for [EXIT_SUCCESS](https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html). In contrast, any non-zero result suggests an error. In the Unix terminal and with shell scripts, the variable `$?` reports the most recent exit status. Here is an example of a successful conversion: | ||
|
||
``` | ||
>dcm2niix ~/dcm | ||
Chris Rorden's dcm2niiX version v1.0.20200331 Clang11.0.0 (64-bit MacOS) | ||
Found 2 DICOM file(s) | ||
Convert 2 DICOM as ~/dcm/dcm_ax_asc_6 (64x64x35x2) | ||
Conversion required 0.015866 seconds (0.012676 for core code). | ||
>echo $? | ||
0 | ||
``` | ||
|
||
Below is a list of possible return values from running dcm2niix. | ||
|
||
| Exit Status | Meaning | | ||
| ----------- | ----------------------------------------------------------- | | ||
| 0 | Success | | ||
| 1 | Unspecified error (see console output for details) | | ||
| 2 | No DICOM images found in input folder | | ||
| 3 | Exit from report version (result of `dcm2niix -v`) | | ||
| 4 | Corrupt DICOM file (Irrecoverable error during conversion) | | ||
| 5 | Input folder invalid | | ||
| 6 | Output folder invalid | | ||
| 7 | Unable to write to output folder (check file permissions) | | ||
| 8 | Converted some but not all of the input DICOMs | | ||
| 9 | Unable to rename files (result of `dcm2niix -r y ~/in`) | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.