gnu: Add vxl.
[jackhill/guix/guix.git] / gnu / packages / image-processing.scm
CommitLineData
504c285d
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 John Darrington <jmd@gnu.org>
18696f7a 3;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
fb226b43
JD
4;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
5;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
882d579d 7;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
62834314 8;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e506b5e9 9;;; Copyright © 2018 Lprndn <guix@lprndn.info>
6949f45c 10;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
504c285d
JD
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages image-processing)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (guix download)
6c56e9c4 32 #:use-module (guix git-download)
cdb2a211 33 #:use-module (guix build-system cmake)
504c285d
JD
34 #:use-module (guix build-system gnu)
35 #:use-module (gnu packages)
cdb2a211 36 #:use-module (gnu packages algebra)
e506b5e9 37 #:use-module (gnu packages bison)
cdb2a211 38 #:use-module (gnu packages boost)
504c285d
JD
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages documentation)
e506b5e9 41 #:use-module (gnu packages flex)
fb226b43 42 #:use-module (gnu packages fontutils)
02e1acfb 43 #:use-module (gnu packages geo)
5bbd6931 44 #:use-module (gnu packages ghostscript)
fb226b43 45 #:use-module (gnu packages gl)
5bbd6931 46 #:use-module (gnu packages glib)
cdb2a211
JD
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages graphics)
49 #:use-module (gnu packages graphviz)
5bbd6931 50 #:use-module (gnu packages gstreamer)
62834314 51 #:use-module (gnu packages gtk)
504c285d 52 #:use-module (gnu packages image)
5bbd6931 53 #:use-module (gnu packages imagemagick)
cdb2a211 54 #:use-module (gnu packages maths)
5bbd6931 55 #:use-module (gnu packages pdf)
cdb2a211 56 #:use-module (gnu packages perl)
62834314 57 #:use-module (gnu packages photo)
cdb2a211 58 #:use-module (gnu packages pkg-config)
62834314 59 #:use-module (gnu packages protobuf)
cdb2a211 60 #:use-module (gnu packages python)
44d10b1f 61 #:use-module (gnu packages python-xyz)
fb226b43 62 #:use-module (gnu packages serialization)
8486a80d 63 #:use-module (gnu packages tls)
62834314 64 #:use-module (gnu packages video)
fb226b43 65 #:use-module (gnu packages xiph)
cdb2a211 66 #:use-module (gnu packages xml)
ebe0271a 67 #:use-module (gnu packages xorg)
18696f7a
RW
68 #:use-module (ice-9 match)
69 #:use-module (srfi srfi-1))
504c285d 70
504c285d
JD
71(define-public dcmtk
72 (package
73 (name "dcmtk")
882d579d
TGR
74 (version "3.6.4")
75 (source
76 (origin
77 (method url-fetch)
78 (uri
79 (string-append "ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/"
80 "dcmtk" (string-join (string-split version #\.) "")
81 "/dcmtk-" version ".tar.gz"))
82 (sha256
83 (base32 "1h22z8g0kmvhg8lgkbikyzyphhvxvq6018a00yd6i4g0z9ag6gx9"))))
84 (build-system cmake-build-system)
504c285d 85 (inputs
8486a80d
TGR
86 `(;; Our ICU is too recent: “error: ‘UChar’ does not name a type“.
87 ;; ("icu4c" ,icu4c)
88 ("libjpeg" ,libjpeg)
504c285d 89 ("libpng" ,libpng)
882d579d 90 ("libtiff" ,libtiff)
8486a80d
TGR
91 ("libxml2" ,libxml2)
92 ("openssl" ,openssl)
504c285d
JD
93 ("zlib" ,zlib)))
94 (native-inputs
882d579d 95 `(("doxygen" ,doxygen))) ; for HTML documentation
d2ad4f2e 96 (home-page "https://dcmtk.org")
504c285d
JD
97 (synopsis "Libraries and programs implementing parts of the DICOM standard")
98 (description "DCMTK is a collection of libraries and applications
99implementing large parts the DICOM standard. It includes software for
100examining, constructing and converting DICOM image files, handling offline
101media, sending and receiving images over a network connection, as well as
102demonstrative image storage and worklist servers.")
103 (license (license:fsf-free
104 "file://COPYRIGHT"
105 "A union of the Apache 2.0 licence and various non-copyleft
106licences similar to the Modified BSD licence."))))
cdb2a211
JD
107
108(define-public mia
109 (package
110 (name "mia")
11861d2b 111 (version "2.4.6")
cdb2a211
JD
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/mia/mia/"
115 (version-major+minor version)
116 "/mia-" version ".tar.xz"))
117 (sha256
118 (base32
11861d2b 119 "0j4nd5z7i3v199jh7hqqhwd4g7snchizkc7rhzanpvngqg91m1pb"))))
cdb2a211
JD
120 (build-system cmake-build-system)
121 (arguments
122 `(#:configure-flags
123 (list "-DMIA_CREATE_NIPYPE_INTERFACES=0"
cdb2a211
JD
124 "-DCMAKE_CXX_FLAGS=-fpermissive")))
125 (inputs
126 `(("boost" ,boost)
127 ("dcmtk" ,dcmtk)
128 ("doxygen" ,doxygen)
129 ("eigen" ,eigen)
130 ("fftw" ,fftw)
131 ("fftwf" ,fftwf)
132 ("gsl" ,gsl)
133 ("gts" ,gts)
134 ("hdf5" ,hdf5)
135 ("itpp" ,itpp)
136 ("libjpeg" ,libjpeg)
137 ("libpng" ,libpng)
138 ("libtiff" ,libtiff)
139 ("libxml" ,libxml2)
140 ("libxml++" ,libxml++)
141 ("maxflow" ,maxflow)
142 ("niftilib" ,niftilib)
143 ("nlopt" ,nlopt)
144 ("openexr" ,openexr)
145 ("python-lxml" ,python2-lxml)
146 ("vtk" ,vtk)))
147 (native-inputs
148 `(("pkg-config" ,pkg-config)
149 ("python" ,python-2)))
150 (home-page "http://mia.sourceforge.net")
151 (synopsis "Toolkit for gray scale medical image analysis")
152 (description "MIA provides a combination of command line tools, plug-ins,
153and libraries that make it possible run image processing tasks interactively
154in a command shell and to prototype using the shell's scripting language. It
155is built around a plug-in structure that makes it easy to add functionality
156without compromising the original code base and it makes use of a wide variety
157of external libraries that provide additional functionality.")
158 (license license:gpl3+)))
fb226b43
JD
159
160(define-public vtk
161 (package
162 (name "vtk")
8f8bc406 163 (version "8.2.0")
fb226b43
JD
164 (source (origin
165 (method url-fetch)
f1d4f264 166 (uri (string-append "https://vtk.org/files/release/"
fb226b43
JD
167 (version-major+minor version)
168 "/VTK-" version ".tar.gz"))
169 (sha256
170 (base32
8f8bc406 171 "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))))
fb226b43
JD
172 (build-system cmake-build-system)
173 (arguments
174 '(#:build-type "Release" ;Build without '-g' to save space.
175 ;; -DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE requires netcdf_cxx
176 #:configure-flags '("-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
177 "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
178 "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
179 "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
180 "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
181 "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
182 "-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=TRUE"
183 "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
184 "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
185 "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
186 #:tests? #f)) ;XXX: no "test" target
187 (inputs
188 `(("libXt" ,libxt)
6a6db57f 189 ("xorgproto" ,xorgproto)
fb226b43
JD
190 ("libX11" ,libx11)
191 ("libxml2" ,libxml2)
192 ("mesa" ,mesa)
193 ("glu" ,glu)
194 ("expat" ,expat)
195 ("freetype" ,freetype)
196 ("hdf5" ,hdf5)
197 ("jpeg" ,libjpeg)
198 ("jsoncpp" ,jsoncpp)
199 ("libogg" ,libogg)
200 ("libtheora" ,libtheora)
201 ("png" ,libpng)
202 ("tiff" ,libtiff)
203 ("zlib" ,zlib)))
f1d4f264 204 (home-page "https://vtk.org/")
fb226b43
JD
205 (synopsis "Libraries for 3D computer graphics")
206 (description
207 "The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
208image processing and visualization. It supports a wide variety of
209visualization algorithms including: scalar, vector, tensor, texture, and
210volumetric methods; and advanced modeling techniques such as: implicit
211modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
212triangulation. VTK has an extensive information visualization framework, has
213a suite of 3D interaction widgets, supports parallel processing, and
214integrates with various databases on GUI toolkits such as Qt and Tk.")
215 (license license:bsd-3)))
62834314 216
18696f7a
RW
217;; itksnap needs an older variant of VTK.
218(define-public vtk-6
219 (package (inherit vtk)
220 (version "6.3.0")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append "https://vtk.org/files/release/"
224 (version-major+minor version)
225 "/VTK-" version ".tar.gz"))
226 (sha256
227 (base32
228 "0pla1r5mvkgl4sl213gfdhzrypdgai0h3z5mfgm6p9jz9hsr794j"))))
229 (inputs
230 `(("jsoncpp" ,jsoncpp-for-tensorflow)
231 ,@(alist-delete "jsoncpp" (package-inputs vtk))))))
232
62834314
BH
233(define-public opencv
234 (package
235 (name "opencv")
63856931 236 (version "3.4.3")
62834314 237 (source (origin
6c56e9c4
EF
238 (method git-fetch)
239 (uri (git-reference
240 (url "https://github.com/opencv/opencv")
241 (commit version)))
242 (file-name (git-file-name name version))
62834314
BH
243 (sha256
244 (base32
6c56e9c4 245 "06bc61r8myym4s8im10brdjfg4wxkrvsbhhl7vr1msdan2xddzi3"))
62834314
BH
246 (modules '((guix build utils)))
247 (snippet
248 '(begin
249 ;; Remove external libraries. We have all available in Guix:
250 (delete-file-recursively "3rdparty")
251
252 ;; Milky icon set is non-free:
253 (delete-file-recursively "modules/highgui/src/files_Qt/Milky")
254
255 ;; Some jars found:
256 (for-each delete-file
257 '("modules/java/test/pure_test/lib/junit-4.11.jar"
6c56e9c4
EF
258 "samples/java/sbt/sbt/sbt-launch.jar"))
259 #t))))
62834314
BH
260 (build-system cmake-build-system)
261 (arguments
262 `(#:configure-flags
263 (list "-DWITH_IPP=OFF"
264 "-DWITH_ITT=OFF"
6949f45c 265 "-DWITH_CAROTENE=OFF" ; only visible on arm/aarch64
fdeb2def 266 "-DENABLE_PRECOMPILED_HEADERS=OFF"
62834314
BH
267
268 ;; CPU-Features:
269 ;; See cmake/OpenCVCompilerOptimizations.cmake
270 ;; (CPU_ALL_OPTIMIZATIONS) for a list of all optimizations
271 ;; BASELINE is the minimum optimization all CPUs must support
272 ;;
ebe0271a
EF
273 ;; DISPATCH is the list of optional dispatches.
274 "-DCPU_BASELINE=SSE2"
62834314 275
ebe0271a
EF
276 ,@(match (%current-system)
277 ("x86_64-linux"
278 '("-DCPU_DISPATCH=NEON;VFPV3;FP16;SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX"
279 "-DCPU_DISPATCH_REQUIRE=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2"))
280 ("armhf-linux"
281 '("-DCPU_BASELINE_DISABLE=NEON")) ; causes build failures
282 ("aarch64-linux"
283 '("-DCPU_BASELINE=NEON"
284 "-DCPU_DISPATCH=NEON;VFPV3;FP16"))
285 (_ '()))
62834314
BH
286
287 "-DBUILD_PERF_TESTS=OFF"
6949f45c 288 "-DBUILD_TESTS=ON"
62834314 289
b5baf952 290 (string-append "-DOPENCV_EXTRA_MODULES_PATH=" (getcwd)
6c56e9c4 291 "/opencv-contrib/modules")
62834314
BH
292
293 ;;Define test data:
b5baf952 294 (string-append "-DOPENCV_TEST_DATA_PATH=" (getcwd)
6c56e9c4 295 "/opencv-extra/testdata")
62834314
BH
296
297 ;; Is ON by default and would try to rebuild 3rd-party protobuf,
298 ;; which we had removed, which would lead to an error:
299 "-DBUILD_PROTOBUF=OFF"
300
301 ;; Rebuild protobuf files, because we have a slightly different
302 ;; version than the included one. If we would not update, we
303 ;; would get a compile error later:
304 "-DPROTOBUF_UPDATE_FILES=ON"
305
306 ;; xfeatures2d disabled, because it downloads extra binaries from
307 ;; https://github.com/opencv/opencv_3rdparty
308 ;; defined in xfeatures2d/cmake/download_{vgg|bootdesc}.cmake
309 ;; Cmp this bug entry:
310 ;; https://github.com/opencv/opencv_contrib/issues/1131
311 "-DBUILD_opencv_xfeatures2d=OFF")
312 #:phases
313 (modify-phases %standard-phases
314 (add-after 'unpack 'disable-broken-tests
315 (lambda _
316 ;; These tests fails with:
317 ;; vtkXOpenGLRenderWindow (0x723990): Could not find a decent config
318 ;; I think we have no OpenGL support with the Xvfb.
319 (substitute* '("modules/viz/test/test_tutorial3.cpp"
320 "modules/viz/test/test_main.cpp"
321 "modules/viz/test/tests_simple.cpp"
322 "modules/viz/test/test_viz3d.cpp")
323 (("(TEST\\(Viz, )([a-z].*\\).*)" all pre post)
324 (string-append pre "DISABLED_" post)))
325
326 ;; This one fails with "unknown file: Failure"
327 ;; But I couldn't figure out which file was missing:
6c56e9c4 328 (substitute* "../opencv-contrib/modules/face/test/test_face_align.cpp"
62834314
BH
329 (("(TEST\\(CV_Face_FacemarkKazemi, )(can_detect_landmarks\\).*)"
330 all pre post)
331 (string-append pre "DISABLED_" post)))
332
333 ;; Failure reason: Bad accuracy
334 ;; Incorrect count of accurate poses [2nd case]: 90.000000 / 94.000000
6c56e9c4 335 (substitute* "../opencv-contrib/modules/rgbd/test/test_odometry.cpp"
62834314
BH
336 (("(TEST\\(RGBD_Odometry_Rgbd, )(algorithmic\\).*)" all pre post)
337 (string-append pre "DISABLED_" post)))
338 #t))
339
62834314
BH
340 (add-after 'unpack 'unpack-submodule-sources
341 (lambda* (#:key inputs #:allow-other-keys)
342 (mkdir "../opencv-extra")
343 (mkdir "../opencv-contrib")
6c56e9c4
EF
344 (copy-recursively (assoc-ref inputs "opencv-extra")
345 "../opencv-extra")
346 (invoke "tar" "xvf"
347 (assoc-ref inputs "opencv-contrib")
348 "--strip-components=1"
349 "-C" "../opencv-contrib")))
62834314
BH
350
351 (add-after 'set-paths 'add-ilmbase-include-path
352 (lambda* (#:key inputs #:allow-other-keys)
353 ;; OpenEXR propagates ilmbase, but its include files do not appear
354 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
355 ;; the CPATH to satisfy the dependency on "ImathVec.h".
356 (setenv "CPATH"
357 (string-append (assoc-ref inputs "ilmbase")
358 "/include/OpenEXR"
359 ":" (or (getenv "CPATH") "")))
360 #t))
361 (add-before 'check 'start-xserver
362 (lambda* (#:key inputs #:allow-other-keys)
363 (let ((xorg-server (assoc-ref inputs "xorg-server"))
364 (disp ":1"))
365 (setenv "HOME" (getcwd))
366 (setenv "DISPLAY" disp)
367 ;; There must be a running X server and make check doesn't start one.
368 ;; Therefore we must do it.
369 (zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp)))))))))
370 (native-inputs
6c56e9c4 371 `(("pkg-config" ,pkg-config)
62834314
BH
372 ("xorg-server" ,xorg-server) ; For running the tests
373 ("opencv-extra"
374 ,(origin
6c56e9c4
EF
375 (method git-fetch)
376 (uri (git-reference
377 (url "https://github.com/opencv/opencv_extra")
378 (commit version)))
379 (file-name (git-file-name "opencv_extra" version))
62834314 380 (sha256
6c56e9c4 381 (base32 "08p5xnq8n1jw8svvz0fnirfg7q8dm3p4a5dl7527s5xj0f9qn7lp"))))
62834314
BH
382 ("opencv-contrib"
383 ,(origin
6c56e9c4
EF
384 (method git-fetch)
385 (uri (git-reference
386 (url "https://github.com/opencv/opencv_contrib")
387 (commit version)))
388 (file-name (git-file-name "opencv_contrib" version))
8e21fa0b 389 (patches (search-patches "opencv-rgbd-aarch64-test-fix.patch"))
62834314 390 (sha256
6c56e9c4 391 (base32 "1f334glf39nk42mpqq6j732h3ql2mpz89jd4mcl678s8n73nfjh2"))))))
62834314
BH
392 (inputs `(("libjpeg" ,libjpeg)
393 ("libpng" ,libpng)
394 ("jasper" ,jasper)
395 ;; ffmpeg 4.0 causes core dumps in tests.
396 ("ffmpeg" ,ffmpeg-3.4)
397 ("libtiff" ,libtiff)
398 ("hdf5" ,hdf5)
399 ("libgphoto2" ,libgphoto2)
400 ("libwebp" ,libwebp)
401 ("zlib" ,zlib)
402 ("gtkglext" ,gtkglext)
403 ("openexr" ,openexr)
404 ("ilmbase" ,ilmbase)
405 ("gtk+" ,gtk+-2)
406 ("python-numpy" ,python-numpy)
407 ("protobuf" ,protobuf)
408 ("vtk" ,vtk)
409 ("python" ,python)))
5834e4b7
BH
410 ;; These three CVEs are not a problem of OpenCV, see:
411 ;; https://github.com/opencv/opencv/issues/10998
412 (properties '((lint-hidden-cve . ("CVE-2018-7712"
413 "CVE-2018-7713"
414 "CVE-2018-7714"))))
62834314
BH
415 (synopsis "Computer vision library")
416 (description "OpenCV is a library aimed at
417real-time computer vision, including several hundred computer
418vision algorithms. It can be used to do things like:
419
420@itemize
421@item image and video input and output
422@item image and video processing
423@item displaying
424@item feature recognition
425@item segmentation
426@item facial recognition
427@item stereo vision
428@item structure from motion
429@item augmented reality
430@item machine learning
431@end itemize\n")
432 (home-page "https://opencv.org/")
433 (license license:bsd-3)))
5bbd6931
L
434
435(define-public vips
436 (package
437 (name "vips")
7e52321f
TGR
438 (version "8.7.4")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (string-append
443 "https://github.com/libvips/libvips/releases/download/v"
444 version "/vips-" version ".tar.gz"))
445 (sha256
446 (base32 "01gjhcrl6zj7mcj1al717v5jsniahplqhz1xkfh2j78vyfl1hxff"))))
5bbd6931
L
447 (build-system gnu-build-system)
448 (native-inputs
449 `(("pkg-config" ,pkg-config)
450 ("gobject-introspection" ,gobject-introspection)))
451 (inputs
452 `(("glib" ,glib)
453 ("libjpeg" ,libjpeg)
454 ("libpng" ,libpng)
455 ("librsvg" ,librsvg)
456 ("libtiff" ,libtiff)
457 ("libexif" ,libexif)
458 ("giflib" ,giflib)
459 ("libgsf" ,libgsf)
460 ("fftw" ,fftw)
461 ("poppler" ,poppler)
462 ("pango" ,pango)
463 ("lcms" ,lcms)
464 ("matio" ,matio)
465 ("libwebp" ,libwebp)
466 ("niftilib" ,niftilib)
467 ("openexr" ,openexr)
468 ("orc" ,orc)
469 ("imagemagick" ,imagemagick)
470 ("libxml2" ,libxml2)
471 ("expat" ,expat)
472 ("hdf5" ,hdf5)))
473 (home-page "https://libvips.github.io/libvips/")
85e2f212 474 (synopsis "Multithreaded image processing system with low memory needs")
37c1cf89 475 (description
85e2f212
TGR
476 "VIPS is a demand-driven, horizontally threaded image processing library.
477It's particularly good at processing large images, working with colour,
478scientific analysis, and general research & development.
479
480Compared to most image processing libraries VIPS needs little RAM and runs
481quickly, especially on machines with more than one CPU core. This is primarily
482due to its architecture which automatically parallelises the image workflows.")
5bbd6931 483 (license license:lgpl2.1+)))
e506b5e9
L
484
485(define-public nip2
486 (package
487 (name "nip2")
f2d3d742 488 (version "8.7.1")
e506b5e9
L
489 (source
490 (origin
491 (method url-fetch)
492 (uri (string-append "https://github.com/libvips/nip2/releases/download/v"
493 version "/nip2-" version ".tar.gz" ))
494 (sha256
f2d3d742 495 (base32 "0l7n427njif53npqn02gfjjly8y3khbrkzqxp10j5vp9h97psgiw"))))
e506b5e9
L
496 (build-system gnu-build-system)
497 (arguments
498 `(#:phases
499 (modify-phases %standard-phases
f2d3d742 500 ;; test_conv.ws keep failing so disabling for now.
e506b5e9
L
501 (add-after 'unpack 'disable-test-conv
502 (lambda _
503 (delete-file "test/workspaces/test_conv.ws")
504 #t))
505 (add-before 'check 'set-home
506 (lambda _
507 (setenv "HOME" "/tmp") #t)))))
508 (inputs
509 `(("vips" ,vips)
510 ("glib" ,glib)
511 ("libtiff" ,libtiff)
512 ("gtk+-2" ,gtk+-2)
513 ("libxml2" ,libxml2)
514 ("libexif" ,libexif)
f2d3d742 515 ("libjpeg" ,libjpeg) ; required by vips.pc
e506b5e9
L
516 ("librsvg" ,librsvg)
517 ("fftw" ,fftw)
518 ("libgsf" ,libgsf)
519 ("imagemagick" ,imagemagick)
520 ("orc" ,orc)
521 ("matio" ,matio)
522 ("lcms" ,lcms)
523 ("libwebp" ,libwebp)
524 ("openexr" ,openexr)
525 ("poppler" ,poppler)
526 ("gsl" ,gsl)))
527 (native-inputs
528 `(("flex" ,flex)
529 ("bison" ,bison)
530 ("pkg-config" ,pkg-config)))
531 (home-page "https://github.com/libvips/nip2")
532 (synopsis "Spreadsheet-like GUI for libvips")
533 (description "This package provide a graphical user interface (GUI) for
534the VIPS image processing library. It's a little like a spreadsheet: you
535create a set of formula connecting your objects together, and on a change nip2
536recalculates.")
537 (license license:gpl2+)))
02e1acfb
RW
538
539(define-public vxl
540 (package
541 (name "vxl")
542 (version "2.0.2")
543 (source
544 (origin
545 (method git-fetch)
546 (uri (git-reference
547 (url "https://github.com/vxl/vxl.git")
548 (commit (string-append "v" version))))
549 (file-name (git-file-name name version))
550 (sha256
551 (base32 "0949hw57szq8943f1whwqaz591xjmb19kj803hcv74hdai2b0ycg"))
552 (modules '((guix build utils)))
553 ;; TODO: vxl includes an old version of dcmtk. It won't build with
554 ;; version 3.6.x.
555 (snippet
556 '(begin
557 (for-each delete-file-recursively
558 '("v3p/bzlib/"
559 "v3p/geotiff/"
560 "v3p/jpeg/"
561 "v3p/png/"
562 "v3p/tiff/"
563 "v3p/zlib/"))
564 (substitute* "v3p/CMakeLists.txt"
565 (("add_subdirectory\\((tiff|png|jpeg|zlib|bzlib|geotiff)\\)")
566 ""))
567 #t))))
568 (build-system cmake-build-system)
569 (inputs
570 `(("libgeotiff" ,libgeotiff)
571 ("libtiff" ,libtiff)
572 ("libjpeg" ,libjpeg)
573 ("libpng" ,libpng)
574 ("zlib" ,zlib)))
575 (home-page "https://github.com/vxl/vxl/")
576 (synopsis "Collection of C++ libraries for computer vision")
577 (description "VXL (the Vision-something-Libraries) is a collection of C++
578libraries designed for computer vision research and implementation.")
579 (license license:bsd-3)))