-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only in /home/yoh/deb/gits/pkg-exppsy/dcm_qa/Ref: fMRI_MB_int_26.{json,nii} #5
Comments
This is as a valid error, and indeed the reason I included sample JPEG2000 images. This warning suggests you are testing a copy of dcm2niix compiled without JPEG2000 support. Therefore, your copy failed to convert the images jp2k1.dcm and jp2k2.dcm. One solution is to get a pre-compiled release, alternatively you can build a copy with |
hmm... it as built with BATCH_VERSION=ON: $> grep BATCH dcm2niix_1.0.20170623-1_amd64.build
-DBATCH_VERSION:BOOL=ON
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DUSE_STATIC_RUNTIME:BOOL=OFF -DUSE_SYSTEM_TURBOJPEG:BOOL=ON -DUSE_SYSTEM_ZLIB:BOOL=ON -DBATCH_VERSION:BOOL=ON
cd /home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170623/build/console-build && /usr/bin/cmake -Wno-dev --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=/home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170623/build -DUSE_STATIC_RUNTIME:BOOL=OFF -DUSE_SYSTEM_ZLIB:BOOL=ON -DUSE_SYSTEM_TURBOJPEG:BOOL=ON -DUSE_SYSTEM_JASPER:BOOL= -DUSE_OPENJPEG:BOOL=OFF -DOpenJPEG_DIR:PATH= -DBATCH_VERSION:BOOL=ON -DYAML-CPP_DIR:PATH=/cmake/yaml-cpp "-GUnix Makefiles" /home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170623/console
$> apt-cache policy dcm2niix
dcm2niix:
Installed: 1:1.0.20170623-1
Candidate: 1:1.0.20170623-1
Version table:
*** 1:1.0.20170623-1 100
100 /var/lib/dpkg/status may be you meant that I have to use USE_OPENJPEG instead of turbojpeg? |
Mea culpa, as described on the README.MD, to compile for OPENJPEG (which provides JPEG2000 support, classic JPEG and lossless ancient JPEG are different) you use: mkdir build && cd build
cmake -DUSE_OPENJPEG=ON ..
make |
sorry for being a pain but FWIW -DUSE_OPENJPEG=ON -- still not sufficient ... built with it, verified that openjp is linked, still qa fails (see below). README suggests that I have to build openjpeg statically myself, but that shouldn't be required I hope (git)hopa:~exppsy/dcm2niix/dcm_qa[master]git
$> grep USE_OPENJPEG ../../build-area/dcm2niix_1.0.20170624-1_amd64.build
-DUSE_OPENJPEG:BOOL=ON \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DUSE_STATIC_RUNTIME:BOOL=OFF -DUSE_SYSTEM_TURBOJPEG:BOOL=ON -DUSE_OPENJPEG:BOOL=ON -DUSE_SYSTEM_ZLIB:BOOL=ON -DBATCH_VERSION:BOOL=ON
cd /home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170624/build/console-build && /usr/bin/cmake -Wno-dev --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=/home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170624/build -DUSE_STATIC_RUNTIME:BOOL=OFF -DUSE_SYSTEM_ZLIB:BOOL=ON -DUSE_SYSTEM_TURBOJPEG:BOOL=ON -DUSE_SYSTEM_JASPER:BOOL= -DUSE_OPENJPEG:BOOL=ON -DOpenJPEG_DIR:PATH=/usr/lib/x86_64-linux-gnu/openjepg-2.1 -DBATCH_VERSION:BOOL=ON -DYAML-CPP_DIR:PATH=/cmake/yaml-cpp "-GUnix Makefiles" /home/yoh/deb/gits/pkg-exppsy/build-area/dcm2niix-1.0.20170624/console
2 23015.....................................:Sat 24 Jun 2017 07:08:42 AM PDT:.
(git)hopa:~exppsy/dcm2niix/dcm_qa[master]git
$> ldd /usr/bin/dcm2niix
linux-vdso.so.1 (0x00007ffeea7e6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f962b807000)
libturbojpeg.so.0 => /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 (0x00007f962b594000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f962b359000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f962afd7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f962acd3000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f962aaba000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f962a71c000)
/lib64/ld-linux-x86-64.so.2 (0x000055d0bde96000)
2 23016.....................................:Sat 24 Jun 2017 07:08:48 AM PDT:.
(git)hopa:~exppsy/dcm2niix/dcm_qa[master]git
$> rm -rf Out/; ./batch.sh 2>&1 | tail -n 5
Running command:
diff -br /home/yoh/deb/gits/pkg-exppsy/dcm2niix/dcm_qa/Out /home/yoh/deb/gits/pkg-exppsy/dcm2niix/dcm_qa/Ref -I ConversionSoftwareVersion
Only in /home/yoh/deb/gits/pkg-exppsy/dcm2niix/dcm_qa/Ref: fMRI_MB_int_26.json
Only in /home/yoh/deb/gits/pkg-exppsy/dcm2niix/dcm_qa/Ref: fMRI_MB_int_26.nii
2 23018.....................................:Sat 24 Jun 2017 07:09:11 AM PDT:.
(git)hopa:~exppsy/dcm2niix/dcm_qa[master]git
$> dcm2niix --version
Chris Rorden's dcm2niiX version v1.0.20170624 (OpenJPEG build) GCC6.3.0 (64-bit Linux)
Example output filename: '/MPRAGE_1.nii' |
If you do want to use your own build of dcm2niix, please comment out Line 45-48 in |
I want my own build of dcm2niix but not of openjpeg, which I want to use the one installed system-wide. |
The compile.md provides several recipes for compiling custom variations of dcm2niix, including those with JPEG2000. Check your compiler for details on how to build with dynamic libraries relative to static builds. In general, I would highly discourage the use of JPEG2000 as a DICOM transfer syntax, and suspect it will greatly complicate archival studies. To my knowledge, dcm2niix is the only open source DICOM tool to support this transfer syntax. The only commercial tools that use this are DCMJP2K and Osirix (via its usage of DCMJP2K). Unfortunately, JPEG2000 as a standard saw little adoption, despite being somewhat better than classic JPEG. In my experience the two open source implementations were either slow, poorly documented, cumbersome (OpenJPEG) or unsuitable for high-bit depth DICOM (JASPER). Now that HEIF is here, I think that any opportunity JPEG2000 had to gain traction is long since past. Therefore, I think it is completely reasonable to compile dcm2niix without JPEG2000 support. It does provide clear feedback when it detects an offending image. For Unix users with a C compiler installed, you can compile dcm2niix by simply typing "make" in the "console" folder. |
@yarikoptic it will probably work if you use 2.1.0 version of libopenjp2. That's why I fixed the external build of the openjpeg library to a specific commit. Something is broken in newer version. |
Hi @yarikoptic, confirmed that dcm2niix doesn't work with libopenjp2 if the library is built using code after this commit. Any version larger than 2.1.0 is affected. As far as I see, we can't solve this on dcm2niix side. Chris just created an issue report here. You may either install 2.1.0 version of libopenjp2 or build it on the fly when buiding dcm2niix. |
Update OpenJPEG seek to work with modern versions of OpenJPEG, see uclouvain/openjpeg#962
@yarikoptic and @ningfei - can you please test the latest master of dcm2niix. This should work with modern versions of dcm2niix. My fault entirely, I am afraid. |
@neurolabusc - tested with openjpeg v2.1.2, works now without problem! |
Great. I have tested it with Debian Linux using the current origin master 2.2.0. To use the 2.2.0 branch you need to compile with |
before I can test this I need to package |
FWIW -- seems to work for me on my Debian box now... I will build with openjpeg support and upload to neurodebian shortly |
* commit 'v1.0.20170624-8-g87d2142': Fix for neurolabusc/dcm_qa#5 Fix rordenlab#116 [Consistent stdout when generating gradient tables](rordenlab#115) Update CMake files. Update note and warning message on OpenJPEG. Detect images compressed to multiple fragments and warn user Kludges for invalid JPEG2000 files Fix zip working directory in .travis.yml
sorry to be the pain... dcm2niix v1.0.20170623, this repo 01fd3df
The text was updated successfully, but these errors were encountered: