InsightSoftwareConsortium / ITKGenericLabelInterpolator

The basic idea of this generic interpolator for label images is to interpolate each label with an ordinary image interpolator, and return the label with the highest value. This is the idea used by the itk::LabelImageGaussianInterpolateImageFunction interpolator. Unfortunately, this class is currently limited to Gaussian interpolation. Using generic programming, our proposed interpolator extends this idea to any image interpolator. Combined with linear interpolation, this results in similar or better accuracy and much improved computation speeds on a test image.

Home Page:http://www.insight-journal.org/browse/publication/950

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not fine load file ITKModuleExternal

TheChymera opened this issue · comments

As per the instructions provided here, I am trying to build this package after installing ITK.

With the following cmake command:

cmake -C /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build/gentoo_common_config.cmake
    -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DITK_DIR=/usr/include/ITK-5.0/ -DCMAKE_BUILD_TYPE=Gentoo
    -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build/gentoo_toolchain.cmake
    /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1

and with ITK providing the following files, I get the following build error:

>>> Emerging (1 of 1) sci-libs/itk-generic_label_interpolator-5.0.1::chymeric
 * ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1.zip SHA256 SHA512 WHIRLPOOL size ;-) ...              [ ok ]
>>> Unpacking source...
>>> Unpacking ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1.zip to /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work
>>> Source unpacked in /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work
>>> Preparing source in /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build"
cmake -C /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DITK_DIR=/usr/include/ITK-5.0/ -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build/gentoo_toolchain.cmake  /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/ITKGenericLabelInterpolator-187ab99b7d42718c99e5017f0acd3900d7469bd1
loading initial cache file /var/tmp/portage/sci-libs/itk-generic_label_interpolator-5.0.1/work/itk-generic_label_interpolator-5.0.1_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:7 (include):
  include could not find load file:

    ITKModuleExternal


-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -march=native -O2 -pipe
C++             -march=native -O2 -pipe
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring incomplete, errors occurred!

Can you help me out?

ITKModuleExternal.cmake is not installed. @thewtex is that a bug? That is, is building remote modules against installed version of ITK supposed to work?

@TheChymera building remote modules should work against ITK's build folder.

I am building ITK with:

cmake -C /var/tmp/portage/sci-libs/itk-5.0.1/work/itk-5.0.1_build/gentoo_common_config.cmake
    -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON 
    -DGDCM_USE_SYSTEM_OPENJPEG=ON -DITK_FORBID_DOWNLOADS:BOOL=ON 
    -DITK_USE_SYSTEM_DCMTK=ON -DITK_USE_SYSTEM_DOUBLECONVERSION=ON 
    -DITK_USE_SYSTEM_CASTXML=ON -DITK_USE_SYSTEM_HDF5=ON 
    -DITK_USE_SYSTEM_JPEG=ON -DITK_USE_SYSTEM_PNG=ON 
    -DITK_USE_SYSTEM_SWIG=ON -DITK_USE_SYSTEM_TIFF=ON 
    -DITK_USE_SYSTEM_ZLIB=ON -DITK_USE_KWSTYLE=OFF 
    -DITK_BUILD_DEFAULT_MODULES=ON -DITK_COMPUTER_MEMORY_SIZE=1 
    -DWRAP_ITK_JAVA=OFF -DWRAP_ITK_TCL=OFF -Ddouble-conversion_INCLUDE_DIRS=/usr/include/double-conversion
    -DExternalData_OBJECT_STORES=/var/tmp/portage/sci-libs/itk-5.0.1/work/InsightToolkit-5.0.1/.ExternalData
    -DModule_GenericLabelInterpolator:BOOL=ON -DBUILD_EXAMPLES=OFF 
    -DITK_USE_REVIEW=OFF -DITK_INSTALL_LIBRARY_DIR=lib64 -DITK_WRAP_PYTHON=OFF 
    -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/itk-5.0.1/work/itk-5.0.1_build/gentoo_toolchain.cmake
    /var/tmp/portage/sci-libs/itk-5.0.1/work/InsightToolkit-5.0.1

That is, is building remote modules against installed version of ITK supposed to work?

ITK remote modules can only currently be built against an ITK build tree -- they cannot be built against an ITK install tree.

oh, ok. That complicates the package management quite a bit. Is there any intent to make them buildable against an ITK install tree in the future?

There is an intent, but it will require significant effort, and there is no current timeline.