BIC-MNI / libminc

libminc is the core library and API of the MINC toolkit
Other
19 stars 29 forks source link

Sync nifti code with upstream #117

Open seanm opened 2 years ago

seanm commented 2 years ago

I've just discovered that the nifti library seems to have an official home:

https://github.com/NIFTI-Imaging/nifti_clib

the code in libminc is clearly from the same, and clearly older.

Enabling LIBMINC_USE_NIFTI downloads http://downloads.sourceforge.net/project/niftilib/nifticlib/nifticlib_2_0_0/nifticlib-2.0.0.tar.gz but that file is dated 2010-07-20.

Is the code in the libminc/nifti/ unused?

gdevenyi commented 2 years ago

Its currently used in very limited places, the visualisation tools Display and register

seanm commented 2 years ago

Ah, I see. I introduced a syntax error in nifti/nifti1.h but no matter what I tried I could not get the error to appear, but that explains it, if building libminc itself doesn't use those files, even with LIBMINC_USE_NIFTI.

But why does LIBMINC_USE_NIFTI download a tarball yet Display and register use the libminc/nifti folder?

vfonov commented 2 years ago

I think volume_io uses nifti, If configured.

seanm commented 2 years ago

How do I build volume_io? I don't see any option in cmake.

vfonov commented 2 years ago

https://github.com/BIC-MNI/libminc/blob/develop/CMakeLists.txt#L224 - that's how it works

seanm commented 2 years ago

Thanks @vfonov

So I've applied the nifti update locally and ran all tests, but many tests fail. So I undid my change, but many test still fail anyway. Is that expected? Are all the libminc tests normally passing?

bcdarwin commented 2 years ago

The only continuous integration server I am aware of currently running for libminc is the nixpkgs CI/CD server "Hydra" which shows the tests pass (https://hydra.nixos.org/build/183645769) except for ezminc_rw_test which is skipped as it errors due to a shared library issue in that environment (for the configuration see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/libminc/default.nix). As caveats, this uses the external nifti_clib you mention, uses a slightly old version of libminc (so you might argue this is not really CI for libminc itself) because it's not too easy to get updates merged without an actual release, I haven't checked that some tests aren't skipped, etc., but overall it's safe to say that the tests are normally passing.