| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 |
|
| 49 | (define-module (gnu packages image-processing)
|
| 50 | #:use-module ((guix licenses) #:prefix license:)
|
| 51 | #:use-module (guix packages)
|
| 52 | #:use-module (guix gexp)
|
| 53 | #:use-module (guix utils)
|
| 54 | #:use-module (guix download)
|
| 55 | #:use-module (guix git-download)
|
| 56 | #:use-module (guix build-system copy)
|
| 57 | #:use-module (guix build-system qt)
|
| 58 | #:use-module (guix build-system cmake)
|
| 59 | #:use-module (guix build-system gnu)
|
| 60 | #:use-module (guix build-system meson)
|
| 61 | #:use-module (guix build-system pyproject)
|
| 62 | #:use-module (gnu packages)
|
| 63 | #:use-module (gnu packages algebra)
|
| 64 | #:use-module (gnu packages base)
|
| 65 | #:use-module (gnu packages bash)
|
| 66 | #:use-module (gnu packages bison)
|
| 67 | #:use-module (gnu packages boost)
|
| 68 | #:use-module (gnu packages check)
|
| 69 | #:use-module (gnu packages compression)
|
| 70 | #:use-module (gnu packages cpp)
|
| 71 | #:use-module (gnu packages curl)
|
| 72 | #:use-module (gnu packages docbook)
|
| 73 | #:use-module (gnu packages documentation)
|
| 74 | #:use-module (gnu packages engineering)
|
| 75 | #:use-module (gnu packages compiler-tools)
|
| 76 | #:use-module (gnu packages fontutils)
|
| 77 | #:use-module (gnu packages game-development)
|
| 78 | #:use-module (gnu packages gcc)
|
| 79 | #:use-module (gnu packages gd)
|
| 80 | #:use-module (gnu packages geo)
|
| 81 | #:use-module (gnu packages ghostscript)
|
| 82 | #:use-module (gnu packages gimp)
|
| 83 | #:use-module (gnu packages gl)
|
| 84 | #:use-module (gnu packages glib)
|
| 85 | #:use-module (gnu packages gnome)
|
| 86 | #:use-module (gnu packages graphics)
|
| 87 | #:use-module (gnu packages graphviz)
|
| 88 | #:use-module (gnu packages gstreamer)
|
| 89 | #:use-module (gnu packages gtk)
|
| 90 | #:use-module (gnu packages icu4c)
|
| 91 | #:use-module (gnu packages image)
|
| 92 | #:use-module (gnu packages imagemagick)
|
| 93 | #:use-module (gnu packages linux)
|
| 94 | #:use-module (gnu packages lua)
|
| 95 | #:use-module (gnu packages machine-learning)
|
| 96 | #:use-module (gnu packages maths)
|
| 97 | #:use-module (gnu packages mpi)
|
| 98 | #:use-module (gnu packages nss)
|
| 99 | #:use-module (gnu packages oneapi)
|
| 100 | #:use-module (gnu packages opencl)
|
| 101 | #:use-module (gnu packages pdf)
|
| 102 | #:use-module (gnu packages perl)
|
| 103 | #:use-module (gnu packages photo)
|
| 104 | #:use-module (gnu packages pkg-config)
|
| 105 | #:use-module (gnu packages pretty-print)
|
| 106 | #:use-module (gnu packages protobuf)
|
| 107 | #:use-module (gnu packages python)
|
| 108 | #:use-module (gnu packages python-build)
|
| 109 | #:use-module (gnu packages python-check)
|
| 110 | #:use-module (gnu packages python-science)
|
| 111 | #:use-module (gnu packages python-xyz)
|
| 112 | #:use-module (gnu packages qt)
|
| 113 | #:use-module (gnu packages sdl)
|
| 114 | #:use-module (gnu packages serialization)
|
| 115 | #:use-module (gnu packages sphinx)
|
| 116 | #:use-module (gnu packages sqlite)
|
| 117 | #:use-module (gnu packages ssh)
|
| 118 | #:use-module (gnu packages statistics)
|
| 119 | #:use-module (gnu packages swig)
|
| 120 | #:use-module (gnu packages textutils)
|
| 121 | #:use-module (gnu packages tls)
|
| 122 | #:use-module (gnu packages version-control)
|
| 123 | #:use-module (gnu packages video)
|
| 124 | #:use-module (gnu packages xiph)
|
| 125 | #:use-module (gnu packages xml)
|
| 126 | #:use-module (gnu packages xorg)
|
| 127 | #:use-module (ice-9 match)
|
| 128 | #:use-module (srfi srfi-1))
|
| 129 |
|
| 130 | (define-public bart
|
| 131 | (package
|
| 132 | (name "bart")
|
| 133 | (version "0.9.00")
|
| 134 | (source
|
| 135 | (origin
|
| 136 | (method git-fetch)
|
| 137 | (uri (git-reference
|
| 138 | (url "https://github.com/mrirecon/bart")
|
| 139 | (commit (string-append "v" version))))
|
| 140 | (file-name (git-file-name name version))
|
| 141 | (sha256
|
| 142 | (base32 "0mj6jmw31rsnvqmpfqahhj4cy9iv5xgrhzmcsrikdz5dgd45lmjz"))))
|
| 143 | (build-system gnu-build-system)
|
| 144 | (arguments
|
| 145 | (list
|
| 146 | #:test-target "utest"
|
| 147 | #:make-flags #~(list
|
| 148 | (string-append "PREFIX=" #$output)
|
| 149 | "PARALLEL=1"
|
| 150 | "PARALLEL_NJOBS=1"
|
| 151 | "OPENBLAS=1"
|
| 152 | "SCALAPACK=1"
|
| 153 | (string-append "BLAS_BASE=" #$(this-package-input "openblas"))
|
| 154 | (string-append "CC=" #$(cc-for-target))
|
| 155 | (string-append "FFTW_BASE=" #$(this-package-input "fftw")))
|
| 156 | #:parallel-build? #false |
| 157 | #:phases
|
| 158 | #~(modify-phases %standard-phases
|
| 159 | (delete 'configure)
|
| 160 | (add-after 'unpack 'patch-/bin/bash
|
| 161 | (lambda _
|
| 162 | (substitute* "tests/pics.mk"
|
| 163 | (("/bin/bash") (which "bash"))))))))
|
| 164 | (inputs
|
| 165 | (list fftw
|
| 166 | fftwf
|
| 167 | libpng
|
| 168 | openblas
|
| 169 | python
|
| 170 | scalapack))
|
| 171 | (native-inputs
|
| 172 | (list doxygen
|
| 173 | util-linux)) |
| 174 | (home-page "https://mrirecon.github.io/bart/")
|
| 175 | (synopsis "Toolbox for computational magnetic resonance imaging")
|
| 176 | (description "The Berkeley Advanced Reconstruction Toolbox (BART) is an
|
| 177 | image-reconstruction framework for Computational Magnetic Resonance Imaging.
|
| 178 | The tools in this software implement various reconstruction algorithms for
|
| 179 | Magnetic Resonance Imaging.")
|
| 180 | (license license:bsd-3)))
|
| 181 |
|
| 182 | (define-public cimg
|
| 183 | (package
|
| 184 | (name "cimg")
|
| 185 | (version "3.7.2")
|
| 186 | (source
|
| 187 | (origin
|
| 188 | (method git-fetch)
|
| 189 | (uri (git-reference
|
| 190 | (url "https://github.com/GreycLab/CImg")
|
| 191 | (commit (string-append "v." version))))
|
| 192 | (file-name (git-file-name name version))
|
| 193 | (sha256
|
| 194 | (base32 "017yhaq1qysimiq0xi3a4kngwm521s5ghhv2w5mr9dmf8vaxdx31"))))
|
| 195 | (build-system copy-build-system)
|
| 196 | (arguments
|
| 197 | (list
|
| 198 | #:phases
|
| 199 | #~(modify-phases %standard-phases
|
| 200 | (add-before 'install 'check
|
| 201 | (lambda* (#:key tests? #:allow-other-keys)
|
| 202 | (when tests?
|
| 203 | (with-directory-excursion "examples"
|
| 204 | |
| 205 | (invoke "make" "-j"
|
| 206 | (number->string (parallel-job-count)) "mlinux")
|
| 207 | (invoke "./image2ascii")
|
| 208 | (invoke "./generate_loop_macros")
|
| 209 | |
| 210 | |
| 211 | (invoke "make" "use_jpeg_buffer"
|
| 212 | (string-append "CONF_CFLAGS="
|
| 213 | (string-join '("-Dcimg_display=0"
|
| 214 | "-O3"
|
| 215 | "-mtune=generic"
|
| 216 | "-Dcimg_use_jpeg")
|
| 217 | " "))
|
| 218 | "CONF_LIBS=-ljpeg"))))))
|
| 219 | #:install-plan
|
| 220 | #~'(("CImg.h" "include/")
|
| 221 | ("plugins" "include/CImg/plugins"))))
|
| 222 | (native-inputs (list libjpeg-turbo)) |
| 223 | (home-page "https://cimg.eu")
|
| 224 | (synopsis "Small C++ image processing library")
|
| 225 | (description
|
| 226 | "The @acronym{CImg, Cool Image} Library is a small C++ toolkit for
|
| 227 | image processing. It is made of a single header file @code{CImg.h}
|
| 228 | that can be compiled using a minimal set of standard C++ and system
|
| 229 | libraries. It includes a plugin mechanism to extend its functionality
|
| 230 | with external tools and libraries.")
|
| 231 | |
| 232 | (license (list license:cecill-c license:cecill))))
|
| 233 |
|
| 234 | (define-public dcmtk
|
| 235 | (package
|
| 236 | (name "dcmtk")
|
| 237 | (version "3.6.9")
|
| 238 | (source
|
| 239 | (origin
|
| 240 | (method git-fetch)
|
| 241 | (uri (git-reference
|
| 242 | (url "https://git.dcmtk.org/dcmtk")
|
| 243 | (commit (string-append "DCMTK-" version))))
|
| 244 | (sha256
|
| 245 | (base32 "0x99gg1kahkzbayfciyhkw5xdcm8cs4r8cmv15kniw9pldi3zllr"))
|
| 246 | (file-name (git-file-name name version))))
|
| 247 | (build-system cmake-build-system)
|
| 248 | (arguments
|
| 249 | |
| 250 | (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")))
|
| 251 | (inputs
|
| 252 | (list icu4c
|
| 253 | libjpeg-turbo
|
| 254 | libpng
|
| 255 | libtiff
|
| 256 | libxml2
|
| 257 | openssl
|
| 258 | zlib))
|
| 259 | (native-inputs
|
| 260 | (list doxygen)) |
| 261 | (home-page "https://dcmtk.org")
|
| 262 | (synopsis "Libraries and programs implementing parts of the DICOM standard")
|
| 263 | (description "DCMTK is a collection of libraries and applications
|
| 264 | implementing large parts the DICOM standard. It includes software for
|
| 265 | examining, constructing and converting DICOM image files, handling offline
|
| 266 | media, sending and receiving images over a network connection, as well as
|
| 267 | demonstrative image storage and worklist servers.")
|
| 268 | (license (license:fsf-free
|
| 269 | "file://COPYRIGHT"
|
| 270 | "A union of the Apache 2.0 licence and various non-copyleft
|
| 271 | licences similar to the Modified BSD licence."))))
|
| 272 |
|
| 273 | (define-public opencolorio
|
| 274 | (package
|
| 275 | (name "opencolorio")
|
| 276 | (version "2.4.2")
|
| 277 | (source
|
| 278 | (origin
|
| 279 | (method git-fetch)
|
| 280 | (uri (git-reference
|
| 281 | (url "https://github.com/AcademySoftwareFoundation/OpenColorIO")
|
| 282 | (commit (string-append "v" version))))
|
| 283 | (sha256
|
| 284 | (base32 "1h5n1adm7hlblq4z9qdbnh5jy3f6aimlk96cn1k4ah3f8vqx7zpq"))
|
| 285 | (file-name (git-file-name name version))))
|
| 286 | (build-system cmake-build-system)
|
| 287 | (arguments
|
| 288 | |
| 289 | (list #:configure-flags #~(list "-DOCIO_BUILD_GPU_TESTS=false")
|
| 290 | #:phases
|
| 291 | #~(modify-phases %standard-phases
|
| 292 | (add-after 'unpack 'disable-test
|
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | (lambda _
|
| 299 | (substitute* "tests/cpu/fileformats/FileFormatCTF_tests.cpp"
|
| 300 | (("OCIO_CHECK_NE.*ErrorOutputs.*")
|
| 301 | ""))))
|
| 302 | (add-after 'unpack 'fix-broken-test
|
| 303 | (lambda _
|
| 304 | |
| 305 | |
| 306 | |
| 307 | (substitute* "tests/cpu/Config_tests.cpp"
|
| 308 | (("cs1\\\\t\\\\n \\\\n, \\\\ncs2")
|
| 309 | "cs1, cs2"))))
|
| 310 | |
| 311 | |
| 312 | |
| 313 | #$@(if (or (target-arm?)
|
| 314 | (target-riscv64?))
|
| 315 | #~((add-after 'unpack 'disable-failing-test
|
| 316 | (lambda _
|
| 317 | (substitute* "tests/cpu/ops/gamma/GammaOpCPU_tests.cpp"
|
| 318 | ((".*apply_moncurve_mirror_style_fwd.*" all)
|
| 319 | (string-append "#if 0\n" all))
|
| 320 | ((".*apply_moncurve_mirror_style_rev.*" all)
|
| 321 | (string-append "#endif\n" all))))))
|
| 322 | #~()))))
|
| 323 | (native-inputs
|
| 324 | |
| 325 | |
| 326 | (list pybind11-2 python-wrapper))
|
| 327 | (inputs
|
| 328 | (list expat
|
| 329 | freeglut
|
| 330 | glew
|
| 331 | imath
|
| 332 | lcms
|
| 333 | libglvnd
|
| 334 | |
| 335 | minizip-ng-4.0.9
|
| 336 | openexr
|
| 337 | pystring
|
| 338 | yaml-cpp
|
| 339 | zlib))
|
| 340 | (home-page "https://opencolorio.org")
|
| 341 | (synopsis "Color management for visual effects and animation")
|
| 342 | (description
|
| 343 | "OpenColorIO, or OCIO, is a complete color management solution geared
|
| 344 | towards motion picture production, with an emphasis on visual effects and
|
| 345 | computer animation. It provides a straightforward and consistent user
|
| 346 | experience across all supporting applications while allowing for sophisticated
|
| 347 | back-end configuration options suitable for high-end production usage.
|
| 348 |
|
| 349 | OCIO is compatible with the @acronym{ACES, Academy Color Encoding
|
| 350 | Specification} and is @acronym{LUT, look-up table}-format agnostic, supporting
|
| 351 | many popular formats.")
|
| 352 | (license license:bsd-3)))
|
| 353 |
|
| 354 | (define-public vtk
|
| 355 | (package
|
| 356 | (name "vtk")
|
| 357 | (version "9.6.0")
|
| 358 | (source (origin
|
| 359 | (method url-fetch)
|
| 360 | (uri (string-append "https://vtk.org/files/release/"
|
| 361 | (version-major+minor version)
|
| 362 | "/VTK-" version ".tar.gz"))
|
| 363 | (sha256
|
| 364 | (base32
|
| 365 | "1wmq7cd6c60hp7xip08mjrwhwygna4vabfbqcn0xrbzsjh31hzfp"))
|
| 366 | (modules '((guix build utils)))
|
| 367 | (snippet
|
| 368 | '(begin
|
| 369 | (for-each
|
| 370 | (lambda (dir)
|
| 371 | (delete-file-recursively
|
| 372 | (string-append "ThirdParty/" dir "/vtk" dir)))
|
| 373 | |
| 374 | '("eigen" "expat" "freetype" "gl2ps"
|
| 375 | "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
|
| 376 | "libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
|
| 377 | "tiff" "zlib"))))))
|
| 378 | (properties `((release-monitoring-url . "https://vtk.org/download/")))
|
| 379 | (build-system cmake-build-system)
|
| 380 | (arguments
|
| 381 | (list #:build-type "Release" |
| 382 | #:configure-flags
|
| 383 | #~'("-DVTK_USE_EXTERNAL=OFF" |
| 384 | "-DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion=ON"
|
| 385 | "-DVTK_MODULE_USE_EXTERNAL_VTK_eigen=ON"
|
| 386 | "-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
|
| 387 | "-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
|
| 388 | "-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
|
| 389 | "-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON"
|
| 390 | "-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
|
| 391 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
|
| 392 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
|
| 393 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=ON"
|
| 394 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON"
|
| 395 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON"
|
| 396 | "-DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON"
|
| 397 | "-DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON"
|
| 398 | "-DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON"
|
| 399 | "-DVTK_MODULE_USE_EXTERNAL_VTK_png=ON"
|
| 400 | |
| 401 | "-DVTK_MODULE_USE_EXTERNAL_VTK_sqlite=ON"
|
| 402 | "-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
|
| 403 | "-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
|
| 404 | "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"
|
| 405 | "-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES" |
| 406 | "-DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES" |
| 407 | "-DVTK_WRAP_PYTHON=ON"
|
| 408 | "-DVTK_PYTHON_VERSION:STRING=3"
|
| 409 |
|
| 410 | "-DVTK_SMP_ENABLE_OPENNMP=ON"
|
| 411 | "-DVTK_SMP_ENABLE_TBB=ON"
|
| 412 | "-DVTK_USE_MPI=ON"
|
| 413 | #$@(if (target-riscv64?)
|
| 414 | '("-DCMAKE_SHARED_LINKER_FLAGS=-latomic"
|
| 415 | "-DCMAKE_EXE_LINKER_FLAGS=-latomic")
|
| 416 | '()))
|
| 417 |
|
| 418 | #:phases
|
| 419 | #~(modify-phases %standard-phases
|
| 420 | (add-after 'unpack 'clear-reference-to-compiler
|
| 421 | (lambda _
|
| 422 | (define (choose . files)
|
| 423 | (let loop ((files files))
|
| 424 | (if (null? files)
|
| 425 | #f
|
| 426 | (if (file-exists? (car files))
|
| 427 | (car files)
|
| 428 | (loop (cdr files))))))
|
| 429 |
|
| 430 | |
| 431 | (substitute* (choose
|
| 432 | "Common/Core/vtkBuild.h.in" |
| 433 | "Common/Core/vtkConfigureDeprecated.h.in" |
| 434 | "Common/Core/vtkConfigure.h.in") |
| 435 | (("@CMAKE_CXX_COMPILER@") "c++")))))
|
| 436 |
|
| 437 | #:tests? #f)) |
| 438 | (inputs
|
| 439 | (list double-conversion
|
| 440 | eigen
|
| 441 | expat
|
| 442 | freetype
|
| 443 | gl2ps
|
| 444 | glew
|
| 445 | glu
|
| 446 | hdf5
|
| 447 | libharu
|
| 448 | libjpeg-turbo
|
| 449 | jsoncpp
|
| 450 | libtheora
|
| 451 | libx11
|
| 452 | libxml2
|
| 453 | libxt
|
| 454 | lz4
|
| 455 | mesa
|
| 456 | netcdf
|
| 457 | libpng
|
| 458 | libtiff
|
| 459 | openmpi
|
| 460 | proj
|
| 461 | python
|
| 462 | |
| 463 | sqlite
|
| 464 | xorgproto
|
| 465 | qtbase
|
| 466 | zlib))
|
| 467 | (propagated-inputs
|
| 468 | |
| 469 | |
| 470 | |
| 471 | (list libogg
|
| 472 | onetbb))
|
| 473 | (home-page "https://vtk.org/")
|
| 474 | (synopsis "Libraries for 3D computer graphics")
|
| 475 | (description
|
| 476 | "The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
|
| 477 | image processing and visualization. It supports a wide variety of
|
| 478 | visualization algorithms including: scalar, vector, tensor, texture, and
|
| 479 | volumetric methods; and advanced modeling techniques such as: implicit
|
| 480 | modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
|
| 481 | triangulation. VTK has an extensive information visualization framework, has
|
| 482 | a suite of 3D interaction widgets, supports parallel processing, and
|
| 483 | integrates with various databases on GUI toolkits such as Qt and Tk.")
|
| 484 | (license license:bsd-3)))
|
| 485 |
|
| 486 | (define-public vtk-9.5
|
| 487 | (package
|
| 488 | (inherit vtk)
|
| 489 | (version "9.5.2")
|
| 490 | (source (origin
|
| 491 | (method url-fetch)
|
| 492 | (uri (string-append "https://vtk.org/files/release/"
|
| 493 | (version-major+minor version)
|
| 494 | "/VTK-" version ".tar.gz"))
|
| 495 | (sha256
|
| 496 | (base32
|
| 497 | "12f9cbazgxrm71r4fpdlxk0mlpgzim2i7vziv8177zvhsac4prnf"))
|
| 498 | (modules '((guix build utils)))
|
| 499 | (snippet
|
| 500 | '(begin
|
| 501 | (for-each
|
| 502 | (lambda (dir)
|
| 503 | (delete-file-recursively
|
| 504 | (string-append "ThirdParty/" dir "/vtk" dir)))
|
| 505 | |
| 506 | '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
|
| 507 | "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
|
| 508 | "libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
|
| 509 | "tiff" "zlib"))))))))
|
| 510 |
|
| 511 | (define-public vtk-9.4
|
| 512 | (package
|
| 513 | (inherit vtk)
|
| 514 | (version "9.4.2")
|
| 515 | (source (origin
|
| 516 | (method url-fetch)
|
| 517 | (uri (string-append "https://vtk.org/files/release/"
|
| 518 | (version-major+minor version)
|
| 519 | "/VTK-" version ".tar.gz"))
|
| 520 | (sha256
|
| 521 | (base32
|
| 522 | "00kahpi53hld3ip3cfswdnvfg4llmabq0w2kzqq2mcbbm46qxj9n"))
|
| 523 | (modules '((guix build utils)))
|
| 524 | (snippet
|
| 525 | '(begin
|
| 526 | (for-each
|
| 527 | (lambda (dir)
|
| 528 | (delete-file-recursively
|
| 529 | (string-append "ThirdParty/" dir "/vtk" dir)))
|
| 530 | |
| 531 | '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
|
| 532 | "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
|
| 533 | "libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
|
| 534 | "tiff" "zlib"))))))))
|
| 535 |
|
| 536 | (define-public vtk-9.3
|
| 537 | (package
|
| 538 | (inherit vtk)
|
| 539 | (version "9.3.1")
|
| 540 | (source (origin
|
| 541 | (method url-fetch)
|
| 542 | (uri (string-append "https://vtk.org/files/release/"
|
| 543 | (version-major+minor version)
|
| 544 | "/VTK-" version ".tar.gz"))
|
| 545 | (sha256
|
| 546 | (base32
|
| 547 | "1f6ac40db7wkb3bfh31d71qc5gy44cw29r6v4cyxrlm09q4fqm43"))
|
| 548 | (modules '((guix build utils)))
|
| 549 | (snippet
|
| 550 | '(begin
|
| 551 | (for-each
|
| 552 | (lambda (dir)
|
| 553 | (delete-file-recursively
|
| 554 | (string-append "ThirdParty/" dir "/vtk" dir)))
|
| 555 | |
| 556 | '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
|
| 557 | "glew" "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
|
| 558 | "libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
|
| 559 | "tiff" "zlib"))
|
| 560 | (substitute* "IO/ExportPDF/vtkPDFContextDevice2D.cxx"
|
| 561 | (("\\bHPDF_UINT16 (noPen|dash|dot|denseDot|dashDot|dashDotDot)\\b"
|
| 562 | _ var)
|
| 563 | (string-append "HPDF_REAL " var)))))))))
|
| 564 |
|
| 565 | (define-public vktdiff
|
| 566 | (package
|
| 567 | (name "vtkdiff")
|
| 568 | (version "1.0.0")
|
| 569 | (source
|
| 570 | (origin
|
| 571 | (method git-fetch)
|
| 572 | (uri (git-reference
|
| 573 | (url "https://github.com/ufz/vtkdiff")
|
| 574 | (commit version)))
|
| 575 | (file-name (git-file-name name version))
|
| 576 | (sha256
|
| 577 | (base32 "15nwzfhgyjfvd083kw1s19xkxcds9h31hx9cr339x3bkllbj609j"))))
|
| 578 | (build-system cmake-build-system)
|
| 579 | (inputs (list tclap vtk))
|
| 580 | (arguments
|
| 581 | (list
|
| 582 | #:tests? #f |
| 583 | #:configure-flags #~(list "-DGUIX_BUILD=ON")))
|
| 584 | (home-page "https://github.com/ufz/vtkdiff")
|
| 585 | (synopsis "Numerical difference of data arrays in vtk files")
|
| 586 | (description
|
| 587 | "The vtkdiff tool shall provide means of numerical comparison of
|
| 588 | different data arrays similar to those available in the numdiff software.")
|
| 589 | (license license:bsd-3)))
|
| 590 |
|
| 591 | (define-public opencv
|
| 592 | (package
|
| 593 | (name "opencv")
|
| 594 | (version "4.14.0")
|
| 595 | (source (origin
|
| 596 | (method git-fetch)
|
| 597 | (uri (git-reference
|
| 598 | (url "https://github.com/opencv/opencv")
|
| 599 | (commit version)))
|
| 600 | (file-name (git-file-name name version))
|
| 601 | (snippet
|
| 602 | #~(begin
|
| 603 | (use-modules (guix build utils))
|
| 604 | |
| 605 | (for-each delete-file (find-files "." "\\.jar$"))
|
| 606 | (delete-all-but "3rdparty"
|
| 607 | "fastcv" |
| 608 | "libspng"
|
| 609 | "libtim-vx"
|
| 610 | "orbbecsdk"
|
| 611 | "quirc"
|
| 612 | "zlib-ng")))
|
| 613 | (sha256
|
| 614 | (base32
|
| 615 | "0f3arwiwcdr8xwiph5h1g4lwrw9x64sppwxy4k2pkj3cfl6dnw07"))))
|
| 616 | (build-system cmake-build-system)
|
| 617 | (arguments
|
| 618 | (list
|
| 619 | #:parallel-tests? #f
|
| 620 | #:configure-flags
|
| 621 | #~(list "-DWITH_ADE=OFF" |
| 622 | "-DWITH_IPP=OFF"
|
| 623 | "-DWITH_ITT=OFF"
|
| 624 | "-DWITH_CAROTENE=OFF" |
| 625 | "-DENABLE_PRECOMPILED_HEADERS=OFF"
|
| 626 | "-DOPENCV_GENERATE_PKGCONFIG=ON"
|
| 627 |
|
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | "-DCPU_BASELINE=SSE2"
|
| 635 |
|
| 636 | |
| 637 | "-DBUILD_opencv_python3=ON"
|
| 638 |
|
| 639 | #$@(match (%current-system)
|
| 640 | ("x86_64-linux"
|
| 641 | '("-DCPU_DISPATCH=NEON;VFPV3;FP16;SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX"
|
| 642 | "-DCPU_DISPATCH_REQUIRE=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2"))
|
| 643 | ("armhf-linux"
|
| 644 | '("-DCPU_BASELINE_DISABLE=NEON")) |
| 645 | ("aarch64-linux"
|
| 646 | '("-DCPU_BASELINE=NEON"
|
| 647 | "-DCPU_DISPATCH=NEON;VFPV3;FP16"))
|
| 648 | (_ '()))
|
| 649 |
|
| 650 | "-DBUILD_PERF_TESTS=OFF"
|
| 651 | "-DBUILD_TESTS=ON"
|
| 652 |
|
| 653 | (string-append "-DOPENCV_EXTRA_MODULES_PATH=" (getcwd)
|
| 654 | "/opencv-contrib/modules")
|
| 655 |
|
| 656 | |
| 657 | (string-append "-DOPENCV_TEST_DATA_PATH=" (getcwd)
|
| 658 | "/opencv-extra/testdata")
|
| 659 |
|
| 660 | |
| 661 | |
| 662 | "-DBUILD_PROTOBUF=OFF"
|
| 663 |
|
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | "-DWITH_FLATBUFFERS=OFF"
|
| 669 |
|
| 670 | |
| 671 | |
| 672 | |
| 673 | "-DPROTOBUF_UPDATE_FILES=ON"
|
| 674 |
|
| 675 | |
| 676 | "-DOPENCV_SKIP_FEATURES2D_DOWNLOADING=ON")
|
| 677 | #:phases
|
| 678 | #~(modify-phases %standard-phases
|
| 679 | (add-after 'unpack 'disable-broken-tests
|
| 680 | (lambda _
|
| 681 | |
| 682 | |
| 683 | (substitute* "../opencv-contrib/modules/face/test/test_face_align.cpp"
|
| 684 | (("\\bcan_detect_landmarks\\b" all)
|
| 685 | (string-append "DISABLED_" all)))
|
| 686 |
|
| 687 | |
| 688 | |
| 689 | (substitute* "modules/imgcodecs/test/test_exr.impl.hpp"
|
| 690 | (("\\breadWrite_32FC1\\b" all)
|
| 691 | (string-append "DISABLED_" all)))
|
| 692 |
|
| 693 | |
| 694 | |
| 695 | (substitute* "modules/dnn/test/test_layers.cpp"
|
| 696 | (("\\b(Accum|DataAugmentation|Resample|Correlation|Interp)\\b" all)
|
| 697 | (string-append "DISABLED_" all)))
|
| 698 |
|
| 699 | |
| 700 | |
| 701 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 702 | (("0\\.1\\)") "0.222)"))
|
| 703 |
|
| 704 | #$@(if (target-aarch64?)
|
| 705 | `( |
| 706 | |
| 707 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 708 | (("0\\.131") "0.222"))
|
| 709 | |
| 710 | (delete-file-recursively "modules/videoio/test/")
|
| 711 | |
| 712 | |
| 713 | |
| 714 | (substitute* "../opencv-contrib/modules/optflow/test/test_OF_accuracy.cpp"
|
| 715 | (("\\bReferenceAccuracy\\b" all)
|
| 716 | (string-append "DISABLED_" all))))
|
| 717 | '())
|
| 718 |
|
| 719 | #$@(if (target-riscv64?)
|
| 720 | `( |
| 721 | |
| 722 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 723 | (("0\\.1") "0.240"))
|
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | (substitute* "../opencv-contrib/modules/ximgproc/test/test_fld.cpp"
|
| 730 | (("\\bManySmallCircles\\b" all)
|
| 731 | (string-append "DISABLED_" all))))
|
| 732 | '())))
|
| 733 | (add-after 'unpack 'unpack-submodule-sources
|
| 734 | (lambda* (#:key inputs #:allow-other-keys)
|
| 735 | (mkdir "../opencv-extra")
|
| 736 | (mkdir "../opencv-contrib")
|
| 737 | (copy-recursively (assoc-ref inputs "opencv-extra")
|
| 738 | "../opencv-extra")
|
| 739 | (copy-recursively (assoc-ref inputs "opencv-contrib")
|
| 740 | "../opencv-contrib")
|
| 741 |
|
| 742 | |
| 743 | |
| 744 | (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLists.txt"
|
| 745 | (("download_(boost|vgg)_descriptors") "#"))
|
| 746 | (copy-recursively (assoc-ref inputs "opencv-3rdparty-boost")
|
| 747 | "../downloads/xfeatures2d")
|
| 748 | (for-each make-file-writable
|
| 749 | (find-files "../downloads/xfeatures2d" "."))
|
| 750 | (copy-recursively (assoc-ref inputs "opencv-3rdparty-vgg")
|
| 751 | "../downloads/xfeatures2d")))
|
| 752 | (add-after 'build 'do-not-install-3rdparty-file
|
| 753 | (lambda _
|
| 754 | (substitute* "cmake_install.cmake"
|
| 755 | (("file\\(INSTALL .*3rdparty/include/opencl/LICENSE.txt.*")
|
| 756 | ""))))
|
| 757 | (add-before 'check 'start-xserver
|
| 758 | (lambda* (#:key inputs #:allow-other-keys)
|
| 759 | (let ((xorg-server (assoc-ref inputs "xorg-server"))
|
| 760 | (disp ":1"))
|
| 761 | (setenv "HOME" (getcwd))
|
| 762 | (setenv "DISPLAY" disp)
|
| 763 | |
| 764 | |
| 765 | (zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp)))))))))
|
| 766 | (native-inputs
|
| 767 | `(("pkg-config" ,pkg-config)
|
| 768 | ("xorg-server" ,xorg-server-for-tests) |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | ("opencv-3rdparty-boost"
|
| 775 | ,(let ((commit "34e4206aef44d50e6bbcd0ab06354b52e7466d26"))
|
| 776 | (origin
|
| 777 | (method git-fetch)
|
| 778 | (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
|
| 779 | (commit commit)))
|
| 780 | (file-name (git-file-name "opencv_3rdparty" commit))
|
| 781 | (sha256
|
| 782 | (base32
|
| 783 | "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62")))))
|
| 784 | |
| 785 | |
| 786 | |
| 787 | ("opencv-3rdparty-vgg"
|
| 788 | ,(let ((commit "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"))
|
| 789 | (origin
|
| 790 | (method git-fetch)
|
| 791 | (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
|
| 792 | (commit commit)))
|
| 793 | (file-name (git-file-name "opencv_3rdparty" commit))
|
| 794 | (sha256
|
| 795 | (base32
|
| 796 | "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy")))))
|
| 797 | ("opencv-extra"
|
| 798 | ,(origin
|
| 799 | (method git-fetch)
|
| 800 | (uri (git-reference
|
| 801 | (url "https://github.com/opencv/opencv_extra")
|
| 802 | (commit version)))
|
| 803 | (file-name (git-file-name "opencv_extra" version))
|
| 804 | (sha256
|
| 805 | (base32
|
| 806 | "04h48bzw8vl3pfw9sd9ap8aafhamgyvx6gmn6d7ik5zblq81msbw"))))
|
| 807 | ("opencv-contrib"
|
| 808 | ,(origin
|
| 809 | (method git-fetch)
|
| 810 | (uri (git-reference (url "https://github.com/opencv/opencv_contrib")
|
| 811 | (commit version)))
|
| 812 | (file-name (git-file-name "opencv_contrib" version))
|
| 813 | (sha256
|
| 814 | (base32
|
| 815 | "1xixy1plh21smbaslgrd0hzjjpf2qbpxdfsyykasnwr9fab3362w"))))))
|
| 816 | (inputs
|
| 817 | (list dlpack
|
| 818 | eigen
|
| 819 | ffmpeg-4
|
| 820 | |
| 821 | gtk+
|
| 822 | hdf5
|
| 823 | imath |
| 824 | jasper
|
| 825 | libgphoto2
|
| 826 | libjpeg-turbo
|
| 827 | libpng
|
| 828 | libtiff
|
| 829 | libwebp
|
| 830 | openblas
|
| 831 | opencl-headers
|
| 832 | openexr
|
| 833 | openmpi
|
| 834 | openjpeg
|
| 835 | protobuf
|
| 836 | python
|
| 837 | python-numpy
|
| 838 | vtk-9.3
|
| 839 | zlib))
|
| 840 | |
| 841 | |
| 842 | (properties '((lint-hidden-cve . ("CVE-2018-7712"
|
| 843 | "CVE-2018-7713"
|
| 844 | "CVE-2018-7714"))))
|
| 845 | (synopsis "Computer vision library")
|
| 846 | (description "OpenCV is a library aimed at real-time computer vision,
|
| 847 | including several hundred computer vision algorithms. It can be used to do
|
| 848 | things like:
|
| 849 |
|
| 850 | @itemize
|
| 851 | @item image and video input and output
|
| 852 | @item image and video processing
|
| 853 | @item displaying
|
| 854 | @item feature recognition
|
| 855 | @item segmentation
|
| 856 | @item facial recognition
|
| 857 | @item stereo vision
|
| 858 | @item structure from motion
|
| 859 | @item augmented reality
|
| 860 | @item machine learning
|
| 861 | @end itemize\n
|
| 862 |
|
| 863 | This package includes the Python bindings for OpenCV, which are also known as
|
| 864 | the OpenCV-Python library.")
|
| 865 | (home-page "https://opencv.org/")
|
| 866 | (license license:bsd-3)))
|
| 867 |
|
| 868 | (define-public vips
|
| 869 | (package
|
| 870 | (name "vips")
|
| 871 | (version "8.17.0")
|
| 872 | (source
|
| 873 | (origin
|
| 874 | (method git-fetch)
|
| 875 | (uri (git-reference
|
| 876 | (url "https://github.com/libvips/libvips")
|
| 877 | (commit (string-append "v" version))))
|
| 878 | (file-name (git-file-name name version))
|
| 879 | (sha256
|
| 880 | (base32 "1rdz2mmivr02s7cksqgbramv37yw95w6s8r20hgjqx36in2ndnbl"))))
|
| 881 | (build-system meson-build-system)
|
| 882 | (native-inputs
|
| 883 | (list `(,glib "bin")
|
| 884 | gobject-introspection
|
| 885 | pkg-config))
|
| 886 | (inputs
|
| 887 | (list glib
|
| 888 | hdf5
|
| 889 | imagemagick
|
| 890 | poppler))
|
| 891 | |
| 892 | (propagated-inputs
|
| 893 | (list expat
|
| 894 | fftw
|
| 895 | lcms
|
| 896 | libexif
|
| 897 | libgsf
|
| 898 | libjpeg-turbo
|
| 899 | libpng
|
| 900 | (librsvg-for-system)
|
| 901 | libtiff
|
| 902 | libwebp
|
| 903 | matio
|
| 904 | openexr
|
| 905 | orc
|
| 906 | pango))
|
| 907 | (home-page "https://www.libvips.org/")
|
| 908 | (synopsis "Multithreaded image processing system with low memory needs")
|
| 909 | (description
|
| 910 | "VIPS is a demand-driven, horizontally threaded image processing library.
|
| 911 | It's particularly good at processing large images, working with colour,
|
| 912 | scientific analysis, and general research & development.
|
| 913 |
|
| 914 | Compared to most image processing libraries VIPS needs little RAM and runs
|
| 915 | quickly, especially on machines with more than one CPU core. This is primarily
|
| 916 | due to its architecture which automatically parallelises the image workflows.")
|
| 917 | (license license:lgpl2.1+)))
|
| 918 |
|
| 919 | (define-public gmic
|
| 920 | (package
|
| 921 | (name "gmic")
|
| 922 | (version "4.0.5")
|
| 923 | (source
|
| 924 | (origin
|
| 925 | (method url-fetch)
|
| 926 | (uri (string-append "https://gmic.eu/files/source/gmic_"
|
| 927 | version ".tar.gz"))
|
| 928 | (sha256
|
| 929 | (base32 "0nfsjvrj8acv037mvixjdrhd8n33calvf7axx2r1bmiyd541qxy6"))))
|
| 930 | (build-system cmake-build-system)
|
| 931 | (arguments
|
| 932 | (list
|
| 933 | #:tests? #f |
| 934 | #:configure-flags #~(list "-DBUILD_LIB_STATIC=OFF"
|
| 935 | "-DENABLE_DYNAMIC_LINKING=ON"
|
| 936 | (string-append "-DCMAKE_EXE_LINKER_FLAGS="
|
| 937 | "-Wl,-rpath=" #$output "/lib")
|
| 938 | "-DENABLE_LTO=ON")))
|
| 939 | (native-inputs
|
| 940 | (list pkg-config))
|
| 941 | (inputs
|
| 942 | (list curl
|
| 943 | fftw
|
| 944 | graphicsmagick
|
| 945 | imath
|
| 946 | libjpeg-turbo
|
| 947 | libpng
|
| 948 | libtiff
|
| 949 | libx11
|
| 950 | openexr
|
| 951 | zlib))
|
| 952 | (home-page "https://gmic.eu/")
|
| 953 | (synopsis "Full-featured framework for digital image processing")
|
| 954 | (description "G'MIC is a full-featured framework for digital image
|
| 955 | processing. It provides several user interfaces to convert / manipulate
|
| 956 | / filter / visualize generic image datasets, ranging from 1D scalar
|
| 957 | signals to 3D+t sequences of multi-spectral volumetric images, hence
|
| 958 | including 2D color images.")
|
| 959 | |
| 960 | (license (list license:cecill license:cecill-c))))
|
| 961 |
|
| 962 | (define-public gmic-qt
|
| 963 | (package
|
| 964 | (inherit gmic)
|
| 965 | (name "gmic-qt")
|
| 966 | (arguments
|
| 967 | (substitute-keyword-arguments arguments
|
| 968 | ((#:configure-flags _)
|
| 969 | #~(list "-DBUILD_WITH_QT6=ON"
|
| 970 | "-DGMIC_QT_HOST=none"
|
| 971 | "-DENABLE_DYNAMIC_LINKING=ON"))
|
| 972 | ((#:phases phases '%standard-phases)
|
| 973 | #~(modify-phases #$phases
|
| 974 | (add-after 'unpack 'qt-chdir
|
| 975 | (lambda _ (chdir "gmic-qt")))))))
|
| 976 | (native-inputs
|
| 977 | (list pkg-config qttools))
|
| 978 | (inputs
|
| 979 | (modify-inputs inputs
|
| 980 | (prepend gmic qtbase)))
|
| 981 | (synopsis "Qt frontend for the G'MIC image processing framework")
|
| 982 | (license license:gpl3+)))
|
| 983 |
|
| 984 | (define-public gmic-qt-gimp
|
| 985 | (package
|
| 986 | (inherit gmic-qt)
|
| 987 | (name "gmic-qt-gimp")
|
| 988 | (inputs
|
| 989 | |
| 990 | (modify-inputs inputs
|
| 991 | (prepend gexiv2-0.14 gdk-pixbuf gegl gimp pango)))
|
| 992 | (arguments
|
| 993 | (substitute-keyword-arguments arguments
|
| 994 | ((#:configure-flags flags)
|
| 995 | #~(list "-DBUILD_WITH_QT6=ON"
|
| 996 | "-DGMIC_QT_HOST=gimp3"
|
| 997 | "-DENABLE_DYNAMIC_LINKING=ON"))))
|
| 998 | (synopsis "GIMP plugin for the G'MIC image processing framework")))
|
| 999 |
|
| 1000 | (define-public nip2
|
| 1001 | (package
|
| 1002 | (name "nip2")
|
| 1003 | (version "8.9.1")
|
| 1004 | (source
|
| 1005 | (origin
|
| 1006 | (method url-fetch)
|
| 1007 | (uri (string-append "https://github.com/libvips/nip2/releases/download/v"
|
| 1008 | version "/nip2-" version ".tar.gz" ))
|
| 1009 | (sha256
|
| 1010 | (base32 "1kbndn37m0cfjvrvw25b5if9d962r8v79q78i2lzm55r7zmjcpmp"))))
|
| 1011 | (build-system gnu-build-system)
|
| 1012 | (arguments
|
| 1013 | `(#:phases
|
| 1014 | (modify-phases %standard-phases
|
| 1015 | (add-before 'check 'set-home
|
| 1016 | (lambda _
|
| 1017 | (setenv "HOME" "/tmp"))))))
|
| 1018 | (inputs (list gsl gtk+-2 vips))
|
| 1019 | (native-inputs (list bison flex pkg-config))
|
| 1020 | (home-page "https://github.com/libvips/nip2")
|
| 1021 | (synopsis "Spreadsheet-like GUI for libvips")
|
| 1022 | (description "This package provide a graphical user interface (GUI) for
|
| 1023 | the VIPS image processing library. It's a little like a spreadsheet: you
|
| 1024 | create a set of formula connecting your objects together, and on a change nip2
|
| 1025 | recalculates.")
|
| 1026 | (license license:gpl2+)))
|
| 1027 |
|
| 1028 | (define-public paraview
|
| 1029 | (package
|
| 1030 | (name "paraview")
|
| 1031 | (version "6.0.0")
|
| 1032 | (source
|
| 1033 | (origin
|
| 1034 | (method git-fetch)
|
| 1035 | (uri (git-reference
|
| 1036 | (url "https://gitlab.kitware.com/paraview/paraview")
|
| 1037 | (commit (string-append "v" version))
|
| 1038 | (recursive? #t)))
|
| 1039 | (file-name (git-file-name name version))
|
| 1040 | (sha256
|
| 1041 | (base32 "1m1c7vngrpaqdqvnjx4wj0va20hih5rb7rf0a44mp3wqgp4wgy0f"))
|
| 1042 | (modules '((guix build utils)))
|
| 1043 | (snippet
|
| 1044 | |
| 1045 | #~(begin
|
| 1046 | |
| 1047 | |
| 1048 | (for-each (lambda (dir)
|
| 1049 | (delete-file-recursively
|
| 1050 | (string-append "ThirdParty/" dir "/vtk"
|
| 1051 | (string-downcase dir))))
|
| 1052 | '( |
| 1053 | |
| 1054 | "NvPipe" |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | "protobuf"))
|
| 1059 | |
| 1060 | (delete-file-recursively "Plugins/pvNVIDIAIndeX")
|
| 1061 | |
| 1062 | (for-each (lambda (dir)
|
| 1063 | (delete-file-recursively
|
| 1064 | (string-append "VTK/ThirdParty/" dir "/vtk" dir)))
|
| 1065 | '("cgns"
|
| 1066 | "cli11"
|
| 1067 | |
| 1068 | "doubleconversion"
|
| 1069 | "eigen"
|
| 1070 | |
| 1071 | "expat"
|
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | "fmt"
|
| 1076 | "freetype"
|
| 1077 | "gl2ps"
|
| 1078 | |
| 1079 | |
| 1080 | "hdf5"
|
| 1081 | |
| 1082 | "jpeg"
|
| 1083 | "jsoncpp"
|
| 1084 | |
| 1085 | |
| 1086 | "libproj"
|
| 1087 | "libxml2"
|
| 1088 | |
| 1089 | "lz4"
|
| 1090 | "lzma"
|
| 1091 | "mpi4py"
|
| 1092 | "netcdf"
|
| 1093 | "nlohmannjson"
|
| 1094 | "ogg"
|
| 1095 | |
| 1096 | "png"
|
| 1097 | "pugixml"
|
| 1098 | "sqlite"
|
| 1099 | "theora"
|
| 1100 | "tiff"
|
| 1101 | |
| 1102 | "utf8"
|
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | "zlib"))))))
|
| 1110 | (build-system qt-build-system)
|
| 1111 | (arguments
|
| 1112 | (list
|
| 1113 | #:qtbase qtbase
|
| 1114 | #:build-type "Release" |
| 1115 | #:tests? #f |
| 1116 | #:configure-flags
|
| 1117 | #~(let ((doc (string-append "share/doc/" #$name "-" #$version)))
|
| 1118 | (list
|
| 1119 | (string-append "-DCMAKE_INSTALL_DOCDIR=" doc) |
| 1120 |
|
| 1121 | |
| 1122 | "-DPARAVIEW_BUILD_DEVELOPER_DOCUMENTATION=ON"
|
| 1123 | (string-append "-DPARAVIEW_GENERATED_DOCUMENTATION_OUTPUT_DIRECTORY=" doc)
|
| 1124 |
|
| 1125 | |
| 1126 | |
| 1127 | "-DPARAVIEW_USE_MPI=ON"
|
| 1128 | "-DPARAVIEW_USE_PYTHON=ON"
|
| 1129 | "-DPARAVIEW_USE_QTWEBENGINE=ON"
|
| 1130 |
|
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | "-DPARAVIEW_ENABLE_FFMPEG=ON"
|
| 1140 | |
| 1141 | "-DPARAVIEW_ENABLE_GDAL=ON"
|
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | "-DPARAVIEW_ENABLE_MOTIONFX=ON"
|
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | "-DPARAVIEW_ENABLE_VISITBRIDGE=ON"
|
| 1151 | "-DPARAVIEW_ENABLE_XDMF3=ON"
|
| 1152 |
|
| 1153 | |
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | "-DPARAVIEW_VERSIONED_INSTALL=OFF"
|
| 1158 | "-DPARAVIEW_DATA_EXCLUDE_FROM_ALL=OFF"
|
| 1159 |
|
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | "-DPARAVIEW_PLUGIN_ENABLE_CAVEInteraction=ON"
|
| 1168 | |
| 1169 | "-DPARAVIEW_PLUGIN_ENABLE_GeographicalMap=ON"
|
| 1170 | "-DPARAVIEW_PLUGIN_ENABLE_GmshIO=ON"
|
| 1171 | "-DPARAVIEW_PLUGIN_ENABLE_InSituExodus=ON"
|
| 1172 | |
| 1173 | "-DPARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin=ON"
|
| 1174 | |
| 1175 | |
| 1176 | "-DPARAVIEW_PLUGIN_ENABLE_SpaceMouseInteractor=ON"
|
| 1177 | |
| 1178 | |
| 1179 | |
| 1180 |
|
| 1181 | |
| 1182 | "-DVTK_SMP_IMPLEMENTATION_TYPE=TBB"
|
| 1183 | "-DVTKm_ENABLE_MPI=ON"
|
| 1184 |
|
| 1185 | |
| 1186 | "-DVTK_MODULE_USE_EXTERNAL_ParaView_protobuf=ON"
|
| 1187 | "-DVTK_MODULE_USE_EXTERNAL_VTK_cgns=ON"
|
| 1188 | "-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=ON"
|
| 1189 | "-DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion=ON"
|
| 1190 | "-DVTK_MODULE_USE_EXTERNAL_VTK_eigen=ON"
|
| 1191 | "-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
|
| 1192 | "-DVTK_MODULE_USE_EXTERNAL_VTK_fmt=ON"
|
| 1193 | "-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
|
| 1194 | "-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
|
| 1195 | "-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
|
| 1196 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
|
| 1197 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
|
| 1198 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON"
|
| 1199 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON"
|
| 1200 | "-DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON"
|
| 1201 | "-DVTK_MODULE_USE_EXTERNAL_VTK_lzma=ON"
|
| 1202 | "-DVTK_MODULE_USE_EXTERNAL_VTK_mpi4py=ON"
|
| 1203 | "-DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON"
|
| 1204 | "-DVTK_MODULE_USE_EXTERNAL_VTK_nlohmannjson=ON"
|
| 1205 | "-DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON"
|
| 1206 | |
| 1207 | "-DVTK_MODULE_USE_EXTERNAL_VTK_png=ON"
|
| 1208 | "-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=ON"
|
| 1209 | "-DVTK_MODULE_USE_EXTERNAL_VTK_sqlite=ON"
|
| 1210 | "-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
|
| 1211 | "-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
|
| 1212 | "-DVTK_MODULE_USE_EXTERNAL_VTK_utf8=ON"
|
| 1213 | "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"))
|
| 1214 | #:phases
|
| 1215 | #~(modify-phases %standard-phases
|
| 1216 | (add-after 'set-paths 'hide-gfortran
|
| 1217 | (lambda _
|
| 1218 | (setenv "CPLUS_INCLUDE_PATH"
|
| 1219 | (string-join
|
| 1220 | (delete (string-append #$(this-package-native-input "gfortran")
|
| 1221 | "/include/c++")
|
| 1222 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
|
| 1223 | ":"))))
|
| 1224 | (replace 'install-license-files
|
| 1225 | (lambda _
|
| 1226 | (let ((src (string-append #$output "/share/licenses/ParaView"))
|
| 1227 | (dst (string-append #$output "/share/doc/"
|
| 1228 | #$name "-" #$version "/licenses")))
|
| 1229 | (copy-recursively src dst)
|
| 1230 | (delete-file-recursively (dirname src))))))))
|
| 1231 | (native-inputs
|
| 1232 | (list gfortran
|
| 1233 | |
| 1234 | doxygen
|
| 1235 | graphviz
|
| 1236 | perl
|
| 1237 | python-sphinx))
|
| 1238 | (inputs
|
| 1239 | (list boost
|
| 1240 | cgns
|
| 1241 | cli11
|
| 1242 | curl
|
| 1243 | double-conversion
|
| 1244 | eigen
|
| 1245 | expat
|
| 1246 | ffmpeg
|
| 1247 | fmt-11
|
| 1248 | freetype
|
| 1249 | gdal
|
| 1250 | gl2ps
|
| 1251 | gmsh
|
| 1252 | hdf5
|
| 1253 | nlohmann-json |
| 1254 | jsoncpp
|
| 1255 | libjpeg-turbo
|
| 1256 | libogg
|
| 1257 | libpng
|
| 1258 | libtheora
|
| 1259 | libtiff
|
| 1260 | libxcursor
|
| 1261 | libxml2
|
| 1262 | libxslt
|
| 1263 | libxt
|
| 1264 | lz4
|
| 1265 | lzip
|
| 1266 | mesa
|
| 1267 | netcdf
|
| 1268 | openmpi
|
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | proj
|
| 1273 | protobuf
|
| 1274 | pugixml
|
| 1275 | python-cftime
|
| 1276 | python-matplotlib
|
| 1277 | python-mpi4py
|
| 1278 | python-numpy
|
| 1279 | python-wrapper
|
| 1280 | qt5compat
|
| 1281 | qtdeclarative
|
| 1282 | qtmultimedia
|
| 1283 | qtsvg
|
| 1284 | qttools
|
| 1285 | qtwebchannel
|
| 1286 | qtwebengine
|
| 1287 | sdl2
|
| 1288 | sqlite
|
| 1289 | onetbb
|
| 1290 | utfcpp
|
| 1291 | zlib))
|
| 1292 | (home-page "https://www.paraview.org/")
|
| 1293 | (synopsis "VTK-based, parallel data analyzer and visualizer")
|
| 1294 | (description "ParaView is a VTK-based, parallel data analyzer and
|
| 1295 | visualizer which allows exploring data interactively in 3D or
|
| 1296 | programmatically.")
|
| 1297 | (license license:bsd-3)))
|
| 1298 |
|
| 1299 | (define-public vxl
|
| 1300 | (package
|
| 1301 | (name "vxl")
|
| 1302 | (version "3.5.0")
|
| 1303 | (source
|
| 1304 | (origin
|
| 1305 | (method git-fetch)
|
| 1306 | (uri (git-reference
|
| 1307 | (url "https://github.com/vxl/vxl")
|
| 1308 | (commit (string-append "v" version))))
|
| 1309 | (file-name (git-file-name name version))
|
| 1310 | (sha256
|
| 1311 | (base32 "0iqq4lm51l5gvkax6r79ypifqmgir3p3vman9gsc2085d2agjvbs"))
|
| 1312 | (modules '((guix build utils)))
|
| 1313 | |
| 1314 | |
| 1315 | (snippet
|
| 1316 | '(begin
|
| 1317 | (for-each delete-file-recursively
|
| 1318 | '("v3p/bzlib/"
|
| 1319 | "v3p/geotiff/"
|
| 1320 | "v3p/jpeg/"
|
| 1321 | "v3p/png/"
|
| 1322 | "v3p/tiff/"
|
| 1323 | "v3p/zlib/"))
|
| 1324 | (substitute* "v3p/CMakeLists.txt"
|
| 1325 | (("add_subdirectory\\((tiff|png|jpeg|zlib|bzlib|geotiff)\\)")
|
| 1326 | ""))
|
| 1327 | #t))))
|
| 1328 | (build-system cmake-build-system)
|
| 1329 | (arguments
|
| 1330 | |
| 1331 | (list #:test-exclude "vul_vul_test_driver"))
|
| 1332 | (inputs
|
| 1333 | (list libgeotiff libtiff libjpeg-turbo libpng zlib))
|
| 1334 | (home-page "https://github.com/vxl/vxl/")
|
| 1335 | (synopsis "Collection of C++ libraries for computer vision")
|
| 1336 | (description "VXL (the Vision-something-Libraries) is a collection of C++
|
| 1337 | libraries designed for computer vision research and implementation.")
|
| 1338 | (license license:bsd-3)))
|
| 1339 |
|
| 1340 | (define-public vxl-1
|
| 1341 | (package (inherit vxl)
|
| 1342 | (name "vxl")
|
| 1343 | (version "1.18.0")
|
| 1344 | (source
|
| 1345 | (origin
|
| 1346 | (method git-fetch)
|
| 1347 | (uri (git-reference
|
| 1348 | (url "https://github.com/vxl/vxl")
|
| 1349 | (commit (string-append "v" version))))
|
| 1350 | (file-name (git-file-name name version))
|
| 1351 | (sha256
|
| 1352 | (base32 "1g4mr2cc58jwm0vasscbd4y5380wj3ahkvq121z4gs83fhavvxgz"))
|
| 1353 | (modules '((guix build utils)))
|
| 1354 | (snippet
|
| 1355 | '(begin
|
| 1356 | (for-each delete-file-recursively
|
| 1357 | '("v3p/bzlib/"
|
| 1358 | "v3p/geotiff/"
|
| 1359 | "v3p/png/"
|
| 1360 | "v3p/tiff/"
|
| 1361 | "v3p/zlib/"))
|
| 1362 | (substitute* "v3p/CMakeLists.txt"
|
| 1363 | (("add_subdirectory\\((tiff|png|jpeg|zlib|bzlib|geotiff)\\)")
|
| 1364 | ""))))))
|
| 1365 | (arguments
|
| 1366 | (substitute-keyword-arguments arguments
|
| 1367 | ((#:configure-flags flags)
|
| 1368 | #~(cons* |
| 1369 | "-DVNL_CONFIG_LEGACY_METHODS=ON"
|
| 1370 | "-DCMAKE_CXX_STANDARD=14"
|
| 1371 | #$flags))))))
|
| 1372 |
|
| 1373 | (define-public insight-toolkit
|
| 1374 | |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | (let* ((module-mci-commit "821bf9b3ef8eaaab10391ed060dc9ca5e4d37b39")
|
| 1382 | (module-mci-file (git-file-name "ITKMorphologicalContourInterpolation"
|
| 1383 | module-mci-commit))
|
| 1384 | (module-sitkf-commit "bb896868fc6480835495d0da4356d5db009592a6")
|
| 1385 | (module-sitkf-file (git-file-name "ITKSimpleITKFilters"
|
| 1386 | module-sitkf-commit))
|
| 1387 | (module-gli-commit "ebf2436469ccf82c08fab54b7446f699ad0eae01")
|
| 1388 | (module-gli-file (git-file-name "ITKGenericLabelInterpolator"
|
| 1389 | module-gli-commit))
|
| 1390 | (module-ad-commit "853934c352f83cb1e8f87e3051e1b8e75dbb41fe")
|
| 1391 | (module-ad-file (git-file-name "ITKAdaptiveDenoising"
|
| 1392 | module-ad-commit)))
|
| 1393 | (package
|
| 1394 | (name "insight-toolkit")
|
| 1395 | (version "5.4.7")
|
| 1396 | (source
|
| 1397 | (origin
|
| 1398 | (method git-fetch)
|
| 1399 | (uri (git-reference
|
| 1400 | (url "https://github.com/InsightSoftwareConsortium/ITK")
|
| 1401 | (commit (string-append "v" version))))
|
| 1402 | (file-name (git-file-name name version))
|
| 1403 | (sha256
|
| 1404 | (base32 "1didpkrfg3ah738x4fby8c47cwmr1svw8a6bzkn87krj753d38lm"))
|
| 1405 | |
| 1406 | |
| 1407 | |
| 1408 | (patches (search-patches "insight-toolkit-fix-build.patch"))))
|
| 1409 | (build-system cmake-build-system)
|
| 1410 | (outputs '("out" "python"))
|
| 1411 | (arguments
|
| 1412 | (list
|
| 1413 | #:imported-modules (append %cmake-build-system-modules
|
| 1414 | %pyproject-build-system-modules)
|
| 1415 | #:modules '(((guix build pyproject-build-system) #:prefix py:)
|
| 1416 | (guix build cmake-build-system)
|
| 1417 | (guix build utils))
|
| 1418 | #:configure-flags
|
| 1419 | #~(list "-DITK_USE_GPU=ON"
|
| 1420 | "-DITK_USE_SYSTEM_LIBRARIES=ON"
|
| 1421 | "-DITK_USE_SYSTEM_CASTXML=ON"
|
| 1422 | "-DITK_USE_SYSTEM_SWIG=ON"
|
| 1423 | (string-append "-DHDF5_DIR="
|
| 1424 | #$(this-package-input "hdf5") "/lib/cmake")
|
| 1425 | "-DBUILD_SHARED_LIBS=ON"
|
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
| 1431 | "-DITK_WRAPPING=ON"
|
| 1432 | "-DITK_WRAP_PYTHON=ON"
|
| 1433 | "-DITK_DYNAMIC_LOADING=ON"
|
| 1434 | (let* ((python-version
|
| 1435 | #$(version-major+minor
|
| 1436 | (package-version
|
| 1437 | (this-package-input "python"))))
|
| 1438 | (python-lib-path (string-append #$output:python
|
| 1439 | "/lib/python"
|
| 1440 | python-version
|
| 1441 | "/site-packages")))
|
| 1442 | (string-append "-DPY_SITE_PACKAGES_PATH="
|
| 1443 | python-lib-path))
|
| 1444 | |
| 1445 | "-DITK_USE_PYTHON_LIMITED_API=OFF"
|
| 1446 | "-DModule_MorphologicalContourInterpolation=ON"
|
| 1447 | "-DModule_SimpleITKFilters=ON"
|
| 1448 | "-DModule_GenericLabelInterpolator=ON"
|
| 1449 | "-DModule_AdaptiveDenoising:BOOL=ON"
|
| 1450 | "-DModule_ITKReview:BOOL=ON"
|
| 1451 | "-DCMAKE_CXX_STANDARD=17"
|
| 1452 | "-DBUILD_TESTING=OFF")
|
| 1453 |
|
| 1454 | #:phases
|
| 1455 | #~(modify-phases %standard-phases
|
| 1456 | (add-after 'unpack 'do-not-tune
|
| 1457 | (lambda _
|
| 1458 | (substitute* "CMake/ITKSetStandardCompilerFlags.cmake"
|
| 1459 | (("-mtune=native")
|
| 1460 | ""))))
|
| 1461 | (add-after 'unpack 'exclude-gtest-target
|
| 1462 | (lambda _
|
| 1463 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | (substitute* "Modules/ThirdParty/GoogleTest/itk-module.cmake"
|
| 1473 | (("DEPENDS")
|
| 1474 | "DEPENDS\n EXCLUDE_FROM_DEFAULT"))))
|
| 1475 | (add-after 'unpack 'prepare-remote-modules
|
| 1476 | (lambda _
|
| 1477 | |
| 1478 | |
| 1479 | (symlink #$(this-package-native-input module-mci-file)
|
| 1480 | "Modules/Remote/MorphologicalContourInterpolation")
|
| 1481 | (delete-file
|
| 1482 | (string-append
|
| 1483 | "Modules/Remote/"
|
| 1484 | "MorphologicalContourInterpolation.remote.cmake"))
|
| 1485 | |
| 1486 | |
| 1487 | (symlink #$(this-package-native-input module-sitkf-file)
|
| 1488 | "Modules/Remote/SimpleITKFilters")
|
| 1489 | (delete-file "Modules/Remote/SimpleITKFilters.remote.cmake")
|
| 1490 | (symlink #$(this-package-native-input module-gli-file)
|
| 1491 | "Modules/Remote/GenericLabelInterpolator")
|
| 1492 | (delete-file
|
| 1493 | "Modules/Remote/GenericLabelInterpolator.remote.cmake")
|
| 1494 | (symlink #$(this-package-native-input module-ad-file)
|
| 1495 | "Modules/Remote/AdaptiveDenoising")
|
| 1496 | (delete-file
|
| 1497 | "Modules/Remote/AdaptiveDenoising.remote.cmake")))
|
| 1498 | (delete 'check) |
| 1499 | (add-after 'install 'python-sanity-check
|
| 1500 | (lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
| 1501 | (when tests?
|
| 1502 | (py:add-installed-pythonpath inputs outputs)
|
| 1503 | (invoke "python3" "-c" "import itk")))))))
|
| 1504 | (inputs (list eigen
|
| 1505 | expat
|
| 1506 | fftw
|
| 1507 | fftwf
|
| 1508 | hdf5
|
| 1509 | libjpeg-turbo
|
| 1510 | libpng
|
| 1511 | libtiff
|
| 1512 | opencl-headers
|
| 1513 | opencl-icd-loader
|
| 1514 | perl
|
| 1515 | python
|
| 1516 | onetbb
|
| 1517 | vxl-1
|
| 1518 | zlib-ng-compat))
|
| 1519 | (native-inputs
|
| 1520 | (list castxml
|
| 1521 | git-minimal/pinned
|
| 1522 | pkg-config
|
| 1523 | python-numpy |
| 1524 | swig-4.4
|
| 1525 | which
|
| 1526 | (origin
|
| 1527 | (method git-fetch)
|
| 1528 | (uri
|
| 1529 | (git-reference
|
| 1530 | (url (string-append
|
| 1531 | "https://github.com/KitwareMedical/"
|
| 1532 | "ITKMorphologicalContourInterpolation"))
|
| 1533 | (commit module-mci-commit)))
|
| 1534 | (file-name module-mci-file)
|
| 1535 | (sha256
|
| 1536 | (base32
|
| 1537 | "00myhgvlk3n062i8bnknz1d10zkv3jlvs7f4jnk24727gd4v2n4i")))
|
| 1538 | (origin
|
| 1539 | (method git-fetch)
|
| 1540 | (uri (git-reference
|
| 1541 | (url (string-append
|
| 1542 | "https://github.com/InsightSoftwareConsortium/"
|
| 1543 | "ITKSimpleITKFilters"))
|
| 1544 | (commit module-sitkf-commit)))
|
| 1545 | (file-name module-sitkf-file)
|
| 1546 | (sha256
|
| 1547 | (base32
|
| 1548 | "13nys94wl4k77f89i8y1dm3y4pmgmw3rrc0la1rzl0vi9h1qixii")))
|
| 1549 | (origin
|
| 1550 | (method git-fetch)
|
| 1551 | (uri (git-reference
|
| 1552 | (url (string-append
|
| 1553 | "https://github.com/InsightSoftwareConsortium/"
|
| 1554 | "ITKGenericLabelInterpolator"))
|
| 1555 | (commit module-gli-commit)))
|
| 1556 | (file-name module-gli-file)
|
| 1557 | (sha256
|
| 1558 | (base32
|
| 1559 | "1khakqh6pzdg6csli8jypzrhcdr9xmhnzgwz265krv8r5mbnndrg")))
|
| 1560 | (origin
|
| 1561 | (method git-fetch)
|
| 1562 | (uri (git-reference
|
| 1563 | (url "https://github.com/ntustison/ITKAdaptiveDenoising")
|
| 1564 | (commit module-ad-commit)))
|
| 1565 | (file-name module-ad-file)
|
| 1566 | (sha256
|
| 1567 | (base32
|
| 1568 | "0aqvhb4byg0shgbrwmb41nq2h8sbg45xn0gsdy94iiq0v72bw307")))))
|
| 1569 |
|
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | (properties '((tunable? . #t)))
|
| 1574 |
|
| 1575 | (home-page "https://github.com/InsightSoftwareConsortium/ITK/")
|
| 1576 | (synopsis "Scientific image processing, segmentation and registration")
|
| 1577 | (description
|
| 1578 | "The Insight Toolkit (ITK) is a toolkit for N-dimensional
|
| 1579 | scientific image processing, segmentation, and registration. Segmentation is
|
| 1580 | the process of identifying and classifying data found in a digitally sampled
|
| 1581 | representation. Typically the sampled representation is an image acquired
|
| 1582 | from such medical instrumentation as CT or MRI scanners. Registration is the
|
| 1583 | task of aligning or developing correspondences between data. For example, in
|
| 1584 | the medical environment, a CT scan may be aligned with a MRI scan in order to
|
| 1585 | combine the information contained in both.")
|
| 1586 | (license license:asl2.0))))
|
| 1587 |
|
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | (define-public insight-toolkit-legacy
|
| 1593 | (hidden-package
|
| 1594 | (package/inherit insight-toolkit
|
| 1595 | |
| 1596 | |
| 1597 | (name "insight-toolkit-legacy")
|
| 1598 | (arguments
|
| 1599 | (substitute-keyword-arguments (package-arguments insight-toolkit)
|
| 1600 | ((#:configure-flags cf '())
|
| 1601 | #~(filter (lambda (flag)
|
| 1602 | (not (or
|
| 1603 | |
| 1604 | |
| 1605 | (string=? "-DITK_WRAPPING=ON" flag)
|
| 1606 | (string=? "-DITK_WRAP_PYTHON=ON" flag)
|
| 1607 | |
| 1608 | (string-prefix? "-DPY_SITE_PACKAGES_PATH=" flag)
|
| 1609 | (string-prefix? "-DITK_USE_PYTHON_LIMITED_API=" flag)
|
| 1610 | (string-prefix? "-DITK_USE_SYSTEM_CASTXML=" flag)
|
| 1611 | (string-prefix? "-DITK_USE_SYSTEM_SWIG=" flag))))
|
| 1612 | #$cf))
|
| 1613 | ((#:phases phases #~%standard-phases)
|
| 1614 | #~(modify-phases #$phases
|
| 1615 | (delete 'python-sanity-check)))))
|
| 1616 | (inputs (modify-inputs inputs
|
| 1617 | (delete "python")))
|
| 1618 | (native-inputs (modify-inputs native-inputs
|
| 1619 | (delete "castxml")
|
| 1620 | (delete "python-numpy")
|
| 1621 | (delete "swig"))))))
|
| 1622 |
|
| 1623 | (define-public itk-snap
|
| 1624 | |
| 1625 | (let ((commit "20f631865372dc7d1f49a1e930d83131102f7a20")
|
| 1626 | (revision "0"))
|
| 1627 | (package
|
| 1628 | (name "itk-snap")
|
| 1629 | (version (git-version "4.4.0" revision commit))
|
| 1630 | (source
|
| 1631 | (origin
|
| 1632 | (method git-fetch)
|
| 1633 | (uri (git-reference
|
| 1634 | (url "https://github.com/pyushkevich/itksnap")
|
| 1635 | (commit commit)))
|
| 1636 | (file-name (git-file-name name version))
|
| 1637 | (sha256
|
| 1638 | (base32 "0zfaiz5lc1fy0n48bwbjgw3yschmscmq9bh0ym05cpaf4sbr4p7l"))))
|
| 1639 | (build-system cmake-build-system)
|
| 1640 | (arguments
|
| 1641 | (list
|
| 1642 | #:configure-flags
|
| 1643 | #~(list "-DSNAP_VERSION_GIT_BRANCH=release")
|
| 1644 | #:phases
|
| 1645 | #~(modify-phases %standard-phases
|
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | (add-after 'unpack 'do-not-copy-dependencies
|
| 1650 | (lambda _
|
| 1651 | (substitute* "CMakeLists.txt"
|
| 1652 | (("install\\(SCRIPT \\$\\{deploy_script\\}\\)") ""))))
|
| 1653 | (add-after 'unpack 'disable-gui-tests
|
| 1654 | (lambda _
|
| 1655 | |
| 1656 | (substitute* "CMakeLists.txt"
|
| 1657 | ((" (Workspace|DiffSpace|ProbeIntensity|RegionCompetition\
|
| 1658 | |RandomForest|RandomForestBailOut|NaNs|4DContinuousRenderingD|EdgeAttraction\
|
| 1659 | |EchoCartesianDicomLoading|LabelSmoothing|PreferencesDialog|MeshImport\
|
| 1660 | |MeshWorkspace|SegmentationMesh|VolumeRendering|Reloading|4DToMC|MCTo4D\
|
| 1661 | |DeformationGrid)")
|
| 1662 | ""))))
|
| 1663 | (add-after 'unpack 'prepare-submodules
|
| 1664 | (lambda _
|
| 1665 | |
| 1666 | |
| 1667 | (copy-recursively #$(this-package-native-input "c3d-checkout")
|
| 1668 | "Submodules/c3d")
|
| 1669 | (rmdir "Submodules/digestible")
|
| 1670 | (symlink #$(this-package-native-input "digestible-checkout")
|
| 1671 | "Submodules/digestible")
|
| 1672 | (copy-recursively #$(this-package-native-input "greedy-checkout")
|
| 1673 | "Submodules/greedy")))
|
| 1674 | (add-after 'unpack 'remove-bundled-jsoncpp
|
| 1675 | (lambda _
|
| 1676 | (substitute* "CMakeLists.txt"
|
| 1677 | ((" Common/JSon/jsoncpp\\.cpp") ""))))
|
| 1678 | (add-after 'prepare-submodules 'make-reproducible
|
| 1679 | (lambda _
|
| 1680 | (substitute* "CMakeLists.txt"
|
| 1681 | (("TODAY\\(SNAP_VERSION_COMPILE_DATE\\)")
|
| 1682 | "SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")"))
|
| 1683 | (substitute* "Common/SNAPCommon.cxx.in"
|
| 1684 | (("@CMAKE_HOST_SYSTEM@ @CMAKE_HOST_SYSTEM_PROCESSOR@")
|
| 1685 | "(removed for reproducibility)"))
|
| 1686 | (substitute* "Submodules/c3d/ConvertImageVersion.cxx.in"
|
| 1687 | (("@CONVERT3D_VERSION_COMPILE_DATE@")
|
| 1688 | "(removed for reproducibility)"))
|
| 1689 | (substitute* "Submodules/greedy/src/GreedyVersion.cxx.in"
|
| 1690 | (("@GREEDY_VERSION_COMPILE_DATE@")
|
| 1691 | "(removed for reproducibility)"))))
|
| 1692 | (add-before 'check 'prepare-tests
|
| 1693 | (lambda _
|
| 1694 | |
| 1695 | (setenv "HOME" "/tmp")))
|
| 1696 | (add-after 'install 'wrap-executable
|
| 1697 | (lambda _
|
| 1698 | (wrap-program (string-append #$output "/bin/itksnap")
|
| 1699 | (list
|
| 1700 | "QT_PLUGIN_PATH"
|
| 1701 | 'suffix
|
| 1702 | (list (string-append #$(this-package-input "qtbase")
|
| 1703 | "/lib/qt6/plugins")
|
| 1704 | (string-append #$(this-package-input "qtdeclarative")
|
| 1705 | "/lib/qt6/plugins")
|
| 1706 | (string-append #$(this-package-input "qtwayland")
|
| 1707 | "/lib/qt6/plugins"))))
|
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | (substitute* (string-append #$output "/bin/itksnap")
|
| 1714 | (("exec -a \"\\$\\{0##\\*/\\}\" ")
|
| 1715 | "exec ")))))))
|
| 1716 | (inputs
|
| 1717 | (list curl
|
| 1718 | freetype
|
| 1719 | glew
|
| 1720 | glu
|
| 1721 | insight-toolkit-legacy
|
| 1722 | jsoncpp
|
| 1723 | libssh
|
| 1724 | mesa-opencl
|
| 1725 | qtbase
|
| 1726 | qtdeclarative
|
| 1727 | qtwayland
|
| 1728 | vtk-9.5))
|
| 1729 | (native-inputs
|
| 1730 | (list
|
| 1731 | doxygen
|
| 1732 | qttools
|
| 1733 | |
| 1734 | (origin
|
| 1735 | (method git-fetch)
|
| 1736 | (uri (git-reference
|
| 1737 | (url "https://github.com/pyushkevich/c3d")
|
| 1738 | (commit "d4d963629d7dfdca4b0607907f0e91827c22ea2a")))
|
| 1739 | (file-name "c3d-checkout")
|
| 1740 | (sha256
|
| 1741 | (base32 "15yh2rdynql99yy5hanq5rha1pry9c3ryb7bfy47vvyqksk0znvs")))
|
| 1742 | (origin
|
| 1743 | (method git-fetch)
|
| 1744 | (uri (git-reference
|
| 1745 | (url "https://github.com/pyushkevich/digestible")
|
| 1746 | (commit "1b66709e99c43d280bb472e1a0e36185ef2ea412")))
|
| 1747 | (file-name "digestible-checkout")
|
| 1748 | (sha256
|
| 1749 | (base32 "1m1b954prq6l3byfdgxw2y17xsg81agd516g5n6ps60dqnxw8hqs")))
|
| 1750 | (origin
|
| 1751 | (method git-fetch)
|
| 1752 | (uri (git-reference
|
| 1753 | (url "https://github.com/pyushkevich/greedy")
|
| 1754 | (commit "2d5dfa1891ac726524495d4ca8a3461be86c12f5")))
|
| 1755 | (file-name "greedy-checkout")
|
| 1756 | (sha256
|
| 1757 | (base32 "13rz423p7p95ca94c5njr8jxbcic1hp8iqap613zlxmvl4n9vx15")))))
|
| 1758 | (home-page "https://sourceforge.net/p/itk-snap/")
|
| 1759 | (synopsis "Medical image segmentation")
|
| 1760 | (description "ITK-SNAP is a tool for segmenting anatomical structures in
|
| 1761 | medical images. It provides an automatic active contour segmentation
|
| 1762 | pipeline, along with supporting a manual segmentation toolbox. ITK-SNAP has a
|
| 1763 | full-featured UI aimed at clinical researchers.")
|
| 1764 | |
| 1765 | (license license:gpl3+))))
|
| 1766 |
|
| 1767 | (define-public elastix
|
| 1768 | (package
|
| 1769 | (name "elastix")
|
| 1770 | (version "5.3.0")
|
| 1771 | (source
|
| 1772 | (origin
|
| 1773 | (method git-fetch)
|
| 1774 | (uri (git-reference
|
| 1775 | (url "https://github.com/SuperElastix/elastix")
|
| 1776 | (commit version)))
|
| 1777 | (file-name (git-file-name name version))
|
| 1778 | (sha256
|
| 1779 | (base32 "0sgw4cz4x6f78n6iqn87ll6wad32y67lmzvqfdfw1pzjkxbwzwyr"))
|
| 1780 | (patches
|
| 1781 | (search-patches "elastix-1404.patch"))))
|
| 1782 | (properties '((tunable? . #t)))
|
| 1783 | (build-system cmake-build-system)
|
| 1784 | (arguments
|
| 1785 | (list
|
| 1786 | #:configure-flags
|
| 1787 | #~(list "-DELASTIX_USE_EIGEN=ON"
|
| 1788 | "-DELASTIX_ENABLE_PACKAGER:BOOL=OFF"
|
| 1789 | "-DELASTIX_BUILD_EXECUTABLE:BOOL=ON"
|
| 1790 | "-DCMAKE_CXX_FLAGS=-fPIC"
|
| 1791 | "-DCMAKE_CXX_STANDARD=17"
|
| 1792 | "-DBUILD_TESTING:BOOL=ON")
|
| 1793 | |
| 1794 | #:test-exclude (string-join
|
| 1795 | (list "elastix_run_example_COMPARE_IM"
|
| 1796 | (string-append "elastix_run_3DCT_lung.MI.bspline."
|
| 1797 | "ASGD.001_COMPARE_TP"))
|
| 1798 | "|")))
|
| 1799 | (inputs (list charls
|
| 1800 | dcmtk
|
| 1801 | eigen
|
| 1802 | fftw
|
| 1803 | insight-toolkit
|
| 1804 | libpng
|
| 1805 | libtiff
|
| 1806 | zlib))
|
| 1807 | (home-page "https://elastix.dev/")
|
| 1808 | (synopsis "Image registration toolbox")
|
| 1809 | (description
|
| 1810 | "Elastix is a toolbox for rigid and nonrigid registration of images. The
|
| 1811 | software consists of a collection of algorithms that are commonly used to
|
| 1812 | perform (medical) image registration: the task of finding a spatial
|
| 1813 | transformation, mapping one image (the fixed image) to another (the moving
|
| 1814 | image), by optimizing relevant image similarity metrics.")
|
| 1815 | (license license:asl2.0)))
|
| 1816 |
|
| 1817 | (define-public metapixel
|
| 1818 | |
| 1819 | (let ((commit "98ee9daa093b6c334941242e63f90b1c2876eb4f"))
|
| 1820 | (package
|
| 1821 | (name "metapixel")
|
| 1822 | (version (git-version "1.0.2" "1" commit))
|
| 1823 | (source
|
| 1824 | (origin
|
| 1825 | (method git-fetch)
|
| 1826 | (uri (git-reference
|
| 1827 | (url "https://github.com/schani/metapixel")
|
| 1828 | (commit commit)
|
| 1829 | |
| 1830 | (recursive? #t)))
|
| 1831 | (file-name (git-file-name name version))
|
| 1832 | (sha256
|
| 1833 | (base32 "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"))))
|
| 1834 | (build-system gnu-build-system)
|
| 1835 | (arguments
|
| 1836 | (list
|
| 1837 | #:tests? #f |
| 1838 | #:make-flags
|
| 1839 | #~(list
|
| 1840 | (string-append "PREFIX=" #$output)
|
| 1841 | (format #f "MANPAGE_XSL=~a/xml/xsl/~a-~a/manpages/docbook.xsl"
|
| 1842 | #$(this-package-native-input "docbook-xsl")
|
| 1843 | #$(package-name
|
| 1844 | (this-package-native-input "docbook-xsl"))
|
| 1845 | #$(package-version
|
| 1846 | (this-package-native-input "docbook-xsl"))))
|
| 1847 | #:phases
|
| 1848 | #~(modify-phases %standard-phases
|
| 1849 | (delete 'configure)
|
| 1850 | (add-before 'install 'fix-directory-creation
|
| 1851 | (lambda _
|
| 1852 | (mkdir-p (string-append #$output "/share/man/man1")))))))
|
| 1853 | (inputs
|
| 1854 | (list giflib libjpeg-turbo libpng
|
| 1855 | perl))
|
| 1856 | (native-inputs
|
| 1857 | (list docbook-xml-4.2 docbook-xsl
|
| 1858 | libxslt pkg-config))
|
| 1859 | (home-page "https://www.complang.tuwien.ac.at/schani/metapixel/")
|
| 1860 | (synopsis "Photomosaics generator")
|
| 1861 | (description "Metapixel is a program for generating photomosaics. It can
|
| 1862 | generate classical photomosaics, in which the source image is viewed as a
|
| 1863 | matrix of equally sized rectangles for each of which a matching image is
|
| 1864 | substituted, as well as collage-style photomosaics, in which rectangular parts
|
| 1865 | of the source image at arbitrary positions (i.e. not aligned to a matrix) are
|
| 1866 | substituted by matching images.")
|
| 1867 | (license license:gpl2))))
|
| 1868 |
|
| 1869 | (define-public scantailor-advanced
|
| 1870 | (let ((commit "3d1e74e6ace413733511086934a66f4e3f7a6027"))
|
| 1871 | (package
|
| 1872 | (name "scantailor-advanced")
|
| 1873 | (version (string-append "1.0.16-" (string-take commit 7)))
|
| 1874 | (source
|
| 1875 | (origin
|
| 1876 | (method git-fetch)
|
| 1877 | (uri (git-reference
|
| 1878 | (url "https://github.com/4lex4/scantailor-advanced")
|
| 1879 | (commit commit)))
|
| 1880 | (file-name (git-file-name name version))
|
| 1881 | (sha256
|
| 1882 | (base32
|
| 1883 | "0kixwjb2x457dq7927hkh34c803p7yh1pmn6n61rk9shqrcg492h"))))
|
| 1884 | (build-system qt-build-system)
|
| 1885 | (arguments
|
| 1886 | (list
|
| 1887 | #:phases
|
| 1888 | #~(modify-phases %standard-phases
|
| 1889 | |
| 1890 | (add-after 'unpack 'disable-failing-tests
|
| 1891 | (lambda _
|
| 1892 | (setenv "ARGS" "--exclude-regex \"imageproc_.*\""))))))
|
| 1893 | (native-inputs
|
| 1894 | (list qttools-5))
|
| 1895 | (inputs
|
| 1896 | (list boost
|
| 1897 | libjpeg-turbo
|
| 1898 | libpng
|
| 1899 | libtiff
|
| 1900 | qtbase-5
|
| 1901 | qtsvg-5
|
| 1902 | qtwayland-5
|
| 1903 | zlib))
|
| 1904 | (home-page "https://github.com/4lex4/scantailor-advanced")
|
| 1905 | (synopsis "Clean up scanned pages")
|
| 1906 | (description "Scan Tailor is an interactive post-processing tool for
|
| 1907 | scanned pages. It performs operations such as page splitting, deskewing,
|
| 1908 | adding/removing borders, and others. You give it raw scans, and you get pages
|
| 1909 | ready to be printed or assembled into a PDF or DJVU file. Scanning, optical
|
| 1910 | character recognition, and assembling multi-page documents are out of scope of
|
| 1911 | this project.
|
| 1912 |
|
| 1913 | Scan Tailer Advanced is a fork of Scan Tailer that merges Scan Tailor Featured
|
| 1914 | and Scan Tailor Enhanced versions as well as including many more bug fixes.")
|
| 1915 | (license license:gpl3+))))
|
| 1916 |
|
| 1917 | (define-public simpleitk
|
| 1918 | (package
|
| 1919 | (name "simpleitk")
|
| 1920 | (version "2.5.4")
|
| 1921 | (source
|
| 1922 | (origin
|
| 1923 | (method git-fetch)
|
| 1924 | (uri (git-reference
|
| 1925 | (url "https://github.com/SimpleITK/SimpleITK")
|
| 1926 | (commit (string-append "v" version))))
|
| 1927 | (file-name (git-file-name name version))
|
| 1928 | (sha256
|
| 1929 | (base32 "1bzj5naqbgv2b31iqgz7qqk9rixsvjqycjz6l7w3gm7v1aj14jpb"))
|
| 1930 | (patches
|
| 1931 | (search-patches "simpleitk-r-4.6.0.patch"))))
|
| 1932 | (build-system cmake-build-system)
|
| 1933 | (outputs '("out" "python" "r"))
|
| 1934 | (arguments
|
| 1935 | (list
|
| 1936 | #:configure-flags
|
| 1937 | #~(list "-DBUILD_SHARED_LIBS=ON"
|
| 1938 | "-DWRAP_LUA=OFF"
|
| 1939 | "-DWRAP_PYTHON=ON"
|
| 1940 | "-DWRAP_R=ON"
|
| 1941 | "-DSimpleITK_USE_ELASTIX=ON"
|
| 1942 | "-DSimpleITK_PYTHON_USE_VIRTUALENV=OFF")
|
| 1943 | #:phases
|
| 1944 | #~(modify-phases %standard-phases
|
| 1945 | (add-after 'unpack 'early-GTest-discovery
|
| 1946 | (lambda _
|
| 1947 | |
| 1948 | (substitute* "Testing/Unit/CMakeLists.txt"
|
| 1949 | (("add_subdirectory\\(TestBase\\)" anchor)
|
| 1950 | (string-append "find_package(GTest REQUIRED)\n" anchor)))))
|
| 1951 | (add-after 'unpack 'extract-test-data
|
| 1952 | (lambda _
|
| 1953 | (invoke "tar" "xvf"
|
| 1954 | #$(this-package-native-input
|
| 1955 | (string-append "SimpleITKData-" version ".tar.gz"))
|
| 1956 | "--strip-components=1")))
|
| 1957 | (add-after 'unpack 'fix-runpath
|
| 1958 | (lambda _
|
| 1959 | |
| 1960 | |
| 1961 | (define (cmake-snippet start)
|
| 1962 | (string-append
|
| 1963 | start
|
| 1964 | "set_target_properties(${SWIG_MODULE_SimpleITK_TARGET_NAME} "
|
| 1965 | "PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE "
|
| 1966 | "INSTALL_RPATH \"" #$output "/lib\")\n"))
|
| 1967 | (substitute* "Wrapping/Python/CMakeLists.txt"
|
| 1968 | (("^set\\(SWIG_MODULE_SimpleITKPython.*" anchor)
|
| 1969 | (cmake-snippet anchor)))
|
| 1970 | (substitute* "Wrapping/R/CMakeLists.txt"
|
| 1971 | (("^set\\(SWIG_MODULE_SimpleITKR.*" anchor)
|
| 1972 | (cmake-snippet anchor)))))
|
| 1973 | (add-after 'unpack 'patch-cmake-config-itk-path
|
| 1974 | (lambda _
|
| 1975 | |
| 1976 | |
| 1977 | #$(let*
|
| 1978 | ((itk (this-package-input "insight-toolkit"))
|
| 1979 | (itk-version (package-version itk))
|
| 1980 | (itk-version-major+minor
|
| 1981 | (version-major+minor itk-version)))
|
| 1982 | #~(substitute* "SimpleITKConfig.cmake.in"
|
| 1983 | (((string-append
|
| 1984 | "find_package\\(ITK \"@ITK_VERSION@\" "
|
| 1985 | "EXACT REQUIRED\\)"))
|
| 1986 | (string-append
|
| 1987 | "find_package(ITK \"" #$itk-version
|
| 1988 | "\" EXACT REQUIRED PATHS " #$itk
|
| 1989 | "/lib/cmake/ITK-"
|
| 1990 | #$itk-version-major+minor ")"))))))
|
| 1991 | |
| 1992 | (add-after 'unpack 'skip-one-elastix-test
|
| 1993 | (lambda _
|
| 1994 | (substitute* "Testing/Unit/sitkElastixImageFilterTests.cxx"
|
| 1995 | (("TEST\\(ElastixImageFilter, DefaultParameterMaps\\)")
|
| 1996 | "TEST(ElastixImageFilter, DISABLED_DefaultParameterMaps)"))))
|
| 1997 | (add-after 'install 'install-language-extension-modules
|
| 1998 | (lambda _
|
| 1999 | (with-directory-excursion "Wrapping/Python"
|
| 2000 | (invoke "python3" "setup.py" "bdist_wheel")
|
| 2001 | (apply invoke "pip" "--no-cache-dir" "--no-input" "install"
|
| 2002 | "--no-deps" "--prefix" #$output:python
|
| 2003 | (find-files "dist" "\\.whl$")))
|
| 2004 | (let ((r-package-path
|
| 2005 | (string-append #$output:r "/site-library/SimpleITK")))
|
| 2006 | (mkdir-p r-package-path)
|
| 2007 | (copy-recursively "Wrapping/R/R_libs/SimpleITK"
|
| 2008 | r-package-path))))
|
| 2009 | (delete 'check)
|
| 2010 | (add-after 'install 'check-after-install
|
| 2011 | |
| 2012 | |
| 2013 | (assoc-ref %standard-phases 'check)))))
|
| 2014 | (home-page "https://simpleitk.org")
|
| 2015 | (inputs (list elastix insight-toolkit python r-minimal))
|
| 2016 | (native-inputs
|
| 2017 | (list googletest
|
| 2018 | lua
|
| 2019 | nss-certs-for-test |
| 2020 | python-numpy |
| 2021 | python-pip
|
| 2022 | python-setuptools
|
| 2023 | swig-4.4
|
| 2024 | (origin
|
| 2025 | (method url-fetch)
|
| 2026 | (uri (string-append
|
| 2027 | "https://github.com/SimpleITK/SimpleITK/releases/download/v"
|
| 2028 | version "/SimpleITKData-" version ".tar.gz"))
|
| 2029 | (sha256
|
| 2030 | (base32
|
| 2031 | "0hryvi9fgqac00ng1bfhw3lm0al1dh0ka6jglba2q368nls428nx")))))
|
| 2032 | (synopsis "Simplified interface to @acronym{ITK, Insight Toolkit}")
|
| 2033 | (description
|
| 2034 | "SimpleITK is an image analysis toolkit built on top of @acronym{ITK,
|
| 2035 | Insight Toolkit}. It provides a simplified interface to most of the
|
| 2036 | image filters and the input/output and registration frameworks in
|
| 2037 | @acronym{ITK, Insight Toolkit}. It is written in C++ and provides
|
| 2038 | bindings for interpreted languages. This package includes the C++,
|
| 2039 | Python and R interfaces.")
|
| 2040 | (license license:asl2.0)))
|
| 2041 |
|
| 2042 | (define-public python-imgviz
|
| 2043 | (package
|
| 2044 | (name "python-imgviz")
|
| 2045 | (version "1.7.6")
|
| 2046 | (source
|
| 2047 | (origin
|
| 2048 | |
| 2049 | (method git-fetch)
|
| 2050 | (uri (git-reference
|
| 2051 | (url "https://github.com/wkentaro/imgviz")
|
| 2052 | (commit (string-append "v" version))))
|
| 2053 | (file-name (git-file-name name version))
|
| 2054 | (sha256
|
| 2055 | (base32 "0z7nwnvqh3hbbccf7v56398aiiwqs68kyrgc5vsmmh1cp4pwrgnb"))))
|
| 2056 | (build-system pyproject-build-system)
|
| 2057 | (native-inputs
|
| 2058 | (list python-pytest
|
| 2059 | python-hatchling
|
| 2060 | python-hatch-vcs
|
| 2061 | python-hatch-fancy-pypi-readme))
|
| 2062 | (propagated-inputs
|
| 2063 | (list python-matplotlib
|
| 2064 | python-numpy
|
| 2065 | python-pillow
|
| 2066 | python-pyyaml))
|
| 2067 | (home-page "http://github.com/wkentaro/imgviz")
|
| 2068 | (synopsis "Image Visualization Tools")
|
| 2069 | (description "Python library for object detection, semantic and instance
|
| 2070 | segmentation.")
|
| 2071 | (license license:expat)))
|
| 2072 |
|
| 2073 | (define-public python-pims
|
| 2074 | (package
|
| 2075 | (name "python-pims")
|
| 2076 | (version "0.7")
|
| 2077 | (source
|
| 2078 | (origin
|
| 2079 | (method url-fetch)
|
| 2080 | (uri (pypi-uri "pims" version))
|
| 2081 | (sha256
|
| 2082 | (base32 "0swlh8g4kf8p24g0ghkmwcj9y45rc59lmqx459nhhmhj6167m42m"))))
|
| 2083 | (build-system pyproject-build-system)
|
| 2084 | (arguments
|
| 2085 | (list
|
| 2086 | #:test-flags
|
| 2087 | |
| 2088 | |
| 2089 | '(list "--ignore=pims/tests/test_common.py"
|
| 2090 | "--ignore=pims/tests/test_imseq.py"
|
| 2091 | "--ignore=pims/tests/test_norpix.py")
|
| 2092 | #:phases
|
| 2093 | #~(modify-phases %standard-phases
|
| 2094 | (add-after 'unpack 'relax-requirements
|
| 2095 | (lambda _
|
| 2096 | (substitute* "setup.py"
|
| 2097 | (("'slicerator>=.*',")
|
| 2098 | "'slicerator',")))))))
|
| 2099 | (native-inputs
|
| 2100 | (list python-pytest python-setuptools))
|
| 2101 | (propagated-inputs
|
| 2102 | (list python-imageio python-numpy python-slicerator))
|
| 2103 | (home-page "https://github.com/soft-matter/pims")
|
| 2104 | (synopsis "Python Image Sequence")
|
| 2105 | (description "Scientific video can be packaged in various ways: familiar
|
| 2106 | video formats like @file{.AVI} and @file{.MOV}, folders full of numbered
|
| 2107 | images, or \"stacks\" of TIFF images. Each of these requires a separate
|
| 2108 | Python module. And, once loaded, they have different methods for accessing
|
| 2109 | individual images, looping through the images in bulk, accessing a specific
|
| 2110 | range, or dealing with multidimensional files. PIMS can do all of these using
|
| 2111 | a consistent interface, handling the differences between different inputs
|
| 2112 | invisibly.")
|
| 2113 | (license license:bsd-3)))
|
| 2114 |
|
| 2115 | (define-public python-spatial-image
|
| 2116 | (package
|
| 2117 | (name "python-spatial-image")
|
| 2118 | (version "1.0.0")
|
| 2119 | (source
|
| 2120 | (origin
|
| 2121 | (method url-fetch)
|
| 2122 | (uri (pypi-uri "spatial_image" version))
|
| 2123 | (sha256
|
| 2124 | (base32 "0blyjwgv6bqpg7r3f4dcs7x27ysfm8n9y0zk5j7dxj74lma3wdsm"))))
|
| 2125 | (build-system pyproject-build-system)
|
| 2126 | (propagated-inputs (list python-numpy python-pytest python-pytest-mypy
|
| 2127 | python-xarray python-xarray-dataclasses))
|
| 2128 | (native-inputs (list python-flit-core python-pytest))
|
| 2129 | (home-page "https://github.com/spatial-image/spatial-image")
|
| 2130 | (synopsis "Multi-dimensional spatial image data structure")
|
| 2131 | (description "This package implements a multi-dimensional spatial image
|
| 2132 | data structure for scientific Python.
|
| 2133 |
|
| 2134 | To facilitate:
|
| 2135 |
|
| 2136 | @itemize
|
| 2137 | @item Multi-scale processing and analysis
|
| 2138 | @item Registration
|
| 2139 | @item Resampling
|
| 2140 | @item Subregion parallel processing
|
| 2141 | @item Coupling with meshes, point sets, and annotations
|
| 2142 | @end itemize
|
| 2143 |
|
| 2144 | with scientific images, which are typically multi-dimensional with anisotropic
|
| 2145 | sampling, this package provides a spatial-image data structure. In addition
|
| 2146 | to an N-dimensional array of pixel values, spatial metadata defines the
|
| 2147 | location of the pixel sampling grid in space time. It also labels the array
|
| 2148 | dimensions. This metadata is easily utilized and carried through image
|
| 2149 | processing pipelines.")
|
| 2150 | (license license:expat)))
|
| 2151 |
|
| 2152 | (define-public labelme
|
| 2153 | (package
|
| 2154 | (name "labelme")
|
| 2155 | |
| 2156 | |
| 2157 | (version "5.2.1")
|
| 2158 | (source
|
| 2159 | (origin
|
| 2160 | |
| 2161 | (method git-fetch)
|
| 2162 | (uri (git-reference
|
| 2163 | (url "https://github.com/wkentaro/labelme")
|
| 2164 | (commit (string-append "v" version))))
|
| 2165 | (file-name (git-file-name name version))
|
| 2166 | (sha256
|
| 2167 | (base32 "1xpyad6rlkxyx51jaai4xhdy15k1gvm62xnkjn152hc1vj1c77sr"))))
|
| 2168 | (build-system pyproject-build-system)
|
| 2169 | (arguments
|
| 2170 | (list
|
| 2171 | #:test-flags
|
| 2172 | #~(list "-m" "not gpu"
|
| 2173 | |
| 2174 | "--ignore=tests/docs_tests/man_tests/test_labelme_1.py")
|
| 2175 | #:phases
|
| 2176 | #~(modify-phases %standard-phases
|
| 2177 | (add-before 'check 'start-xserver
|
| 2178 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2179 | (let ((xorg-server #$(this-package-native-input "xorg-server")))
|
| 2180 | |
| 2181 | (system (string-append xorg-server "/bin/Xvfb :99 -screen 0 "
|
| 2182 | "1920x1200x24 -ac +extension GLX +render "
|
| 2183 | "-noreset &"))
|
| 2184 | (setenv "DISPLAY" ":99.0")))))))
|
| 2185 | (native-inputs
|
| 2186 | (list python-pytest
|
| 2187 | python-pytest-qt
|
| 2188 | python-setuptools
|
| 2189 | xorg-server-for-tests))
|
| 2190 | (propagated-inputs
|
| 2191 | (list python-imgviz
|
| 2192 | python-matplotlib
|
| 2193 | python-natsort
|
| 2194 | python-numpy
|
| 2195 | python-pillow
|
| 2196 | python-pyqt
|
| 2197 | python-pyyaml
|
| 2198 | python-qtpy
|
| 2199 | python-termcolor))
|
| 2200 | (home-page "https://github.com/wkentaro/labelme")
|
| 2201 | (synopsis "Image Polygonal Annotation")
|
| 2202 | (description
|
| 2203 | "Image and video labeling tool supporting different shapes like polygons,
|
| 2204 | rectangles, circles, lines, points and VOC/COCO export.")
|
| 2205 | (license license:gpl3+)))
|
| 2206 |
|
| 2207 | (define-public charls
|
| 2208 | (package
|
| 2209 | (name "charls")
|
| 2210 | (version "2.4.2")
|
| 2211 | (source (origin
|
| 2212 | (method git-fetch)
|
| 2213 | (uri (git-reference
|
| 2214 | (url "https://github.com/team-charls/charls/")
|
| 2215 | (commit (string-append version))))
|
| 2216 | (file-name (git-file-name name version))
|
| 2217 | (sha256
|
| 2218 | (base32
|
| 2219 | "0vp6mjjm6hi2r1swwvbg86asvn604w58nam7yvqk1qr13aizjl71"))))
|
| 2220 | (build-system cmake-build-system)
|
| 2221 | (arguments
|
| 2222 | `(#:configure-flags '("-DCMAKE_BUILD_TYPE:STRING=Release"
|
| 2223 | "-DBUILD_SHARED_LIBS=On")))
|
| 2224 | (native-inputs (list git pkg-config))
|
| 2225 | (home-page "https://github.com/team-charls/charls")
|
| 2226 | (synopsis "Library for using JPEG-LS compliant images")
|
| 2227 | (description
|
| 2228 | "CharLS is a codec library that can be used to build applications that
|
| 2229 | can handle JPEG-LS compliant images. In the application you are writing you
|
| 2230 | can call the CharLS codec and pass it images (sometimes called raster bitmaps),
|
| 2231 | to have them encoded to JPEG-LS, or JPEG-LS streams, which CharLS will decode
|
| 2232 | to images.")
|
| 2233 | (license license:bsd-3)))
|
| 2234 |
|
| 2235 | (define-public libansilove
|
| 2236 | (package
|
| 2237 | (name "libansilove")
|
| 2238 | (version "1.4.1")
|
| 2239 | (source (origin
|
| 2240 | (method git-fetch)
|
| 2241 | (uri (git-reference
|
| 2242 | (url "https://github.com/ansilove/libansilove")
|
| 2243 | (commit (string-append version))))
|
| 2244 | (file-name (git-file-name name version))
|
| 2245 | (sha256
|
| 2246 | (base32
|
| 2247 | "169njlck4a2bmf1kmjas1w594hyda543ykdnwg7fwkviij39l9z6"))))
|
| 2248 | (build-system cmake-build-system)
|
| 2249 | (arguments
|
| 2250 | (list #:tests? #f)) |
| 2251 | (native-inputs
|
| 2252 | (list gd))
|
| 2253 | (home-page "https://www.ansilove.org/")
|
| 2254 | (synopsis "Library for converting ANSI, ASCII, and other formats to PNG")
|
| 2255 | (description
|
| 2256 | "libansilove is a library for converting artscene file types to PNG images,
|
| 2257 | including ANSI (.ANS) and many others. The library primarily serves to support
|
| 2258 | the ansilove tool.")
|
| 2259 | (license license:bsd-2)))
|
| 2260 |
|
| 2261 | (define-public ansilove
|
| 2262 | (package
|
| 2263 | (name "ansilove")
|
| 2264 | (version "4.2.0")
|
| 2265 | (source (origin
|
| 2266 | (method git-fetch)
|
| 2267 | (uri (git-reference
|
| 2268 | (url "https://github.com/ansilove/ansilove")
|
| 2269 | (commit (string-append version))))
|
| 2270 | (file-name (git-file-name name version))
|
| 2271 | (sha256
|
| 2272 | (base32
|
| 2273 | "1h9r759krjl8wi68yxs1d46qfrx6v89a8vmmv3aqym8vn9x430kh"))))
|
| 2274 | (build-system cmake-build-system)
|
| 2275 | (native-inputs
|
| 2276 | (list libansilove))
|
| 2277 | (home-page "https://www.ansilove.org/")
|
| 2278 | (synopsis "ANSI and ASCII art to PNG converter")
|
| 2279 | (description
|
| 2280 | "AnsiLove is an ANSI and ASCII art to PNG converter, allowing to convert
|
| 2281 | ANSI and artscene-related file formats into PNG images, supporting ANSI (.ANS),
|
| 2282 | PCBoard (.PCB), Binary (.BIN), Artworx (.ADF), iCE Draw (.IDF), Tundra (.TND)
|
| 2283 | and XBin (.XB) formats.")
|
| 2284 | (license license:bsd-2)))
|