Package Details: insight-toolkit 5.2.1-15

Git Clone URL: (read-only, click to copy)
Package Base: insight-toolkit
Description: Cross-platform system that provides developers with an extensive suite of software tools for image analysis
Upstream URL:
Licenses: Apache
Submitter: joelsc
Maintainer: crmullins
Last Packager: crmullins
Votes: 36
Popularity: 0.063997
First Submitted: 2008-11-16 19:36 (UTC)
Last Updated: 2021-10-24 21:43 (UTC)

Dependencies (22)

Sources (1)

Latest Comments

entshuld commented on 2022-01-27 03:25 (UTC) (edited on 2022-01-28 05:19 (UTC) by entshuld)

I have some amendments to share

  • 1. Allow Python wrappers independent of locale.
  • 2. ```makepkg -C``` exists to clean if the user so wishes
  • 3. use pkgname and pkgver instead of InsightToolkit

@@ -23,19 +23,56 @@ optdepends=('python2: build python wrapping'
             'clang: for swig'
        'castxml-git: for ITK')
 makedepends=('cmake' 'git')

+safe_flags+=" -fcf-protection -fno-plt"
+safe_flags+=" -fstack-clash-protection -Wformat"
+safe_flags+=" -Werror=format-security"
+generic_flags="-pipe -fno-plt -fPIC -fopenmp"
+generic_flags+=" -march=native"
+generic_flags+=" -mtune=native ${safe_flags}"
+opt_flags="${generic_flags} -O3"
+generic_flags="${generic_flags} -O2"
+export COPTFLAGS="${opt_flags}"
+export CPPFLAGS="$generic_flags"
+export CFLAGS="$generic_flags"
+export FFLAGS="$generic_flags"
+export FCFLAGS="$generic_flags"
+export F90FLAGS="$generic_flags"
+export F77FLAGS="$generic_flags"
+export LANG=C
+export OMPI_MCA_opal_cuda_support=0
+export OMPI_MCA_mpi_oversubscribe=0
+# from here:
+prepare() {
+  cd "$srcdir"
+  [[ -d InsightToolkit-"${pkgver}" ]] &&
+    mv InsightToolkit-"${pkgver}" "${pkgname}"-"${pkgver}"

 build() {
   cd "$srcdir"
-  rm -rf build
-  mkdir build
-  cd build

-  cmake \
+  cmake -S "${srcdir}/${pkgname}-${pkgver}" \
+    -B "${srcdir}/${pkgname}-${pkgver}"/build \
@@ -56,16 +93,25 @@ build() {
     -DModule_ITKIOTransformMINC:BOOL=ON \
-    -DModule_SimpleITKFilters:BOOL=ON \
-    ../InsightToolkit-${pkgver}
+    -DModule_SimpleITKFilters:BOOL=ON

-  make
+  # 4: to your liking
+  make -j4 -s -C "${srcdir}/${pkgname}-${pkgver}"/build

 package() {
-  cd "$srcdir"/build
+  cd "${srcdir}/${pkgname}-${pkgver}"/build
+  make -C "${srcdir}"/"${pkgname}-${pkgver}"/build DESTDIR="${pkgdir}" install

-  make DESTDIR="${pkgdir}" install
+  # Based on AUR's itk-git package
+  # (quick fix for
+  install -dm755 "${pkgdir}"/usr/lib
+  _pyver=$(python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))')
+  find "${pkgdir}" -type d -name "python${_pyver}" -print0 -quit | xargs -0 mv -vt "${pkgdir}/usr/lib"
+  python -O -m compileall "${pkgdir}/usr/lib"

hottea commented on 2022-01-01 06:26 (UTC)

@m-pilia @crmullins Maybe merge insight-toolkit, itk, and python-itk, and keep only itk and python-itk? I currently maintain itk-git and python-itk-git here.

m-pilia commented on 2021-12-31 13:17 (UTC)

Hi @crmullins! I was wondering if we could improve a bit the Python distribution of ITK.

The current situation is: the Python wheels can be built from your PKGBUILD but are disabled by default and require manual intervention. There is also a separate package for the Python part only (python-itk, that I maintain) but it does not make sense to build the wheels separately from insight-toolkit, since it is a lot of duplicated build time. (context in this comment).

The best solution would be to turn insight-toolkit into a split package, so that it is possible to build both insight-toolkit and python-itk from the same PKGBUILD.

Hottea has kindly created a split PKGBUILD here. Could you consider updating this package to use Hottea's approach? (pushing the split package will require to delete python-itk first: feel free to nominate my package for deletion because of this reason).

buzo commented on 2021-06-17 13:18 (UTC)

Please add git to makedepends, otherwise it does not build (in a

MartinDiehl commented on 2021-04-10 12:07 (UTC)

could you please change the dependency from 'hdf5-cpp-fortran' to 'hdf5'? The special cpp/fortran versions doe not exist anymore.

m-pilia commented on 2021-04-03 21:47 (UTC)

Hi! Could you please add the SimpleITKFilters module to the package (CMake command line flag -DModule_SimpleITKFilters:BOOL=ON)? It is required to build simpleitk version >=2.0.

liamtimms commented on 2019-10-02 21:34 (UTC)

Hi, it would be great if you could add the Generic Label Interpolator flag to the build process:

This is necessary for ITK to be used by ANTs:

crmullins commented on 2018-12-16 05:33 (UTC)

This should be fixed now that the GDCM package is updated to use 2.8.8. The issue was that before we were not using the system GDCM, so ITK was building the version bundled with it, which builds (and then tries to install) its own openjpeg2 -- ignoring the ITK_USE_SYSTEM_JPEG and GDCM_USE_SYSTEM_OPENJPEG config variables. Please reach out if you have any other issues.

flipmess commented on 2018-12-14 20:32 (UTC)

hi, i get this error after build.

(1/1) checking for file conflicts [############################################################################] 100% error: failed to commit transaction (conflicting files) insight-toolkit: /usr/lib/pkgconfig/libopenjp2.pc exists in filesystem (owned by openjpeg2) Errors occurred, no packages were upgraded.

geosam commented on 2018-07-30 22:21 (UTC)

Fix the GCC 8:

lotsocats commented on 2018-07-06 19:02 (UTC)

Trouble building with GCC 8. There's a patch here:

m-pilia commented on 2018-03-18 10:34 (UTC) (edited on 2018-04-03 08:36 (UTC) by m-pilia)

I had troubles building 4.13 with Python wrappers using gcc, castxml failed being unable to find the headers of the standard C++ library, however I solved by building everything with clang.

<s>I also had linking problems with system GDCM (several symbols missing), I tried both with the version on AUR (2.8.3) and the more recent 2.8.4, with no luck. In the end I circumvented the problem by using the bundled version of GDCM, even though I do not like this solution...</s>

Edit: I solved the GDCM linking issue, actually it does not happen with the config in this PKGBUILD, it was related to some of the additional ITK modules I enabled for the build. Still I cannot make CastXML work with gcc, but that is a minor issue imho.

bobschi commented on 2018-01-29 18:34 (UTC) (edited on 2018-01-29 18:44 (UTC) by bobschi)

Please update to version 4.13.0 and add the follwing two CMake flags, which are necessary for minc-toolkit-v2:


Also gtest ( is a dependency now.

crmullins commented on 2017-06-27 02:19 (UTC)

Hi all, 4.12.0 is up, please let me know if you have any issues while I continue to test. @yan12125, I will look into this, thanks for bringing it up.

crmullins commented on 2017-06-22 23:20 (UTC)

Thanks geosam! I should be able to get to this next week at the latest. Sorry about the delay.

geosam commented on 2017-06-22 23:07 (UTC)

Please update to 4.12, this is the patch for update:

yan12125 commented on 2017-05-17 22:04 (UTC)

Couldn't build with gcc 7.1 in [testing]. [ 1%] Building CXX object Modules/ThirdParty/VNL/src/vxl/vcl/CMakeFiles/itkvcl.dir/vcl_deprecated.cxx.o In file included from /tmp/yaourt-tmp-yen/aur-insight-toolkit/src/InsightToolkit-4.11.0/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_iostream.h:5:0, from /tmp/yaourt-tmp-yen/aur-insight-toolkit/src/InsightToolkit-4.11.0/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_deprecated.cxx:4: /tmp/yaourt-tmp-yen/aur-insight-toolkit/src/InsightToolkit-4.11.0/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:79:4: error: #error "Dunno about this gcc" # error "Dunno about this gcc" ^~~~~ Could you add the patch before ITK 4.12 is released?

crmullins commented on 2017-03-18 21:16 (UTC)

Sorry for the delay -- 4.11.0 was released in January 2017. Enjoy! Let me know if you have any problems. Chris

crmullins commented on 2016-07-16 19:33 (UTC)

@pmav99 can you verify you're downloading InsightToolkit-4.10.0.tar.xz? It hasn't changed for me. (Is sourceforge adding stuff into the packages again?)

pmav99 commented on 2016-07-15 07:11 (UTC)

The checksum has changed. This is the new one: sha512sums=('b897c49413a94f35a7f5d92c3c43215bd41da1ae7f9f2694cb17ab611b59286a75a20f6586c94b41f17a77786440fdb4ecb5655761ed14c8bef83e858755f8cf')

crmullins commented on 2016-07-01 01:53 (UTC)

4.10.0 has been released. I originally ran into some problems building the python wrapping[1] which has been resolved now. Please let me know if you have any issues with the upgrade. Chris [1]

crmullins commented on 2016-05-06 21:12 (UTC)

@GeorgP that's strange, I don't have this problem and the header is in the same place for me. Can you verify that you're building with (1) no modifications to the PKGBUILD cmake options and (2) the latest version of cmake? I'm assuming you have only the latest version of gdcm installed from the AUR. Another place to check is the file /usr/lib64/gdcm-2.6/GDCMConfig.cmake and the ITK CMakeCache file to make sure cmake isn't finding some other GDCM.

GeorgP commented on 2016-05-05 17:13 (UTC)

I get the following error, during build: [...]/src/InsightToolkit-4.9.1/Modules/IO/GDCM/src/itkGDCMImageIO.cxx:41:29: fatal error: gdcmImageHelper.h: No such file or directory However, the file /usr/include/gdcm-2.6/gdcmImageHelper.h exists as part of gdcm.

crmullins commented on 2016-04-18 21:37 (UTC)

Updating to new patch 4.9.1, from the release announcement: "This is a patch release that fixes critical issues, regressions, documentation, and compiler support. This release fixes builds against system HDF5 1.8.16. It also avoids clobbering VTK_LIBRARIES in certain cases when mixing a project that uses both ITK and VTK. Resource servers that provide testing data and build tools at build time now only support the HTTPS protocol; HTTP support has been removed. This requires SSL support in the CMake binary used to build ITK."

crmullins commented on 2016-02-05 16:20 (UTC)

4.9.0 was released, release notes here[1]. New package is on the way, I'm just doing some testing. [1]

giniu commented on 2016-01-11 18:54 (UTC)

@crmullins if you want to take this package over, it would be great help. I'm disowning it for you - have fun :)

crmullins commented on 2015-12-31 20:15 (UTC)

Hi again giniu! Here is a working PKGBUILD for ITK 4.8.2 [1]. I've turned off ITK_WRAP_PYTHON by default and added some optional dependencies for the wrapping. Since you're pretty busy these days, I'm happy to take over this one as well if you want -- let me know. [1]

muefra00 commented on 2015-12-07 23:17 (UTC)

I just noticed that I had 2 mistakes in my PKGBUILD: -ITK_LEGACY_SILENT:BOOL=ON \ -ITK_WRAP_PYTHON:BOOL=ON \ should be -DITK_LEGACY_SILENT:BOOL=ON \ -DITK_WRAP_PYTHON:BOOL=OFF \ (python wrapping off by default is probably the sensible option here since it takes really long to compile with it enabled - since I forgot the -D infront it didn't build the python wrapping so far anyways)

giniu commented on 2015-05-23 17:41 (UTC)

@muefra00 thanks for pkgbuild - I will look into updating it soon.

muefra00 commented on 2015-05-22 10:54 (UTC)

Updated the PKGBUILD for ITK 4.7.2 & GCC 5.1 Notes: I also changed it to use system hdf5 which is why the hdf5-cpp-fortran dependency was introduced. If you have a previous ITK build installed, installing hdf5-cpp-fortran may result in some conflicts: just uninstall ITK, install hdf5 & rebuild ITK. Here are the changes required for GCC 5.1 compatibility: (tl;dr: white-listing GCC version 5.1)

giniu commented on 2015-03-17 20:24 (UTC)

Thanks, I will update soon - probably later this week.

Styx85 commented on 2015-03-17 20:04 (UTC)

Working PKGBUILD for 4.7.1

Styx85 commented on 2015-03-17 18:22 (UTC)

4.7.1 is out.

giniu commented on 2014-12-20 16:37 (UTC)

now with Python (3) bindings

giniu commented on 2014-10-27 15:23 (UTC)

insight made me sight again - I updated without enabling python bindings, as I wasn't able to make them work...

lluixhi commented on 2014-07-31 17:14 (UTC)

4.6.0 is out.

giniu commented on 2014-05-29 12:31 (UTC)

@sigidagi I looked and it is missing from 4.5.2, because it wasn't in the release yet - i.e. there is no such file in It means, that this would have to be development version of itk, like itk-git. Unfortunately, this project is very unstable in my opinion. I'm having troubles keeping it up to date even with stable releases, not counting git. If you want, you are free to create one based on stable release, but unfortunatelly I won't have time to maintian such release. I can prepare such package if you will be willing to adopt it and maintain then, in case you don't want to start from scratch.

sigidagi commented on 2014-05-11 13:54 (UTC)

"itkTransformToDisplacementFieldFilter.h" is missing in ITK4.5.2 package. Can you update PKGBUILD that it will fetch source from git (instead of sourceforge): I'm creating a package which depends on ITK.

giniu commented on 2014-01-22 18:59 (UTC)

Wrapping still fails, install cannot find /build/Wrapping/Typedefs/vcl_complex.idx - but I uploaded version without Wrapping anyway.

snuo commented on 2013-12-13 02:58 (UTC)

4.4.2 is the latest, with fixes for gcc 4.8. It builds just as well as before. pkgver=4.4.2 pkgrel=1 pkgdesc='Insight Segmentation and Registration Toolkit (ITK).' arch=('i686' 'x86_64') url='' license=('APACHE') depends=('fftw' 'libjpeg-turbo' 'libpng' 'zlib' 'libtiff' 'gdcm') makedepends=('cmake') conflicts=('itk-python') source=("") md5sums=('f59dce3f68417215daa8a3aca72e65d9')

giniu commented on 2013-06-03 21:47 (UTC)

I will update directly to 4.4.0 (released today), 4.3.x had too many issues that are supposed to be fixed. I will test do some tests this week.

giniu commented on 2013-01-10 10:45 (UTC)

4.3.1 can use external tiff, so I use it instead of building itk's version. Next to try: external vxl, external gcdm, external gccxml and then enable binding.

giniu commented on 2012-11-20 22:49 (UTC)

This is a note to myself, to try again with external gccxml from gccxml-git package. Lets hope that this time we will be able to bring language bindings up.

giniu commented on 2012-10-06 15:50 (UTC)

and... Python bindings still do not work. Although now it's known why they fail (at least first failure):

giniu commented on 2012-10-01 20:07 (UTC)

4.2.1 is out, I will look into updating asap (I hope they finally fixed python bindings!)

giniu commented on 2012-07-12 12:16 (UTC)

Bindings still do not work, just like using system hdf5 and tiff. At least I was able to make itk use fftw, jpeg, png and zlib from repos, it saves some time and size for install. I will try to make it use more pre-installed components and enable bindings in near future.

giniu commented on 2012-04-11 11:23 (UTC)

The broken part is in python bindings, decided to disable them until I know how to fix them on gcc 4.7.

giniu commented on 2012-04-05 12:22 (UTC)

This is now broken with gcc 4.7, I will work on patch. Marking it out of date as a remainder.

giniu commented on 2012-04-01 20:27 (UTC)

install cannot copy file? By any chance you are using tmpfs and it got out of space? Like in

Styx85 commented on 2012-04-01 19:26 (UTC)

Hm, I'm getting following mistake: -- Installing: /tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/ITK-4.1/Python/Configuration/ -- Installing: /tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/ITK-4.1/Python/ -- Installing: /tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/cmake/ITK-4.1/WrapITK/Configuration/Typedefs/python/ITKImageFunction_ext.i -- Installing: /tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/ITK-4.1/Python/ -- Installing: /tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/ITK-4.1/Python/ CMake Error at Wrapping/Modules/ITKImageFunction/cmake_install.cmake:228 (FILE): file INSTALL cannot copy file "/tmp/yaourt-tmp-christoph/aur-insight-toolkit/src/build/lib/" to "/tmp/yaourt-tmp-christoph/aur-insight-toolkit/pkg/usr/lib/ITK-4.1/Python/". Call Stack (most recent call first): Wrapping/Modules/cmake_install.cmake:43 (INCLUDE) Wrapping/cmake_install.cmake:57 (INCLUDE) cmake_install.cmake:192 (INCLUDE) make: *** [install] Fehler 1 ==> FEHLER: Ein Fehler geschah in package(). Breche ab ... ==> ERROR: Makepkg was unable to build insight-toolkit. ==> Restart building insight-toolkit ? [y/N]

giniu commented on 2012-04-01 12:30 (UTC)

I decided to take care for this package for some time. First thing I will do is update to 4.1.0 and enabling of Python bindings as I got them working with 4.x. Next step will be trying to make use of system-wide installed jpeg/png/tiff/zlib/hdf/... libraries (this part did not worked with 4.0, still have to check with 4.1 - it should improve compilation time). Later I will look into enabling other bindings (just like VTK does).

commented on 2011-07-23 10:28 (UTC)

@td123: Thanks :)

td123 commented on 2011-07-21 18:53 (UTC)

@lunaryorn, done

commented on 2011-07-21 18:40 (UTC)

Could you please add "-DITK_USE_REVIEW:BOOL=ON" to the PKGBUILD to enable the ITK Review library?

td123 commented on 2011-05-25 22:30 (UTC)

thanks for letting me know, I will have a fixed version up soon

intelfx commented on 2011-05-25 17:47 (UTC)

A problem is encountered when compiling with GCC 4.6.0 - ptrdiff_t is not defined. This seems to happen because ITK includes <cstddef>, but uses globally-defined "ptrdiff_t". This worked with earlier versions of GCC because of a side-effect global "ptrdiff_t".