| 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.13.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 | (ice-9 ftw)
|
| 605 | (srfi srfi-26))
|
| 606 | |
| 607 | (for-each delete-file (find-files "." "\\.jar$"))
|
| 608 | (define (delete-all-but directory . preserve)
|
| 609 | (with-directory-excursion directory
|
| 610 | (let* ((pred (negate (cut member <>
|
| 611 | (cons* "." ".." preserve))))
|
| 612 | (items (scandir "." pred)))
|
| 613 | (for-each (cut delete-file-recursively <>) items))))
|
| 614 | (delete-all-but "3rdparty"
|
| 615 | "fastcv" |
| 616 | "libspng"
|
| 617 | "libtim-vx"
|
| 618 | "orbbecsdk"
|
| 619 | "quirc"
|
| 620 | "zlib-ng")))
|
| 621 | (sha256
|
| 622 | (base32
|
| 623 | "15w4fqjqv5k1yw70jbjsnlgiky39mqpy05rvmm2fbyjrif4kbgkl"))))
|
| 624 | (build-system cmake-build-system)
|
| 625 | (arguments
|
| 626 | (list
|
| 627 | #:parallel-tests? #f
|
| 628 | #:configure-flags
|
| 629 | #~(list "-DWITH_ADE=OFF" |
| 630 | "-DWITH_IPP=OFF"
|
| 631 | "-DWITH_ITT=OFF"
|
| 632 | "-DWITH_CAROTENE=OFF" |
| 633 | "-DENABLE_PRECOMPILED_HEADERS=OFF"
|
| 634 | "-DOPENCV_GENERATE_PKGCONFIG=ON"
|
| 635 |
|
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | "-DCPU_BASELINE=SSE2"
|
| 643 |
|
| 644 | |
| 645 | "-DBUILD_opencv_python3=ON"
|
| 646 |
|
| 647 | #$@(match (%current-system)
|
| 648 | ("x86_64-linux"
|
| 649 | '("-DCPU_DISPATCH=NEON;VFPV3;FP16;SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX"
|
| 650 | "-DCPU_DISPATCH_REQUIRE=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2"))
|
| 651 | ("armhf-linux"
|
| 652 | '("-DCPU_BASELINE_DISABLE=NEON")) |
| 653 | ("aarch64-linux"
|
| 654 | '("-DCPU_BASELINE=NEON"
|
| 655 | "-DCPU_DISPATCH=NEON;VFPV3;FP16"))
|
| 656 | (_ '()))
|
| 657 |
|
| 658 | "-DBUILD_PERF_TESTS=OFF"
|
| 659 | "-DBUILD_TESTS=ON"
|
| 660 |
|
| 661 | (string-append "-DOPENCV_EXTRA_MODULES_PATH=" (getcwd)
|
| 662 | "/opencv-contrib/modules")
|
| 663 |
|
| 664 | |
| 665 | (string-append "-DOPENCV_TEST_DATA_PATH=" (getcwd)
|
| 666 | "/opencv-extra/testdata")
|
| 667 |
|
| 668 | |
| 669 | |
| 670 | "-DBUILD_PROTOBUF=OFF"
|
| 671 |
|
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | "-DWITH_FLATBUFFERS=OFF"
|
| 677 |
|
| 678 | |
| 679 | |
| 680 | |
| 681 | "-DPROTOBUF_UPDATE_FILES=ON"
|
| 682 |
|
| 683 | |
| 684 | "-DOPENCV_SKIP_FEATURES2D_DOWNLOADING=ON")
|
| 685 | #:phases
|
| 686 | #~(modify-phases %standard-phases
|
| 687 | (add-after 'unpack 'disable-broken-tests
|
| 688 | (lambda _
|
| 689 | |
| 690 | |
| 691 | (substitute* "../opencv-contrib/modules/face/test/test_face_align.cpp"
|
| 692 | (("\\bcan_detect_landmarks\\b" all)
|
| 693 | (string-append "DISABLED_" all)))
|
| 694 |
|
| 695 | |
| 696 | |
| 697 | (substitute* "modules/imgcodecs/test/test_exr.impl.hpp"
|
| 698 | (("\\breadWrite_32FC1\\b" all)
|
| 699 | (string-append "DISABLED_" all)))
|
| 700 |
|
| 701 | |
| 702 | |
| 703 | (substitute* "modules/dnn/test/test_layers.cpp"
|
| 704 | (("\\b(Accum|DataAugmentation|Resample|Correlation|Interp)\\b" all)
|
| 705 | (string-append "DISABLED_" all)))
|
| 706 |
|
| 707 | |
| 708 | |
| 709 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 710 | (("0\\.1\\)") "0.222)"))
|
| 711 |
|
| 712 | #$@(if (target-aarch64?)
|
| 713 | `( |
| 714 | |
| 715 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 716 | (("0\\.131") "0.222"))
|
| 717 | |
| 718 | (delete-file-recursively "modules/videoio/test/")
|
| 719 | |
| 720 | |
| 721 | |
| 722 | (substitute* "../opencv-contrib/modules/optflow/test/test_OF_accuracy.cpp"
|
| 723 | (("\\bReferenceAccuracy\\b" all)
|
| 724 | (string-append "DISABLED_" all))))
|
| 725 | '())
|
| 726 |
|
| 727 | #$@(if (target-riscv64?)
|
| 728 | `( |
| 729 | |
| 730 | (substitute* "modules/photo/test/test_hdr.cpp"
|
| 731 | (("0\\.1") "0.240"))
|
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | (substitute* "../opencv-contrib/modules/ximgproc/test/test_fld.cpp"
|
| 738 | (("\\bManySmallCircles\\b" all)
|
| 739 | (string-append "DISABLED_" all))))
|
| 740 | '())))
|
| 741 | (add-after 'unpack 'unpack-submodule-sources
|
| 742 | (lambda* (#:key inputs #:allow-other-keys)
|
| 743 | (mkdir "../opencv-extra")
|
| 744 | (mkdir "../opencv-contrib")
|
| 745 | (copy-recursively (assoc-ref inputs "opencv-extra")
|
| 746 | "../opencv-extra")
|
| 747 | (copy-recursively (assoc-ref inputs "opencv-contrib")
|
| 748 | "../opencv-contrib")
|
| 749 |
|
| 750 | |
| 751 | |
| 752 | (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLists.txt"
|
| 753 | (("download_(boost|vgg)_descriptors") "#"))
|
| 754 | (copy-recursively (assoc-ref inputs "opencv-3rdparty-boost")
|
| 755 | "../downloads/xfeatures2d")
|
| 756 | (for-each make-file-writable
|
| 757 | (find-files "../downloads/xfeatures2d" "."))
|
| 758 | (copy-recursively (assoc-ref inputs "opencv-3rdparty-vgg")
|
| 759 | "../downloads/xfeatures2d")))
|
| 760 | (add-after 'build 'do-not-install-3rdparty-file
|
| 761 | (lambda _
|
| 762 | (substitute* "cmake_install.cmake"
|
| 763 | (("file\\(INSTALL .*3rdparty/include/opencl/LICENSE.txt.*")
|
| 764 | ""))))
|
| 765 | (add-before 'check 'start-xserver
|
| 766 | (lambda* (#:key inputs #:allow-other-keys)
|
| 767 | (let ((xorg-server (assoc-ref inputs "xorg-server"))
|
| 768 | (disp ":1"))
|
| 769 | (setenv "HOME" (getcwd))
|
| 770 | (setenv "DISPLAY" disp)
|
| 771 | |
| 772 | |
| 773 | (zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp)))))))))
|
| 774 | (native-inputs
|
| 775 | `(("pkg-config" ,pkg-config)
|
| 776 | ("xorg-server" ,xorg-server-for-tests) |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | ("opencv-3rdparty-boost"
|
| 783 | ,(let ((commit "34e4206aef44d50e6bbcd0ab06354b52e7466d26"))
|
| 784 | (origin
|
| 785 | (method git-fetch)
|
| 786 | (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
|
| 787 | (commit commit)))
|
| 788 | (file-name (git-file-name "opencv_3rdparty" commit))
|
| 789 | (sha256
|
| 790 | (base32
|
| 791 | "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62")))))
|
| 792 | |
| 793 | |
| 794 | |
| 795 | ("opencv-3rdparty-vgg"
|
| 796 | ,(let ((commit "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"))
|
| 797 | (origin
|
| 798 | (method git-fetch)
|
| 799 | (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
|
| 800 | (commit commit)))
|
| 801 | (file-name (git-file-name "opencv_3rdparty" commit))
|
| 802 | (sha256
|
| 803 | (base32
|
| 804 | "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy")))))
|
| 805 | ("opencv-extra"
|
| 806 | ,(origin
|
| 807 | (method git-fetch)
|
| 808 | (uri (git-reference
|
| 809 | (url "https://github.com/opencv/opencv_extra")
|
| 810 | (commit version)))
|
| 811 | (file-name (git-file-name "opencv_extra" version))
|
| 812 | (sha256
|
| 813 | (base32
|
| 814 | "0jbph7zg4cczpnly9n2xarwk2l1gxlv3644avjny4rkr32kcggdg"))))
|
| 815 | ("opencv-contrib"
|
| 816 | ,(origin
|
| 817 | (method git-fetch)
|
| 818 | (uri (git-reference (url "https://github.com/opencv/opencv_contrib")
|
| 819 | (commit version)))
|
| 820 | (file-name (git-file-name "opencv_contrib" version))
|
| 821 | (sha256
|
| 822 | (base32
|
| 823 | "121qkc7g9kwgkv094khxdqqm5bf7ykqplmaadgszcsgxa6ml517i"))))))
|
| 824 | (inputs
|
| 825 | (list dlpack
|
| 826 | eigen
|
| 827 | ffmpeg-4
|
| 828 | |
| 829 | gtk+
|
| 830 | hdf5
|
| 831 | imath |
| 832 | jasper
|
| 833 | libgphoto2
|
| 834 | libjpeg-turbo
|
| 835 | libpng
|
| 836 | libtiff
|
| 837 | libwebp
|
| 838 | openblas
|
| 839 | opencl-headers
|
| 840 | openexr
|
| 841 | openmpi
|
| 842 | openjpeg
|
| 843 | protobuf
|
| 844 | python
|
| 845 | python-numpy
|
| 846 | vtk-9.3
|
| 847 | zlib))
|
| 848 | |
| 849 | |
| 850 | (properties '((lint-hidden-cve . ("CVE-2018-7712"
|
| 851 | "CVE-2018-7713"
|
| 852 | "CVE-2018-7714"))))
|
| 853 | (synopsis "Computer vision library")
|
| 854 | (description "OpenCV is a library aimed at real-time computer vision,
|
| 855 | including several hundred computer vision algorithms. It can be used to do
|
| 856 | things like:
|
| 857 |
|
| 858 | @itemize
|
| 859 | @item image and video input and output
|
| 860 | @item image and video processing
|
| 861 | @item displaying
|
| 862 | @item feature recognition
|
| 863 | @item segmentation
|
| 864 | @item facial recognition
|
| 865 | @item stereo vision
|
| 866 | @item structure from motion
|
| 867 | @item augmented reality
|
| 868 | @item machine learning
|
| 869 | @end itemize\n
|
| 870 |
|
| 871 | This package includes the Python bindings for OpenCV, which are also known as
|
| 872 | the OpenCV-Python library.")
|
| 873 | (home-page "https://opencv.org/")
|
| 874 | (license license:bsd-3)))
|
| 875 |
|
| 876 | (define-public vips
|
| 877 | (package
|
| 878 | (name "vips")
|
| 879 | (version "8.17.0")
|
| 880 | (source
|
| 881 | (origin
|
| 882 | (method git-fetch)
|
| 883 | (uri (git-reference
|
| 884 | (url "https://github.com/libvips/libvips")
|
| 885 | (commit (string-append "v" version))))
|
| 886 | (file-name (git-file-name name version))
|
| 887 | (sha256
|
| 888 | (base32 "1rdz2mmivr02s7cksqgbramv37yw95w6s8r20hgjqx36in2ndnbl"))))
|
| 889 | (build-system meson-build-system)
|
| 890 | (native-inputs
|
| 891 | (list `(,glib "bin")
|
| 892 | gobject-introspection
|
| 893 | pkg-config))
|
| 894 | (inputs
|
| 895 | (list glib
|
| 896 | hdf5
|
| 897 | imagemagick
|
| 898 | poppler))
|
| 899 | |
| 900 | (propagated-inputs
|
| 901 | (list expat
|
| 902 | fftw
|
| 903 | lcms
|
| 904 | libexif
|
| 905 | libgsf
|
| 906 | libjpeg-turbo
|
| 907 | libpng
|
| 908 | (librsvg-for-system)
|
| 909 | libtiff
|
| 910 | libwebp
|
| 911 | matio
|
| 912 | openexr
|
| 913 | orc
|
| 914 | pango))
|
| 915 | (home-page "https://www.libvips.org/")
|
| 916 | (synopsis "Multithreaded image processing system with low memory needs")
|
| 917 | (description
|
| 918 | "VIPS is a demand-driven, horizontally threaded image processing library.
|
| 919 | It's particularly good at processing large images, working with colour,
|
| 920 | scientific analysis, and general research & development.
|
| 921 |
|
| 922 | Compared to most image processing libraries VIPS needs little RAM and runs
|
| 923 | quickly, especially on machines with more than one CPU core. This is primarily
|
| 924 | due to its architecture which automatically parallelises the image workflows.")
|
| 925 | (license license:lgpl2.1+)))
|
| 926 |
|
| 927 | (define-public gmic
|
| 928 | (package
|
| 929 | (name "gmic")
|
| 930 | (version "4.0.3")
|
| 931 | (source
|
| 932 | (origin
|
| 933 | (method url-fetch)
|
| 934 | (uri (string-append "https://gmic.eu/files/source/gmic_"
|
| 935 | version ".tar.gz"))
|
| 936 | (sha256
|
| 937 | (base32 "0azqllvaqqsy69qxcsnpi2bznffjyrminfjlhrfqqz36mia4cf20"))))
|
| 938 | (build-system cmake-build-system)
|
| 939 | (arguments
|
| 940 | (list
|
| 941 | #:tests? #f |
| 942 | #:configure-flags #~(list "-DBUILD_LIB_STATIC=OFF"
|
| 943 | "-DENABLE_DYNAMIC_LINKING=ON"
|
| 944 | (string-append "-DCMAKE_EXE_LINKER_FLAGS="
|
| 945 | "-Wl,-rpath=" #$output "/lib")
|
| 946 | "-DENABLE_LTO=ON")))
|
| 947 | (native-inputs
|
| 948 | (list pkg-config))
|
| 949 | (inputs
|
| 950 | (list curl
|
| 951 | fftw
|
| 952 | graphicsmagick
|
| 953 | imath
|
| 954 | libjpeg-turbo
|
| 955 | libpng
|
| 956 | libtiff
|
| 957 | libx11
|
| 958 | openexr
|
| 959 | zlib))
|
| 960 | (home-page "https://gmic.eu/")
|
| 961 | (synopsis "Full-featured framework for digital image processing")
|
| 962 | (description "G'MIC is a full-featured framework for digital image
|
| 963 | processing. It provides several user interfaces to convert / manipulate
|
| 964 | / filter / visualize generic image datasets, ranging from 1D scalar
|
| 965 | signals to 3D+t sequences of multi-spectral volumetric images, hence
|
| 966 | including 2D color images.")
|
| 967 | |
| 968 | (license (list license:cecill license:cecill-c))))
|
| 969 |
|
| 970 | (define-public gmic-qt
|
| 971 | (package
|
| 972 | (inherit gmic)
|
| 973 | (name "gmic-qt")
|
| 974 | (arguments
|
| 975 | (substitute-keyword-arguments arguments
|
| 976 | ((#:configure-flags _)
|
| 977 | #~(list "-DBUILD_WITH_QT6=ON"
|
| 978 | "-DGMIC_QT_HOST=none"
|
| 979 | "-DENABLE_DYNAMIC_LINKING=ON"))
|
| 980 | ((#:phases phases '%standard-phases)
|
| 981 | #~(modify-phases #$phases
|
| 982 | (add-after 'unpack 'qt-chdir
|
| 983 | (lambda _ (chdir "gmic-qt")))))))
|
| 984 | (native-inputs
|
| 985 | (list pkg-config qttools))
|
| 986 | (inputs
|
| 987 | (modify-inputs inputs
|
| 988 | (prepend gmic qtbase)))
|
| 989 | (synopsis "Qt frontend for the G'MIC image processing framework")
|
| 990 | (license license:gpl3+)))
|
| 991 |
|
| 992 | (define-public gmic-qt-gimp
|
| 993 | (package
|
| 994 | (inherit gmic-qt)
|
| 995 | (name "gmic-qt-gimp")
|
| 996 | (inputs
|
| 997 | |
| 998 | (modify-inputs inputs
|
| 999 | (prepend gexiv2-0.14 gdk-pixbuf gegl gimp pango)))
|
| 1000 | (arguments
|
| 1001 | (substitute-keyword-arguments arguments
|
| 1002 | ((#:configure-flags flags)
|
| 1003 | #~(list "-DBUILD_WITH_QT6=ON"
|
| 1004 | "-DGMIC_QT_HOST=gimp3"
|
| 1005 | "-DENABLE_DYNAMIC_LINKING=ON"))))
|
| 1006 | (synopsis "GIMP plugin for the G'MIC image processing framework")))
|
| 1007 |
|
| 1008 | (define-public nip2
|
| 1009 | (package
|
| 1010 | (name "nip2")
|
| 1011 | (version "8.9.1")
|
| 1012 | (source
|
| 1013 | (origin
|
| 1014 | (method url-fetch)
|
| 1015 | (uri (string-append "https://github.com/libvips/nip2/releases/download/v"
|
| 1016 | version "/nip2-" version ".tar.gz" ))
|
| 1017 | (sha256
|
| 1018 | (base32 "1kbndn37m0cfjvrvw25b5if9d962r8v79q78i2lzm55r7zmjcpmp"))))
|
| 1019 | (build-system gnu-build-system)
|
| 1020 | (arguments
|
| 1021 | `(#:phases
|
| 1022 | (modify-phases %standard-phases
|
| 1023 | (add-before 'check 'set-home
|
| 1024 | (lambda _
|
| 1025 | (setenv "HOME" "/tmp"))))))
|
| 1026 | (inputs (list gsl gtk+-2 vips))
|
| 1027 | (native-inputs (list bison flex pkg-config))
|
| 1028 | (home-page "https://github.com/libvips/nip2")
|
| 1029 | (synopsis "Spreadsheet-like GUI for libvips")
|
| 1030 | (description "This package provide a graphical user interface (GUI) for
|
| 1031 | the VIPS image processing library. It's a little like a spreadsheet: you
|
| 1032 | create a set of formula connecting your objects together, and on a change nip2
|
| 1033 | recalculates.")
|
| 1034 | (license license:gpl2+)))
|
| 1035 |
|
| 1036 | (define-public paraview
|
| 1037 | (package
|
| 1038 | (name "paraview")
|
| 1039 | (version "6.0.0")
|
| 1040 | (source
|
| 1041 | (origin
|
| 1042 | (method git-fetch)
|
| 1043 | (uri (git-reference
|
| 1044 | (url "https://gitlab.kitware.com/paraview/paraview")
|
| 1045 | (commit (string-append "v" version))
|
| 1046 | (recursive? #t)))
|
| 1047 | (file-name (git-file-name name version))
|
| 1048 | (sha256
|
| 1049 | (base32 "1m1c7vngrpaqdqvnjx4wj0va20hih5rb7rf0a44mp3wqgp4wgy0f"))
|
| 1050 | (modules '((guix build utils)))
|
| 1051 | (snippet
|
| 1052 | |
| 1053 | #~(begin
|
| 1054 | |
| 1055 | |
| 1056 | (for-each (lambda (dir)
|
| 1057 | (delete-file-recursively
|
| 1058 | (string-append "ThirdParty/" dir "/vtk"
|
| 1059 | (string-downcase dir))))
|
| 1060 | '( |
| 1061 | |
| 1062 | "NvPipe" |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | "protobuf"))
|
| 1067 | |
| 1068 | (delete-file-recursively "Plugins/pvNVIDIAIndeX")
|
| 1069 | |
| 1070 | (for-each (lambda (dir)
|
| 1071 | (delete-file-recursively
|
| 1072 | (string-append "VTK/ThirdParty/" dir "/vtk" dir)))
|
| 1073 | '("cgns"
|
| 1074 | "cli11"
|
| 1075 | |
| 1076 | "doubleconversion"
|
| 1077 | "eigen"
|
| 1078 | |
| 1079 | "expat"
|
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | "fmt"
|
| 1084 | "freetype"
|
| 1085 | "gl2ps"
|
| 1086 | |
| 1087 | |
| 1088 | "hdf5"
|
| 1089 | |
| 1090 | "jpeg"
|
| 1091 | "jsoncpp"
|
| 1092 | |
| 1093 | |
| 1094 | "libproj"
|
| 1095 | "libxml2"
|
| 1096 | |
| 1097 | "lz4"
|
| 1098 | "lzma"
|
| 1099 | "mpi4py"
|
| 1100 | "netcdf"
|
| 1101 | "nlohmannjson"
|
| 1102 | "ogg"
|
| 1103 | |
| 1104 | "png"
|
| 1105 | "pugixml"
|
| 1106 | "sqlite"
|
| 1107 | "theora"
|
| 1108 | "tiff"
|
| 1109 | |
| 1110 | "utf8"
|
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | "zlib"))))))
|
| 1118 | (build-system qt-build-system)
|
| 1119 | (arguments
|
| 1120 | (list
|
| 1121 | #:qtbase qtbase
|
| 1122 | #:build-type "Release" |
| 1123 | #:tests? #f |
| 1124 | #:configure-flags
|
| 1125 | #~(let ((doc (string-append "share/doc/" #$name "-" #$version)))
|
| 1126 | (list
|
| 1127 | (string-append "-DCMAKE_INSTALL_DOCDIR=" doc) |
| 1128 |
|
| 1129 | |
| 1130 | "-DPARAVIEW_BUILD_DEVELOPER_DOCUMENTATION=ON"
|
| 1131 | (string-append "-DPARAVIEW_GENERATED_DOCUMENTATION_OUTPUT_DIRECTORY=" doc)
|
| 1132 |
|
| 1133 | |
| 1134 | |
| 1135 | "-DPARAVIEW_USE_MPI=ON"
|
| 1136 | "-DPARAVIEW_USE_PYTHON=ON"
|
| 1137 | "-DPARAVIEW_USE_QTWEBENGINE=ON"
|
| 1138 |
|
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | |
| 1146 | |
| 1147 | "-DPARAVIEW_ENABLE_FFMPEG=ON"
|
| 1148 | |
| 1149 | "-DPARAVIEW_ENABLE_GDAL=ON"
|
| 1150 | |
| 1151 | |
| 1152 | |
| 1153 | "-DPARAVIEW_ENABLE_MOTIONFX=ON"
|
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | "-DPARAVIEW_ENABLE_VISITBRIDGE=ON"
|
| 1159 | "-DPARAVIEW_ENABLE_XDMF3=ON"
|
| 1160 |
|
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | "-DPARAVIEW_VERSIONED_INSTALL=OFF"
|
| 1166 | "-DPARAVIEW_DATA_EXCLUDE_FROM_ALL=OFF"
|
| 1167 |
|
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | "-DPARAVIEW_PLUGIN_ENABLE_CAVEInteraction=ON"
|
| 1176 | |
| 1177 | "-DPARAVIEW_PLUGIN_ENABLE_GeographicalMap=ON"
|
| 1178 | "-DPARAVIEW_PLUGIN_ENABLE_GmshIO=ON"
|
| 1179 | "-DPARAVIEW_PLUGIN_ENABLE_InSituExodus=ON"
|
| 1180 | |
| 1181 | "-DPARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin=ON"
|
| 1182 | |
| 1183 | |
| 1184 | "-DPARAVIEW_PLUGIN_ENABLE_SpaceMouseInteractor=ON"
|
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 |
|
| 1189 | |
| 1190 | "-DVTK_SMP_IMPLEMENTATION_TYPE=TBB"
|
| 1191 | "-DVTKm_ENABLE_MPI=ON"
|
| 1192 |
|
| 1193 | |
| 1194 | "-DVTK_MODULE_USE_EXTERNAL_ParaView_protobuf=ON"
|
| 1195 | "-DVTK_MODULE_USE_EXTERNAL_VTK_cgns=ON"
|
| 1196 | "-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=ON"
|
| 1197 | "-DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion=ON"
|
| 1198 | "-DVTK_MODULE_USE_EXTERNAL_VTK_eigen=ON"
|
| 1199 | "-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
|
| 1200 | "-DVTK_MODULE_USE_EXTERNAL_VTK_fmt=ON"
|
| 1201 | "-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
|
| 1202 | "-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
|
| 1203 | "-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
|
| 1204 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
|
| 1205 | "-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
|
| 1206 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON"
|
| 1207 | "-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON"
|
| 1208 | "-DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON"
|
| 1209 | "-DVTK_MODULE_USE_EXTERNAL_VTK_lzma=ON"
|
| 1210 | "-DVTK_MODULE_USE_EXTERNAL_VTK_mpi4py=ON"
|
| 1211 | "-DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON"
|
| 1212 | "-DVTK_MODULE_USE_EXTERNAL_VTK_nlohmannjson=ON"
|
| 1213 | "-DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON"
|
| 1214 | |
| 1215 | "-DVTK_MODULE_USE_EXTERNAL_VTK_png=ON"
|
| 1216 | "-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=ON"
|
| 1217 | "-DVTK_MODULE_USE_EXTERNAL_VTK_sqlite=ON"
|
| 1218 | "-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
|
| 1219 | "-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
|
| 1220 | "-DVTK_MODULE_USE_EXTERNAL_VTK_utf8=ON"
|
| 1221 | "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"))
|
| 1222 | #:phases
|
| 1223 | #~(modify-phases %standard-phases
|
| 1224 | (add-after 'set-paths 'hide-gfortran
|
| 1225 | (lambda _
|
| 1226 | (setenv "CPLUS_INCLUDE_PATH"
|
| 1227 | (string-join
|
| 1228 | (delete (string-append #$(this-package-native-input "gfortran")
|
| 1229 | "/include/c++")
|
| 1230 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
|
| 1231 | ":"))))
|
| 1232 | (replace 'install-license-files
|
| 1233 | (lambda _
|
| 1234 | (let ((src (string-append #$output "/share/licenses/ParaView"))
|
| 1235 | (dst (string-append #$output "/share/doc/"
|
| 1236 | #$name "-" #$version "/licenses")))
|
| 1237 | (copy-recursively src dst)
|
| 1238 | (delete-file-recursively (dirname src))))))))
|
| 1239 | (native-inputs
|
| 1240 | (list gfortran
|
| 1241 | |
| 1242 | doxygen
|
| 1243 | graphviz
|
| 1244 | perl
|
| 1245 | python-sphinx))
|
| 1246 | (inputs
|
| 1247 | (list boost
|
| 1248 | cgns
|
| 1249 | cli11
|
| 1250 | curl
|
| 1251 | double-conversion
|
| 1252 | eigen
|
| 1253 | expat
|
| 1254 | ffmpeg
|
| 1255 | fmt-11
|
| 1256 | freetype
|
| 1257 | gdal
|
| 1258 | gl2ps
|
| 1259 | gmsh
|
| 1260 | hdf5
|
| 1261 | nlohmann-json |
| 1262 | jsoncpp
|
| 1263 | libjpeg-turbo
|
| 1264 | libogg
|
| 1265 | libpng
|
| 1266 | libtheora
|
| 1267 | libtiff
|
| 1268 | libxcursor
|
| 1269 | libxml2
|
| 1270 | libxslt
|
| 1271 | libxt
|
| 1272 | lz4
|
| 1273 | lzip
|
| 1274 | mesa
|
| 1275 | netcdf
|
| 1276 | openmpi
|
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | proj
|
| 1281 | protobuf
|
| 1282 | pugixml
|
| 1283 | python-cftime
|
| 1284 | python-matplotlib
|
| 1285 | python-mpi4py
|
| 1286 | python-numpy
|
| 1287 | python-wrapper
|
| 1288 | qt5compat
|
| 1289 | qtdeclarative
|
| 1290 | qtmultimedia
|
| 1291 | qtsvg
|
| 1292 | qttools
|
| 1293 | qtwebchannel
|
| 1294 | qtwebengine
|
| 1295 | sdl2
|
| 1296 | sqlite
|
| 1297 | onetbb
|
| 1298 | utfcpp
|
| 1299 | zlib))
|
| 1300 | (home-page "https://www.paraview.org/")
|
| 1301 | (synopsis "VTK-based, parallel data analyzer and visualizer")
|
| 1302 | (description "ParaView is a VTK-based, parallel data analyzer and
|
| 1303 | visualizer which allows exploring data interactively in 3D or
|
| 1304 | programmatically.")
|
| 1305 | (license license:bsd-3)))
|
| 1306 |
|
| 1307 | (define-public vxl
|
| 1308 | (package
|
| 1309 | (name "vxl")
|
| 1310 | (version "3.5.0")
|
| 1311 | (source
|
| 1312 | (origin
|
| 1313 | (method git-fetch)
|
| 1314 | (uri (git-reference
|
| 1315 | (url "https://github.com/vxl/vxl")
|
| 1316 | (commit (string-append "v" version))))
|
| 1317 | (file-name (git-file-name name version))
|
| 1318 | (sha256
|
| 1319 | (base32 "0iqq4lm51l5gvkax6r79ypifqmgir3p3vman9gsc2085d2agjvbs"))
|
| 1320 | (modules '((guix build utils)))
|
| 1321 | |
| 1322 | |
| 1323 | (snippet
|
| 1324 | '(begin
|
| 1325 | (for-each delete-file-recursively
|
| 1326 | '("v3p/bzlib/"
|
| 1327 | "v3p/geotiff/"
|
| 1328 | "v3p/jpeg/"
|
| 1329 | "v3p/png/"
|
| 1330 | "v3p/tiff/"
|
| 1331 | "v3p/zlib/"))
|
| 1332 | (substitute* "v3p/CMakeLists.txt"
|
| 1333 | (("add_subdirectory\\((tiff|png|jpeg|zlib|bzlib|geotiff)\\)")
|
| 1334 | ""))
|
| 1335 | #t))))
|
| 1336 | (build-system cmake-build-system)
|
| 1337 | (arguments
|
| 1338 | |
| 1339 | (list #:test-exclude "vul_vul_test_driver"))
|
| 1340 | (inputs
|
| 1341 | (list libgeotiff libtiff libjpeg-turbo libpng zlib))
|
| 1342 | (home-page "https://github.com/vxl/vxl/")
|
| 1343 | (synopsis "Collection of C++ libraries for computer vision")
|
| 1344 | (description "VXL (the Vision-something-Libraries) is a collection of C++
|
| 1345 | libraries designed for computer vision research and implementation.")
|
| 1346 | (license license:bsd-3)))
|
| 1347 |
|
| 1348 | (define-public vxl-1
|
| 1349 | (package (inherit vxl)
|
| 1350 | (name "vxl")
|
| 1351 | (version "1.18.0")
|
| 1352 | (source
|
| 1353 | (origin
|
| 1354 | (method git-fetch)
|
| 1355 | (uri (git-reference
|
| 1356 | (url "https://github.com/vxl/vxl")
|
| 1357 | (commit (string-append "v" version))))
|
| 1358 | (file-name (git-file-name name version))
|
| 1359 | (sha256
|
| 1360 | (base32 "1g4mr2cc58jwm0vasscbd4y5380wj3ahkvq121z4gs83fhavvxgz"))
|
| 1361 | (modules '((guix build utils)))
|
| 1362 | (snippet
|
| 1363 | '(begin
|
| 1364 | (for-each delete-file-recursively
|
| 1365 | '("v3p/bzlib/"
|
| 1366 | "v3p/geotiff/"
|
| 1367 | "v3p/png/"
|
| 1368 | "v3p/tiff/"
|
| 1369 | "v3p/zlib/"))
|
| 1370 | (substitute* "v3p/CMakeLists.txt"
|
| 1371 | (("add_subdirectory\\((tiff|png|jpeg|zlib|bzlib|geotiff)\\)")
|
| 1372 | ""))))))
|
| 1373 | (arguments
|
| 1374 | (substitute-keyword-arguments arguments
|
| 1375 | ((#:configure-flags flags)
|
| 1376 | #~(cons* |
| 1377 | "-DVNL_CONFIG_LEGACY_METHODS=ON"
|
| 1378 | "-DCMAKE_CXX_STANDARD=14"
|
| 1379 | #$flags))))))
|
| 1380 |
|
| 1381 | (define-public insight-toolkit
|
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | (let* ((module-mci-commit "821bf9b3ef8eaaab10391ed060dc9ca5e4d37b39")
|
| 1390 | (module-mci-file (git-file-name "ITKMorphologicalContourInterpolation"
|
| 1391 | module-mci-commit))
|
| 1392 | (module-sitkf-commit "bb896868fc6480835495d0da4356d5db009592a6")
|
| 1393 | (module-sitkf-file (git-file-name "ITKSimpleITKFilters"
|
| 1394 | module-sitkf-commit))
|
| 1395 | (module-gli-commit "ebf2436469ccf82c08fab54b7446f699ad0eae01")
|
| 1396 | (module-gli-file (git-file-name "ITKGenericLabelInterpolator"
|
| 1397 | module-gli-commit))
|
| 1398 | (module-ad-commit "853934c352f83cb1e8f87e3051e1b8e75dbb41fe")
|
| 1399 | (module-ad-file (git-file-name "ITKAdaptiveDenoising"
|
| 1400 | module-ad-commit)))
|
| 1401 | (package
|
| 1402 | (name "insight-toolkit")
|
| 1403 | (version "5.4.5")
|
| 1404 | (source
|
| 1405 | (origin
|
| 1406 | (method git-fetch)
|
| 1407 | (uri (git-reference
|
| 1408 | (url "https://github.com/InsightSoftwareConsortium/ITK")
|
| 1409 | (commit (string-append "v" version))))
|
| 1410 | (file-name (git-file-name name version))
|
| 1411 | (sha256
|
| 1412 | (base32 "0sd037pgsdfigc5gi4lr5iwm063s0wrjl8i4b8dfxmrbipxjvn33"))
|
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | (patches (search-patches "insight-toolkit-fix-build.patch"))))
|
| 1417 | (build-system cmake-build-system)
|
| 1418 | (outputs '("out" "python"))
|
| 1419 | (arguments
|
| 1420 | (list
|
| 1421 | #:imported-modules (append %cmake-build-system-modules
|
| 1422 | %pyproject-build-system-modules)
|
| 1423 | #:modules '(((guix build pyproject-build-system) #:prefix py:)
|
| 1424 | (guix build cmake-build-system)
|
| 1425 | (guix build utils))
|
| 1426 | #:configure-flags
|
| 1427 | #~(list "-DITK_USE_GPU=ON"
|
| 1428 | "-DITK_USE_SYSTEM_LIBRARIES=ON"
|
| 1429 | "-DITK_USE_SYSTEM_CASTXML=ON"
|
| 1430 | "-DITK_USE_SYSTEM_SWIG=ON"
|
| 1431 | (string-append "-DHDF5_DIR="
|
| 1432 | #$(this-package-input "hdf5") "/lib/cmake")
|
| 1433 | "-DBUILD_SHARED_LIBS=ON"
|
| 1434 | |
| 1435 | |
| 1436 | |
| 1437 | |
| 1438 | "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
| 1439 | "-DITK_WRAPPING=ON"
|
| 1440 | "-DITK_WRAP_PYTHON=ON"
|
| 1441 | "-DITK_DYNAMIC_LOADING=ON"
|
| 1442 | (let* ((python-version
|
| 1443 | #$(version-major+minor
|
| 1444 | (package-version
|
| 1445 | (this-package-input "python"))))
|
| 1446 | (python-lib-path (string-append #$output:python
|
| 1447 | "/lib/python"
|
| 1448 | python-version
|
| 1449 | "/site-packages")))
|
| 1450 | (string-append "-DPY_SITE_PACKAGES_PATH="
|
| 1451 | python-lib-path))
|
| 1452 | |
| 1453 | "-DITK_USE_PYTHON_LIMITED_API=OFF"
|
| 1454 | "-DModule_MorphologicalContourInterpolation=ON"
|
| 1455 | "-DModule_SimpleITKFilters=ON"
|
| 1456 | "-DModule_GenericLabelInterpolator=ON"
|
| 1457 | "-DModule_AdaptiveDenoising:BOOL=ON"
|
| 1458 | "-DModule_ITKReview:BOOL=ON"
|
| 1459 | "-DCMAKE_CXX_STANDARD=17"
|
| 1460 | "-DBUILD_TESTING=OFF")
|
| 1461 |
|
| 1462 | #:phases
|
| 1463 | #~(modify-phases %standard-phases
|
| 1464 | (add-after 'unpack 'do-not-tune
|
| 1465 | (lambda _
|
| 1466 | (substitute* "CMake/ITKSetStandardCompilerFlags.cmake"
|
| 1467 | (("-mtune=native")
|
| 1468 | ""))))
|
| 1469 | (add-after 'unpack 'exclude-gtest-target
|
| 1470 | (lambda _
|
| 1471 | |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | |
| 1476 | |
| 1477 | |
| 1478 | |
| 1479 | |
| 1480 | (substitute* "Modules/ThirdParty/GoogleTest/itk-module.cmake"
|
| 1481 | (("DEPENDS")
|
| 1482 | "DEPENDS\n EXCLUDE_FROM_DEFAULT"))))
|
| 1483 | (add-after 'unpack 'prepare-remote-modules
|
| 1484 | (lambda _
|
| 1485 | |
| 1486 | |
| 1487 | (symlink #$(this-package-native-input module-mci-file)
|
| 1488 | "Modules/Remote/MorphologicalContourInterpolation")
|
| 1489 | (delete-file
|
| 1490 | (string-append
|
| 1491 | "Modules/Remote/"
|
| 1492 | "MorphologicalContourInterpolation.remote.cmake"))
|
| 1493 | |
| 1494 | |
| 1495 | (symlink #$(this-package-native-input module-sitkf-file)
|
| 1496 | "Modules/Remote/SimpleITKFilters")
|
| 1497 | (delete-file "Modules/Remote/SimpleITKFilters.remote.cmake")
|
| 1498 | (symlink #$(this-package-native-input module-gli-file)
|
| 1499 | "Modules/Remote/GenericLabelInterpolator")
|
| 1500 | (delete-file
|
| 1501 | "Modules/Remote/GenericLabelInterpolator.remote.cmake")
|
| 1502 | (symlink #$(this-package-native-input module-ad-file)
|
| 1503 | "Modules/Remote/AdaptiveDenoising")
|
| 1504 | (delete-file
|
| 1505 | "Modules/Remote/AdaptiveDenoising.remote.cmake")))
|
| 1506 | (delete 'check) |
| 1507 | (add-after 'install 'python-sanity-check
|
| 1508 | (lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
| 1509 | (when tests?
|
| 1510 | (py:add-installed-pythonpath inputs outputs)
|
| 1511 | (invoke "python3" "-c" "import itk")))))))
|
| 1512 | (inputs (list eigen
|
| 1513 | expat
|
| 1514 | fftw
|
| 1515 | fftwf
|
| 1516 | hdf5
|
| 1517 | libjpeg-turbo
|
| 1518 | libpng
|
| 1519 | libtiff
|
| 1520 | opencl-headers
|
| 1521 | opencl-icd-loader
|
| 1522 | perl
|
| 1523 | python
|
| 1524 | onetbb
|
| 1525 | vxl-1
|
| 1526 | zlib-ng-compat))
|
| 1527 | (native-inputs
|
| 1528 | (list castxml
|
| 1529 | git-minimal/pinned
|
| 1530 | pkg-config
|
| 1531 | python-numpy |
| 1532 | swig-4.4
|
| 1533 | which
|
| 1534 | (origin
|
| 1535 | (method git-fetch)
|
| 1536 | (uri
|
| 1537 | (git-reference
|
| 1538 | (url (string-append
|
| 1539 | "https://github.com/KitwareMedical/"
|
| 1540 | "ITKMorphologicalContourInterpolation"))
|
| 1541 | (commit module-mci-commit)))
|
| 1542 | (file-name module-mci-file)
|
| 1543 | (sha256
|
| 1544 | (base32
|
| 1545 | "00myhgvlk3n062i8bnknz1d10zkv3jlvs7f4jnk24727gd4v2n4i")))
|
| 1546 | (origin
|
| 1547 | (method git-fetch)
|
| 1548 | (uri (git-reference
|
| 1549 | (url (string-append
|
| 1550 | "https://github.com/InsightSoftwareConsortium/"
|
| 1551 | "ITKSimpleITKFilters"))
|
| 1552 | (commit module-sitkf-commit)))
|
| 1553 | (file-name module-sitkf-file)
|
| 1554 | (sha256
|
| 1555 | (base32
|
| 1556 | "13nys94wl4k77f89i8y1dm3y4pmgmw3rrc0la1rzl0vi9h1qixii")))
|
| 1557 | (origin
|
| 1558 | (method git-fetch)
|
| 1559 | (uri (git-reference
|
| 1560 | (url (string-append
|
| 1561 | "https://github.com/InsightSoftwareConsortium/"
|
| 1562 | "ITKGenericLabelInterpolator"))
|
| 1563 | (commit module-gli-commit)))
|
| 1564 | (file-name module-gli-file)
|
| 1565 | (sha256
|
| 1566 | (base32
|
| 1567 | "1khakqh6pzdg6csli8jypzrhcdr9xmhnzgwz265krv8r5mbnndrg")))
|
| 1568 | (origin
|
| 1569 | (method git-fetch)
|
| 1570 | (uri (git-reference
|
| 1571 | (url "https://github.com/ntustison/ITKAdaptiveDenoising")
|
| 1572 | (commit module-ad-commit)))
|
| 1573 | (file-name module-ad-file)
|
| 1574 | (sha256
|
| 1575 | (base32
|
| 1576 | "0aqvhb4byg0shgbrwmb41nq2h8sbg45xn0gsdy94iiq0v72bw307")))))
|
| 1577 |
|
| 1578 | |
| 1579 | |
| 1580 | |
| 1581 | (properties '((tunable? . #t)))
|
| 1582 |
|
| 1583 | (home-page "https://github.com/InsightSoftwareConsortium/ITK/")
|
| 1584 | (synopsis "Scientific image processing, segmentation and registration")
|
| 1585 | (description
|
| 1586 | "The Insight Toolkit (ITK) is a toolkit for N-dimensional
|
| 1587 | scientific image processing, segmentation, and registration. Segmentation is
|
| 1588 | the process of identifying and classifying data found in a digitally sampled
|
| 1589 | representation. Typically the sampled representation is an image acquired
|
| 1590 | from such medical instrumentation as CT or MRI scanners. Registration is the
|
| 1591 | task of aligning or developing correspondences between data. For example, in
|
| 1592 | the medical environment, a CT scan may be aligned with a MRI scan in order to
|
| 1593 | combine the information contained in both.")
|
| 1594 | (license license:asl2.0))))
|
| 1595 |
|
| 1596 | |
| 1597 | |
| 1598 | |
| 1599 | |
| 1600 | (define-public insight-toolkit-legacy
|
| 1601 | (hidden-package
|
| 1602 | (package/inherit insight-toolkit
|
| 1603 | |
| 1604 | |
| 1605 | (name "insight-toolkit-legacy")
|
| 1606 | (arguments
|
| 1607 | (substitute-keyword-arguments (package-arguments insight-toolkit)
|
| 1608 | ((#:configure-flags cf '())
|
| 1609 | #~(filter (lambda (flag)
|
| 1610 | (not (or
|
| 1611 | |
| 1612 | |
| 1613 | (string=? "-DITK_WRAPPING=ON" flag)
|
| 1614 | (string=? "-DITK_WRAP_PYTHON=ON" flag)
|
| 1615 | |
| 1616 | (string-prefix? "-DPY_SITE_PACKAGES_PATH=" flag)
|
| 1617 | (string-prefix? "-DITK_USE_PYTHON_LIMITED_API=" flag)
|
| 1618 | (string-prefix? "-DITK_USE_SYSTEM_CASTXML=" flag)
|
| 1619 | (string-prefix? "-DITK_USE_SYSTEM_SWIG=" flag))))
|
| 1620 | #$cf))
|
| 1621 | ((#:phases phases #~%standard-phases)
|
| 1622 | #~(modify-phases #$phases
|
| 1623 | (delete 'python-sanity-check)))))
|
| 1624 | (inputs (modify-inputs inputs
|
| 1625 | (delete "python")))
|
| 1626 | (native-inputs (modify-inputs native-inputs
|
| 1627 | (delete "castxml")
|
| 1628 | (delete "python-numpy")
|
| 1629 | (delete "swig"))))))
|
| 1630 |
|
| 1631 | (define-public itk-snap
|
| 1632 | |
| 1633 | (let ((commit "20f631865372dc7d1f49a1e930d83131102f7a20")
|
| 1634 | (revision "0"))
|
| 1635 | (package
|
| 1636 | (name "itk-snap")
|
| 1637 | (version (git-version "4.4.0" revision commit))
|
| 1638 | (source
|
| 1639 | (origin
|
| 1640 | (method git-fetch)
|
| 1641 | (uri (git-reference
|
| 1642 | (url "https://github.com/pyushkevich/itksnap")
|
| 1643 | (commit commit)))
|
| 1644 | (file-name (git-file-name name version))
|
| 1645 | (sha256
|
| 1646 | (base32 "0zfaiz5lc1fy0n48bwbjgw3yschmscmq9bh0ym05cpaf4sbr4p7l"))))
|
| 1647 | (build-system cmake-build-system)
|
| 1648 | (arguments
|
| 1649 | (list
|
| 1650 | #:configure-flags
|
| 1651 | #~(list "-DSNAP_VERSION_GIT_BRANCH=release")
|
| 1652 | #:phases
|
| 1653 | #~(modify-phases %standard-phases
|
| 1654 | |
| 1655 | |
| 1656 | |
| 1657 | (add-after 'unpack 'do-not-copy-dependencies
|
| 1658 | (lambda _
|
| 1659 | (substitute* "CMakeLists.txt"
|
| 1660 | (("install\\(SCRIPT \\$\\{deploy_script\\}\\)") ""))))
|
| 1661 | (add-after 'unpack 'disable-gui-tests
|
| 1662 | (lambda _
|
| 1663 | |
| 1664 | (substitute* "CMakeLists.txt"
|
| 1665 | ((" (Workspace|DiffSpace|ProbeIntensity|RegionCompetition\
|
| 1666 | |RandomForest|RandomForestBailOut|NaNs|4DContinuousRenderingD|EdgeAttraction\
|
| 1667 | |EchoCartesianDicomLoading|LabelSmoothing|PreferencesDialog|MeshImport\
|
| 1668 | |MeshWorkspace|SegmentationMesh|VolumeRendering|Reloading|4DToMC|MCTo4D\
|
| 1669 | |DeformationGrid)")
|
| 1670 | ""))))
|
| 1671 | (add-after 'unpack 'prepare-submodules
|
| 1672 | (lambda _
|
| 1673 | |
| 1674 | |
| 1675 | (copy-recursively #$(this-package-native-input "c3d-checkout")
|
| 1676 | "Submodules/c3d")
|
| 1677 | (rmdir "Submodules/digestible")
|
| 1678 | (symlink #$(this-package-native-input "digestible-checkout")
|
| 1679 | "Submodules/digestible")
|
| 1680 | (copy-recursively #$(this-package-native-input "greedy-checkout")
|
| 1681 | "Submodules/greedy")))
|
| 1682 | (add-after 'unpack 'remove-bundled-jsoncpp
|
| 1683 | (lambda _
|
| 1684 | (substitute* "CMakeLists.txt"
|
| 1685 | ((" Common/JSon/jsoncpp\\.cpp") ""))))
|
| 1686 | (add-after 'prepare-submodules 'make-reproducible
|
| 1687 | (lambda _
|
| 1688 | (substitute* "CMakeLists.txt"
|
| 1689 | (("TODAY\\(SNAP_VERSION_COMPILE_DATE\\)")
|
| 1690 | "SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")"))
|
| 1691 | (substitute* "Common/SNAPCommon.cxx.in"
|
| 1692 | (("@CMAKE_HOST_SYSTEM@ @CMAKE_HOST_SYSTEM_PROCESSOR@")
|
| 1693 | "(removed for reproducibility)"))
|
| 1694 | (substitute* "Submodules/c3d/ConvertImageVersion.cxx.in"
|
| 1695 | (("@CONVERT3D_VERSION_COMPILE_DATE@")
|
| 1696 | "(removed for reproducibility)"))
|
| 1697 | (substitute* "Submodules/greedy/src/GreedyVersion.cxx.in"
|
| 1698 | (("@GREEDY_VERSION_COMPILE_DATE@")
|
| 1699 | "(removed for reproducibility)"))))
|
| 1700 | (add-before 'check 'prepare-tests
|
| 1701 | (lambda _
|
| 1702 | |
| 1703 | (setenv "HOME" "/tmp")))
|
| 1704 | (add-after 'install 'wrap-executable
|
| 1705 | (lambda _
|
| 1706 | (wrap-program (string-append #$output "/bin/itksnap")
|
| 1707 | (list
|
| 1708 | "QT_PLUGIN_PATH"
|
| 1709 | 'suffix
|
| 1710 | (list (string-append #$(this-package-input "qtbase")
|
| 1711 | "/lib/qt6/plugins")
|
| 1712 | (string-append #$(this-package-input "qtdeclarative")
|
| 1713 | "/lib/qt6/plugins")
|
| 1714 | (string-append #$(this-package-input "qtwayland")
|
| 1715 | "/lib/qt6/plugins"))))
|
| 1716 | |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | (substitute* (string-append #$output "/bin/itksnap")
|
| 1722 | (("exec -a \"\\$\\{0##\\*/\\}\" ")
|
| 1723 | "exec ")))))))
|
| 1724 | (inputs
|
| 1725 | (list curl
|
| 1726 | freetype
|
| 1727 | glew
|
| 1728 | glu
|
| 1729 | insight-toolkit-legacy
|
| 1730 | jsoncpp
|
| 1731 | libssh
|
| 1732 | mesa-opencl
|
| 1733 | qtbase
|
| 1734 | qtdeclarative
|
| 1735 | qtwayland
|
| 1736 | vtk-9.5))
|
| 1737 | (native-inputs
|
| 1738 | (list
|
| 1739 | doxygen
|
| 1740 | qttools
|
| 1741 | |
| 1742 | (origin
|
| 1743 | (method git-fetch)
|
| 1744 | (uri (git-reference
|
| 1745 | (url "https://github.com/pyushkevich/c3d")
|
| 1746 | (commit "d4d963629d7dfdca4b0607907f0e91827c22ea2a")))
|
| 1747 | (file-name "c3d-checkout")
|
| 1748 | (sha256
|
| 1749 | (base32 "15yh2rdynql99yy5hanq5rha1pry9c3ryb7bfy47vvyqksk0znvs")))
|
| 1750 | (origin
|
| 1751 | (method git-fetch)
|
| 1752 | (uri (git-reference
|
| 1753 | (url "https://github.com/pyushkevich/digestible")
|
| 1754 | (commit "1b66709e99c43d280bb472e1a0e36185ef2ea412")))
|
| 1755 | (file-name "digestible-checkout")
|
| 1756 | (sha256
|
| 1757 | (base32 "1m1b954prq6l3byfdgxw2y17xsg81agd516g5n6ps60dqnxw8hqs")))
|
| 1758 | (origin
|
| 1759 | (method git-fetch)
|
| 1760 | (uri (git-reference
|
| 1761 | (url "https://github.com/pyushkevich/greedy")
|
| 1762 | (commit "2d5dfa1891ac726524495d4ca8a3461be86c12f5")))
|
| 1763 | (file-name "greedy-checkout")
|
| 1764 | (sha256
|
| 1765 | (base32 "13rz423p7p95ca94c5njr8jxbcic1hp8iqap613zlxmvl4n9vx15")))))
|
| 1766 | (home-page "https://sourceforge.net/p/itk-snap/")
|
| 1767 | (synopsis "Medical image segmentation")
|
| 1768 | (description "ITK-SNAP is a tool for segmenting anatomical structures in
|
| 1769 | medical images. It provides an automatic active contour segmentation
|
| 1770 | pipeline, along with supporting a manual segmentation toolbox. ITK-SNAP has a
|
| 1771 | full-featured UI aimed at clinical researchers.")
|
| 1772 | |
| 1773 | (license license:gpl3+))))
|
| 1774 |
|
| 1775 | (define-public elastix
|
| 1776 | (package
|
| 1777 | (name "elastix")
|
| 1778 | (version "5.3.0")
|
| 1779 | (source
|
| 1780 | (origin
|
| 1781 | (method git-fetch)
|
| 1782 | (uri (git-reference
|
| 1783 | (url "https://github.com/SuperElastix/elastix")
|
| 1784 | (commit version)))
|
| 1785 | (file-name (git-file-name name version))
|
| 1786 | (sha256
|
| 1787 | (base32 "0sgw4cz4x6f78n6iqn87ll6wad32y67lmzvqfdfw1pzjkxbwzwyr"))
|
| 1788 | (patches
|
| 1789 | (search-patches "elastix-1404.patch"))))
|
| 1790 | (properties '((tunable? . #t)))
|
| 1791 | (build-system cmake-build-system)
|
| 1792 | (arguments
|
| 1793 | (list
|
| 1794 | #:configure-flags
|
| 1795 | #~(list "-DELASTIX_USE_EIGEN=ON"
|
| 1796 | "-DELASTIX_ENABLE_PACKAGER:BOOL=OFF"
|
| 1797 | "-DELASTIX_BUILD_EXECUTABLE:BOOL=ON"
|
| 1798 | "-DCMAKE_CXX_FLAGS=-fPIC"
|
| 1799 | "-DCMAKE_CXX_STANDARD=17"
|
| 1800 | "-DBUILD_TESTING:BOOL=ON")
|
| 1801 | |
| 1802 | #:test-exclude (string-join
|
| 1803 | (list "elastix_run_example_COMPARE_IM"
|
| 1804 | (string-append "elastix_run_3DCT_lung.MI.bspline."
|
| 1805 | "ASGD.001_COMPARE_TP"))
|
| 1806 | "|")))
|
| 1807 | (inputs (list charls
|
| 1808 | dcmtk
|
| 1809 | eigen
|
| 1810 | fftw
|
| 1811 | insight-toolkit
|
| 1812 | libpng
|
| 1813 | libtiff
|
| 1814 | zlib))
|
| 1815 | (home-page "https://elastix.dev/")
|
| 1816 | (synopsis "Image registration toolbox")
|
| 1817 | (description
|
| 1818 | "Elastix is a toolbox for rigid and nonrigid registration of images. The
|
| 1819 | software consists of a collection of algorithms that are commonly used to
|
| 1820 | perform (medical) image registration: the task of finding a spatial
|
| 1821 | transformation, mapping one image (the fixed image) to another (the moving
|
| 1822 | image), by optimizing relevant image similarity metrics.")
|
| 1823 | (license license:asl2.0)))
|
| 1824 |
|
| 1825 | (define-public metapixel
|
| 1826 | |
| 1827 | (let ((commit "98ee9daa093b6c334941242e63f90b1c2876eb4f"))
|
| 1828 | (package
|
| 1829 | (name "metapixel")
|
| 1830 | (version (git-version "1.0.2" "1" commit))
|
| 1831 | (source
|
| 1832 | (origin
|
| 1833 | (method git-fetch)
|
| 1834 | (uri (git-reference
|
| 1835 | (url "https://github.com/schani/metapixel")
|
| 1836 | (commit commit)
|
| 1837 | |
| 1838 | (recursive? #t)))
|
| 1839 | (file-name (git-file-name name version))
|
| 1840 | (sha256
|
| 1841 | (base32 "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"))))
|
| 1842 | (build-system gnu-build-system)
|
| 1843 | (arguments
|
| 1844 | (list
|
| 1845 | #:tests? #f |
| 1846 | #:make-flags
|
| 1847 | #~(list
|
| 1848 | (string-append "PREFIX=" #$output)
|
| 1849 | (format #f "MANPAGE_XSL=~a/xml/xsl/~a-~a/manpages/docbook.xsl"
|
| 1850 | #$(this-package-native-input "docbook-xsl")
|
| 1851 | #$(package-name
|
| 1852 | (this-package-native-input "docbook-xsl"))
|
| 1853 | #$(package-version
|
| 1854 | (this-package-native-input "docbook-xsl"))))
|
| 1855 | #:phases
|
| 1856 | #~(modify-phases %standard-phases
|
| 1857 | (delete 'configure)
|
| 1858 | (add-before 'install 'fix-directory-creation
|
| 1859 | (lambda _
|
| 1860 | (mkdir-p (string-append #$output "/share/man/man1")))))))
|
| 1861 | (inputs
|
| 1862 | (list giflib libjpeg-turbo libpng
|
| 1863 | perl))
|
| 1864 | (native-inputs
|
| 1865 | (list docbook-xml-4.2 docbook-xsl
|
| 1866 | libxslt pkg-config))
|
| 1867 | (home-page "https://www.complang.tuwien.ac.at/schani/metapixel/")
|
| 1868 | (synopsis "Photomosaics generator")
|
| 1869 | (description "Metapixel is a program for generating photomosaics. It can
|
| 1870 | generate classical photomosaics, in which the source image is viewed as a
|
| 1871 | matrix of equally sized rectangles for each of which a matching image is
|
| 1872 | substituted, as well as collage-style photomosaics, in which rectangular parts
|
| 1873 | of the source image at arbitrary positions (i.e. not aligned to a matrix) are
|
| 1874 | substituted by matching images.")
|
| 1875 | (license license:gpl2))))
|
| 1876 |
|
| 1877 | (define-public scantailor-advanced
|
| 1878 | (let ((commit "3d1e74e6ace413733511086934a66f4e3f7a6027"))
|
| 1879 | (package
|
| 1880 | (name "scantailor-advanced")
|
| 1881 | (version (string-append "1.0.16-" (string-take commit 7)))
|
| 1882 | (source
|
| 1883 | (origin
|
| 1884 | (method git-fetch)
|
| 1885 | (uri (git-reference
|
| 1886 | (url "https://github.com/4lex4/scantailor-advanced")
|
| 1887 | (commit commit)))
|
| 1888 | (file-name (git-file-name name version))
|
| 1889 | (sha256
|
| 1890 | (base32
|
| 1891 | "0kixwjb2x457dq7927hkh34c803p7yh1pmn6n61rk9shqrcg492h"))))
|
| 1892 | (build-system qt-build-system)
|
| 1893 | (arguments
|
| 1894 | (list
|
| 1895 | #:phases
|
| 1896 | #~(modify-phases %standard-phases
|
| 1897 | |
| 1898 | (add-after 'unpack 'disable-failing-tests
|
| 1899 | (lambda _
|
| 1900 | (setenv "ARGS" "--exclude-regex \"imageproc_.*\""))))))
|
| 1901 | (native-inputs
|
| 1902 | (list qttools-5))
|
| 1903 | (inputs
|
| 1904 | (list boost
|
| 1905 | libjpeg-turbo
|
| 1906 | libpng
|
| 1907 | libtiff
|
| 1908 | qtbase-5
|
| 1909 | qtsvg-5
|
| 1910 | qtwayland-5
|
| 1911 | zlib))
|
| 1912 | (home-page "https://github.com/4lex4/scantailor-advanced")
|
| 1913 | (synopsis "Clean up scanned pages")
|
| 1914 | (description "Scan Tailor is an interactive post-processing tool for
|
| 1915 | scanned pages. It performs operations such as page splitting, deskewing,
|
| 1916 | adding/removing borders, and others. You give it raw scans, and you get pages
|
| 1917 | ready to be printed or assembled into a PDF or DJVU file. Scanning, optical
|
| 1918 | character recognition, and assembling multi-page documents are out of scope of
|
| 1919 | this project.
|
| 1920 |
|
| 1921 | Scan Tailer Advanced is a fork of Scan Tailer that merges Scan Tailor Featured
|
| 1922 | and Scan Tailor Enhanced versions as well as including many more bug fixes.")
|
| 1923 | (license license:gpl3+))))
|
| 1924 |
|
| 1925 | (define-public simpleitk
|
| 1926 | (package
|
| 1927 | (name "simpleitk")
|
| 1928 | (version "2.5.4")
|
| 1929 | (source
|
| 1930 | (origin
|
| 1931 | (method git-fetch)
|
| 1932 | (uri (git-reference
|
| 1933 | (url "https://github.com/SimpleITK/SimpleITK")
|
| 1934 | (commit (string-append "v" version))))
|
| 1935 | (file-name (git-file-name name version))
|
| 1936 | (sha256
|
| 1937 | (base32 "1bzj5naqbgv2b31iqgz7qqk9rixsvjqycjz6l7w3gm7v1aj14jpb"))
|
| 1938 | (patches
|
| 1939 | (search-patches "simpleitk-r-4.6.0.patch"))))
|
| 1940 | (build-system cmake-build-system)
|
| 1941 | (outputs '("out" "python" "r"))
|
| 1942 | (arguments
|
| 1943 | (list
|
| 1944 | #:configure-flags
|
| 1945 | #~(list "-DBUILD_SHARED_LIBS=ON"
|
| 1946 | "-DWRAP_LUA=OFF"
|
| 1947 | "-DWRAP_PYTHON=ON"
|
| 1948 | "-DWRAP_R=ON"
|
| 1949 | "-DSimpleITK_USE_ELASTIX=ON"
|
| 1950 | "-DSimpleITK_PYTHON_USE_VIRTUALENV=OFF")
|
| 1951 | #:phases
|
| 1952 | #~(modify-phases %standard-phases
|
| 1953 | (add-after 'unpack 'early-GTest-discovery
|
| 1954 | (lambda _
|
| 1955 | |
| 1956 | (substitute* "Testing/Unit/CMakeLists.txt"
|
| 1957 | (("add_subdirectory\\(TestBase\\)" anchor)
|
| 1958 | (string-append "find_package(GTest REQUIRED)\n" anchor)))))
|
| 1959 | (add-after 'unpack 'extract-test-data
|
| 1960 | (lambda _
|
| 1961 | (invoke "tar" "xvf"
|
| 1962 | #$(this-package-native-input
|
| 1963 | (string-append "SimpleITKData-" version ".tar.gz"))
|
| 1964 | "--strip-components=1")))
|
| 1965 | (add-after 'unpack 'fix-runpath
|
| 1966 | (lambda _
|
| 1967 | |
| 1968 | |
| 1969 | (define (cmake-snippet start)
|
| 1970 | (string-append
|
| 1971 | start
|
| 1972 | "set_target_properties(${SWIG_MODULE_SimpleITK_TARGET_NAME} "
|
| 1973 | "PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE "
|
| 1974 | "INSTALL_RPATH \"" #$output "/lib\")\n"))
|
| 1975 | (substitute* "Wrapping/Python/CMakeLists.txt"
|
| 1976 | (("^set\\(SWIG_MODULE_SimpleITKPython.*" anchor)
|
| 1977 | (cmake-snippet anchor)))
|
| 1978 | (substitute* "Wrapping/R/CMakeLists.txt"
|
| 1979 | (("^set\\(SWIG_MODULE_SimpleITKR.*" anchor)
|
| 1980 | (cmake-snippet anchor)))))
|
| 1981 | (add-after 'unpack 'patch-cmake-config-itk-path
|
| 1982 | (lambda _
|
| 1983 | |
| 1984 | |
| 1985 | #$(let*
|
| 1986 | ((itk (this-package-input "insight-toolkit"))
|
| 1987 | (itk-version (package-version itk))
|
| 1988 | (itk-version-major+minor
|
| 1989 | (version-major+minor itk-version)))
|
| 1990 | #~(substitute* "SimpleITKConfig.cmake.in"
|
| 1991 | (((string-append
|
| 1992 | "find_package\\(ITK \"@ITK_VERSION@\" "
|
| 1993 | "EXACT REQUIRED\\)"))
|
| 1994 | (string-append
|
| 1995 | "find_package(ITK \"" #$itk-version
|
| 1996 | "\" EXACT REQUIRED PATHS " #$itk
|
| 1997 | "/lib/cmake/ITK-"
|
| 1998 | #$itk-version-major+minor ")"))))))
|
| 1999 | |
| 2000 | (add-after 'unpack 'skip-one-elastix-test
|
| 2001 | (lambda _
|
| 2002 | (substitute* "Testing/Unit/sitkElastixImageFilterTests.cxx"
|
| 2003 | (("TEST\\(ElastixImageFilter, DefaultParameterMaps\\)")
|
| 2004 | "TEST(ElastixImageFilter, DISABLED_DefaultParameterMaps)"))))
|
| 2005 | (add-after 'install 'install-language-extension-modules
|
| 2006 | (lambda _
|
| 2007 | (with-directory-excursion "Wrapping/Python"
|
| 2008 | (invoke "python3" "setup.py" "bdist_wheel")
|
| 2009 | (apply invoke "pip" "--no-cache-dir" "--no-input" "install"
|
| 2010 | "--no-deps" "--prefix" #$output:python
|
| 2011 | (find-files "dist" "\\.whl$")))
|
| 2012 | (let ((r-package-path
|
| 2013 | (string-append #$output:r "/site-library/SimpleITK")))
|
| 2014 | (mkdir-p r-package-path)
|
| 2015 | (copy-recursively "Wrapping/R/R_libs/SimpleITK"
|
| 2016 | r-package-path))))
|
| 2017 | (delete 'check)
|
| 2018 | (add-after 'install 'check-after-install
|
| 2019 | |
| 2020 | |
| 2021 | (assoc-ref %standard-phases 'check)))))
|
| 2022 | (home-page "https://simpleitk.org")
|
| 2023 | (inputs (list elastix insight-toolkit python r-minimal))
|
| 2024 | (native-inputs
|
| 2025 | (list googletest
|
| 2026 | lua
|
| 2027 | nss-certs-for-test |
| 2028 | python-numpy |
| 2029 | python-pip
|
| 2030 | python-setuptools
|
| 2031 | swig-4.4
|
| 2032 | (origin
|
| 2033 | (method url-fetch)
|
| 2034 | (uri (string-append
|
| 2035 | "https://github.com/SimpleITK/SimpleITK/releases/download/v"
|
| 2036 | version "/SimpleITKData-" version ".tar.gz"))
|
| 2037 | (sha256
|
| 2038 | (base32
|
| 2039 | "0hryvi9fgqac00ng1bfhw3lm0al1dh0ka6jglba2q368nls428nx")))))
|
| 2040 | (synopsis "Simplified interface to @acronym{ITK, Insight Toolkit}")
|
| 2041 | (description
|
| 2042 | "SimpleITK is an image analysis toolkit built on top of @acronym{ITK,
|
| 2043 | Insight Toolkit}. It provides a simplified interface to most of the
|
| 2044 | image filters and the input/output and registration frameworks in
|
| 2045 | @acronym{ITK, Insight Toolkit}. It is written in C++ and provides
|
| 2046 | bindings for interpreted languages. This package includes the C++,
|
| 2047 | Python and R interfaces.")
|
| 2048 | (license license:asl2.0)))
|
| 2049 |
|
| 2050 | (define-public python-imgviz
|
| 2051 | (package
|
| 2052 | (name "python-imgviz")
|
| 2053 | (version "1.7.6")
|
| 2054 | (source
|
| 2055 | (origin
|
| 2056 | |
| 2057 | (method git-fetch)
|
| 2058 | (uri (git-reference
|
| 2059 | (url "https://github.com/wkentaro/imgviz")
|
| 2060 | (commit (string-append "v" version))))
|
| 2061 | (file-name (git-file-name name version))
|
| 2062 | (sha256
|
| 2063 | (base32 "0z7nwnvqh3hbbccf7v56398aiiwqs68kyrgc5vsmmh1cp4pwrgnb"))))
|
| 2064 | (build-system pyproject-build-system)
|
| 2065 | (native-inputs
|
| 2066 | (list python-pytest
|
| 2067 | python-hatchling
|
| 2068 | python-hatch-vcs
|
| 2069 | python-hatch-fancy-pypi-readme))
|
| 2070 | (propagated-inputs
|
| 2071 | (list python-matplotlib
|
| 2072 | python-numpy
|
| 2073 | python-pillow
|
| 2074 | python-pyyaml))
|
| 2075 | (home-page "http://github.com/wkentaro/imgviz")
|
| 2076 | (synopsis "Image Visualization Tools")
|
| 2077 | (description "Python library for object detection, semantic and instance
|
| 2078 | segmentation.")
|
| 2079 | (license license:expat)))
|
| 2080 |
|
| 2081 | (define-public python-pims
|
| 2082 | (package
|
| 2083 | (name "python-pims")
|
| 2084 | (version "0.7")
|
| 2085 | (source
|
| 2086 | (origin
|
| 2087 | (method url-fetch)
|
| 2088 | (uri (pypi-uri "pims" version))
|
| 2089 | (sha256
|
| 2090 | (base32 "0swlh8g4kf8p24g0ghkmwcj9y45rc59lmqx459nhhmhj6167m42m"))))
|
| 2091 | (build-system pyproject-build-system)
|
| 2092 | (arguments
|
| 2093 | (list
|
| 2094 | #:test-flags
|
| 2095 | |
| 2096 | |
| 2097 | '(list "--ignore=pims/tests/test_common.py"
|
| 2098 | "--ignore=pims/tests/test_imseq.py"
|
| 2099 | "--ignore=pims/tests/test_norpix.py")
|
| 2100 | #:phases
|
| 2101 | #~(modify-phases %standard-phases
|
| 2102 | (add-after 'unpack 'relax-requirements
|
| 2103 | (lambda _
|
| 2104 | (substitute* "setup.py"
|
| 2105 | (("'slicerator>=.*',")
|
| 2106 | "'slicerator',")))))))
|
| 2107 | (native-inputs
|
| 2108 | (list python-pytest python-setuptools))
|
| 2109 | (propagated-inputs
|
| 2110 | (list python-imageio python-numpy python-slicerator))
|
| 2111 | (home-page "https://github.com/soft-matter/pims")
|
| 2112 | (synopsis "Python Image Sequence")
|
| 2113 | (description "Scientific video can be packaged in various ways: familiar
|
| 2114 | video formats like @file{.AVI} and @file{.MOV}, folders full of numbered
|
| 2115 | images, or \"stacks\" of TIFF images. Each of these requires a separate
|
| 2116 | Python module. And, once loaded, they have different methods for accessing
|
| 2117 | individual images, looping through the images in bulk, accessing a specific
|
| 2118 | range, or dealing with multidimensional files. PIMS can do all of these using
|
| 2119 | a consistent interface, handling the differences between different inputs
|
| 2120 | invisibly.")
|
| 2121 | (license license:bsd-3)))
|
| 2122 |
|
| 2123 | (define-public python-spatial-image
|
| 2124 | (package
|
| 2125 | (name "python-spatial-image")
|
| 2126 | (version "1.0.0")
|
| 2127 | (source
|
| 2128 | (origin
|
| 2129 | (method url-fetch)
|
| 2130 | (uri (pypi-uri "spatial_image" version))
|
| 2131 | (sha256
|
| 2132 | (base32 "0blyjwgv6bqpg7r3f4dcs7x27ysfm8n9y0zk5j7dxj74lma3wdsm"))))
|
| 2133 | (build-system pyproject-build-system)
|
| 2134 | (propagated-inputs (list python-numpy python-pytest python-pytest-mypy
|
| 2135 | python-xarray python-xarray-dataclasses))
|
| 2136 | (native-inputs (list python-flit-core python-pytest))
|
| 2137 | (home-page "https://github.com/spatial-image/spatial-image")
|
| 2138 | (synopsis "Multi-dimensional spatial image data structure")
|
| 2139 | (description "This package implements a multi-dimensional spatial image
|
| 2140 | data structure for scientific Python.
|
| 2141 |
|
| 2142 | To facilitate:
|
| 2143 |
|
| 2144 | @itemize
|
| 2145 | @item Multi-scale processing and analysis
|
| 2146 | @item Registration
|
| 2147 | @item Resampling
|
| 2148 | @item Subregion parallel processing
|
| 2149 | @item Coupling with meshes, point sets, and annotations
|
| 2150 | @end itemize
|
| 2151 |
|
| 2152 | with scientific images, which are typically multi-dimensional with anisotropic
|
| 2153 | sampling, this package provides a spatial-image data structure. In addition
|
| 2154 | to an N-dimensional array of pixel values, spatial metadata defines the
|
| 2155 | location of the pixel sampling grid in space time. It also labels the array
|
| 2156 | dimensions. This metadata is easily utilized and carried through image
|
| 2157 | processing pipelines.")
|
| 2158 | (license license:expat)))
|
| 2159 |
|
| 2160 | (define-public labelme
|
| 2161 | (package
|
| 2162 | (name "labelme")
|
| 2163 | |
| 2164 | |
| 2165 | (version "5.2.1")
|
| 2166 | (source
|
| 2167 | (origin
|
| 2168 | |
| 2169 | (method git-fetch)
|
| 2170 | (uri (git-reference
|
| 2171 | (url "https://github.com/wkentaro/labelme")
|
| 2172 | (commit (string-append "v" version))))
|
| 2173 | (file-name (git-file-name name version))
|
| 2174 | (sha256
|
| 2175 | (base32 "1xpyad6rlkxyx51jaai4xhdy15k1gvm62xnkjn152hc1vj1c77sr"))))
|
| 2176 | (build-system pyproject-build-system)
|
| 2177 | (arguments
|
| 2178 | (list
|
| 2179 | #:test-flags
|
| 2180 | #~(list "-m" "not gpu"
|
| 2181 | |
| 2182 | "--ignore=tests/docs_tests/man_tests/test_labelme_1.py")
|
| 2183 | #:phases
|
| 2184 | #~(modify-phases %standard-phases
|
| 2185 | (add-before 'check 'start-xserver
|
| 2186 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2187 | (let ((xorg-server #$(this-package-native-input "xorg-server")))
|
| 2188 | |
| 2189 | (system (string-append xorg-server "/bin/Xvfb :99 -screen 0 "
|
| 2190 | "1920x1200x24 -ac +extension GLX +render "
|
| 2191 | "-noreset &"))
|
| 2192 | (setenv "DISPLAY" ":99.0")))))))
|
| 2193 | (native-inputs
|
| 2194 | (list python-pytest
|
| 2195 | python-pytest-qt
|
| 2196 | python-setuptools
|
| 2197 | xorg-server-for-tests))
|
| 2198 | (propagated-inputs
|
| 2199 | (list python-imgviz
|
| 2200 | python-matplotlib
|
| 2201 | python-natsort
|
| 2202 | python-numpy
|
| 2203 | python-pillow
|
| 2204 | python-pyqt
|
| 2205 | python-pyyaml
|
| 2206 | python-qtpy
|
| 2207 | python-termcolor))
|
| 2208 | (home-page "https://github.com/wkentaro/labelme")
|
| 2209 | (synopsis "Image Polygonal Annotation")
|
| 2210 | (description
|
| 2211 | "Image and video labeling tool supporting different shapes like polygons,
|
| 2212 | rectangles, circles, lines, points and VOC/COCO export.")
|
| 2213 | (license license:gpl3+)))
|
| 2214 |
|
| 2215 | (define-public charls
|
| 2216 | (package
|
| 2217 | (name "charls")
|
| 2218 | (version "2.4.2")
|
| 2219 | (source (origin
|
| 2220 | (method git-fetch)
|
| 2221 | (uri (git-reference
|
| 2222 | (url "https://github.com/team-charls/charls/")
|
| 2223 | (commit (string-append version))))
|
| 2224 | (file-name (git-file-name name version))
|
| 2225 | (sha256
|
| 2226 | (base32
|
| 2227 | "0vp6mjjm6hi2r1swwvbg86asvn604w58nam7yvqk1qr13aizjl71"))))
|
| 2228 | (build-system cmake-build-system)
|
| 2229 | (arguments
|
| 2230 | `(#:configure-flags '("-DCMAKE_BUILD_TYPE:STRING=Release"
|
| 2231 | "-DBUILD_SHARED_LIBS=On")))
|
| 2232 | (native-inputs (list git pkg-config))
|
| 2233 | (home-page "https://github.com/team-charls/charls")
|
| 2234 | (synopsis "Library for using JPEG-LS compliant images")
|
| 2235 | (description
|
| 2236 | "CharLS is a codec library that can be used to build applications that
|
| 2237 | can handle JPEG-LS compliant images. In the application you are writing you
|
| 2238 | can call the CharLS codec and pass it images (sometimes called raster bitmaps),
|
| 2239 | to have them encoded to JPEG-LS, or JPEG-LS streams, which CharLS will decode
|
| 2240 | to images.")
|
| 2241 | (license license:bsd-3)))
|
| 2242 |
|
| 2243 | (define-public libansilove
|
| 2244 | (package
|
| 2245 | (name "libansilove")
|
| 2246 | (version "1.4.1")
|
| 2247 | (source (origin
|
| 2248 | (method git-fetch)
|
| 2249 | (uri (git-reference
|
| 2250 | (url "https://github.com/ansilove/libansilove")
|
| 2251 | (commit (string-append version))))
|
| 2252 | (file-name (git-file-name name version))
|
| 2253 | (sha256
|
| 2254 | (base32
|
| 2255 | "169njlck4a2bmf1kmjas1w594hyda543ykdnwg7fwkviij39l9z6"))))
|
| 2256 | (build-system cmake-build-system)
|
| 2257 | (arguments
|
| 2258 | (list #:tests? #f)) |
| 2259 | (native-inputs
|
| 2260 | (list gd))
|
| 2261 | (home-page "https://www.ansilove.org/")
|
| 2262 | (synopsis "Library for converting ANSI, ASCII, and other formats to PNG")
|
| 2263 | (description
|
| 2264 | "libansilove is a library for converting artscene file types to PNG images,
|
| 2265 | including ANSI (.ANS) and many others. The library primarily serves to support
|
| 2266 | the ansilove tool.")
|
| 2267 | (license license:bsd-2)))
|
| 2268 |
|
| 2269 | (define-public ansilove
|
| 2270 | (package
|
| 2271 | (name "ansilove")
|
| 2272 | (version "4.2.0")
|
| 2273 | (source (origin
|
| 2274 | (method git-fetch)
|
| 2275 | (uri (git-reference
|
| 2276 | (url "https://github.com/ansilove/ansilove")
|
| 2277 | (commit (string-append version))))
|
| 2278 | (file-name (git-file-name name version))
|
| 2279 | (sha256
|
| 2280 | (base32
|
| 2281 | "1h9r759krjl8wi68yxs1d46qfrx6v89a8vmmv3aqym8vn9x430kh"))))
|
| 2282 | (build-system cmake-build-system)
|
| 2283 | (native-inputs
|
| 2284 | (list libansilove))
|
| 2285 | (home-page "https://www.ansilove.org/")
|
| 2286 | (synopsis "ANSI and ASCII art to PNG converter")
|
| 2287 | (description
|
| 2288 | "AnsiLove is an ANSI and ASCII art to PNG converter, allowing to convert
|
| 2289 | ANSI and artscene-related file formats into PNG images, supporting ANSI (.ANS),
|
| 2290 | PCBoard (.PCB), Binary (.BIN), Artworx (.ADF), iCE Draw (.IDF), Tundra (.TND)
|
| 2291 | and XBin (.XB) formats.")
|
| 2292 | (license license:bsd-2)))
|