gnu: spice: Fix CVE-2017-7506.
[jackhill/guix/guix.git] / gnu / packages / image-processing.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
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>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages image-processing)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix utils)
27 #:use-module (guix download)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages boost)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages fontutils)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages graphics)
39 #:use-module (gnu packages graphviz)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages maths)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages serialization)
46 #:use-module (gnu packages xiph)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages xorg))
49
50 ;; We use the latest snapshot of this package because the latest release is
51 ;; from 2011 and has known vulnerabilities that cannot easily be fixed by
52 ;; applying patches.
53 (define-public dcmtk
54 (package
55 (name "dcmtk")
56 (version "3.6.1_20170228")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "ftp://dicom.offis.de/pub/dicom/offis/"
60 "software/dcmtk/snapshot/dcmtk-"
61 version ".tar.gz"))
62 (sha256
63 (base32
64 "04cwfx8yrscqcd59mxk2fh6314ckayi9cp68iql5a57pf2pg5qld"))))
65 (build-system gnu-build-system)
66 (inputs
67 `(("libtiff" ,libtiff)
68 ("libpng" ,libpng)
69 ("doxygen" ,doxygen)
70 ("zlib" ,zlib)))
71 (native-inputs
72 `(("perl" ,perl)))
73 (home-page "http://dcmtk.org")
74 (synopsis "Libraries and programs implementing parts of the DICOM standard")
75 (description "DCMTK is a collection of libraries and applications
76 implementing large parts the DICOM standard. It includes software for
77 examining, constructing and converting DICOM image files, handling offline
78 media, sending and receiving images over a network connection, as well as
79 demonstrative image storage and worklist servers.")
80 (license (license:fsf-free
81 "file://COPYRIGHT"
82 "A union of the Apache 2.0 licence and various non-copyleft
83 licences similar to the Modified BSD licence."))))
84
85 (define-public mia
86 (package
87 (name "mia")
88 (version "2.4.4")
89 (source (origin
90 (method url-fetch)
91 (uri (string-append "mirror://sourceforge/mia/mia/"
92 (version-major+minor version)
93 "/mia-" version ".tar.xz"))
94 (sha256
95 (base32
96 "124gvf8nkls59mlnx8ynq00n9zrah7a54gsywafx7qmfr0y95ra7"))))
97 (build-system cmake-build-system)
98 (arguments
99 `(#:configure-flags
100 (list "-DMIA_CREATE_NIPYPE_INTERFACES=0"
101 (string-append "-DCMAKE_INSTALL_LIBDIR="
102 (assoc-ref %outputs "out") "/lib")
103 "-DCMAKE_CXX_FLAGS=-fpermissive")))
104 (inputs
105 `(("boost" ,boost)
106 ("dcmtk" ,dcmtk)
107 ("doxygen" ,doxygen)
108 ("eigen" ,eigen)
109 ("fftw" ,fftw)
110 ("fftwf" ,fftwf)
111 ("gsl" ,gsl)
112 ("gts" ,gts)
113 ("hdf5" ,hdf5)
114 ("itpp" ,itpp)
115 ("libjpeg" ,libjpeg)
116 ("libpng" ,libpng)
117 ("libtiff" ,libtiff)
118 ("libxml" ,libxml2)
119 ("libxml++" ,libxml++)
120 ("maxflow" ,maxflow)
121 ("niftilib" ,niftilib)
122 ("nlopt" ,nlopt)
123 ("openexr" ,openexr)
124 ("python-lxml" ,python2-lxml)
125 ("vtk" ,vtk)))
126 (native-inputs
127 `(("pkg-config" ,pkg-config)
128 ("python" ,python-2)))
129 (home-page "http://mia.sourceforge.net")
130 (synopsis "Toolkit for gray scale medical image analysis")
131 (description "MIA provides a combination of command line tools, plug-ins,
132 and libraries that make it possible run image processing tasks interactively
133 in a command shell and to prototype using the shell's scripting language. It
134 is built around a plug-in structure that makes it easy to add functionality
135 without compromising the original code base and it makes use of a wide variety
136 of external libraries that provide additional functionality.")
137 (license license:gpl3+)))
138
139 (define-public vtk
140 (package
141 (name "vtk")
142 (version "7.1.0")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "http://www.vtk.org/files/release/"
146 (version-major+minor version)
147 "/VTK-" version ".tar.gz"))
148 (sha256
149 (base32
150 "0yj96z58haan77gzilnqp7xpf8hg5jk11a3jx55p2ksd400s0gjz"))))
151 (build-system cmake-build-system)
152 (arguments
153 '(#:build-type "Release" ;Build without '-g' to save space.
154 ;; -DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE requires netcdf_cxx
155 #:configure-flags '("-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
156 "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
157 "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
158 "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
159 "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
160 "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
161 "-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=TRUE"
162 "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
163 "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
164 "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
165 #:tests? #f)) ;XXX: no "test" target
166 (inputs
167 `(("libXt" ,libxt)
168 ("xproto" ,xproto)
169 ("libX11" ,libx11)
170 ("libxml2" ,libxml2)
171 ("mesa" ,mesa)
172 ("glu" ,glu)
173 ("expat" ,expat)
174 ("freetype" ,freetype)
175 ("hdf5" ,hdf5)
176 ("jpeg" ,libjpeg)
177 ("jsoncpp" ,jsoncpp)
178 ("libogg" ,libogg)
179 ("libtheora" ,libtheora)
180 ("png" ,libpng)
181 ("tiff" ,libtiff)
182 ("zlib" ,zlib)))
183 (home-page "http://www.vtk.org/")
184 (synopsis "Libraries for 3D computer graphics")
185 (description
186 "The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
187 image processing and visualization. It supports a wide variety of
188 visualization algorithms including: scalar, vector, tensor, texture, and
189 volumetric methods; and advanced modeling techniques such as: implicit
190 modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
191 triangulation. VTK has an extensive information visualization framework, has
192 a suite of 3D interaction widgets, supports parallel processing, and
193 integrates with various databases on GUI toolkits such as Qt and Tk.")
194 (license license:bsd-3)))