From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:22:27 -0300 Subject: [PATCH 01/13] New package: civetweb-1.15 --- common/shlibs | 1 + srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++ srcpkgs/civetweb/template | 39 ++++++++++++++++++++++ srcpkgs/libcivetweb | 1 + srcpkgs/libcivetweb-devel | 1 + 5 files changed, 58 insertions(+) create mode 100644 srcpkgs/civetweb/patches/install-fix.patch create mode 100644 srcpkgs/civetweb/template create mode 120000 srcpkgs/libcivetweb create mode 120000 srcpkgs/libcivetweb-devel diff --git a/common/shlibs b/common/shlibs index ea6fde4ffe31..a941669934ef 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1 libqtspell-qt5.so.1 qtspell-1.0.1_1 libopensmtpd.so.0 libopensmtpd-0.7_1 libiio.so.0 libiio-0.23_1 +libcivetweb.so.1 libcivetweb-1.15_1 diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch new file mode 100644 index 000000000000..be282dbf613c --- /dev/null +++ b/srcpkgs/civetweb/patches/install-fix.patch @@ -0,0 +1,16 @@ +--- a/Makefile ++++ b/Makefile +@@ -19,10 +19,10 @@ + # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html + PREFIX ?= /usr/local + EXEC_PREFIX = $(PREFIX) +-BINDIR = $(EXEC_PREFIX)/bin +-DATAROOTDIR = $(PREFIX)/share ++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin ++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share + DOCDIR = $(DATAROOTDIR)/doc/$(CPROG) +-SYSCONFDIR ?= $(PREFIX)/etc ++SYSCONFDIR ?= $(DESTDIR)/etc + HTMLDIR = $(DOCDIR) + INCLUDEDIR = $(DESTDIR)$(PREFIX)/include + LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template new file mode 100644 index 000000000000..96ff8080508b --- /dev/null +++ b/srcpkgs/civetweb/template @@ -0,0 +1,39 @@ +# Template file for 'civetweb' +pkgname=civetweb +version=1.15 +revision=1 +build_style=gnu-makefile +make_install_target="install install-headers install-lib install-slib" +make_use_env=yes +makedepends="openssl-devel" +short_desc="Embedded C/C++ web server" +maintainer="Carlos E. Gallo F. " +license="MIT" +homepage="https://civetweb.github.io/civetweb/" +distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz" +checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9 + +pre_install() { + vmkdir usr/include +} + +post_install() { + vlicense LICENSE.md +} + +libcivetweb_package() { + short_desc+=' - library' + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + +libcivetweb-devel_package() { + depends="lib${sourcepkg}>=${version}_${revision}" + short_desc+=' - development files' + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb new file mode 120000 index 000000000000..f740b5313316 --- /dev/null +++ b/srcpkgs/libcivetweb @@ -0,0 +1 @@ +civetweb \ No newline at end of file diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel new file mode 120000 index 000000000000..f740b5313316 --- /dev/null +++ b/srcpkgs/libcivetweb-devel @@ -0,0 +1 @@ +civetweb \ No newline at end of file From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:16 -0300 Subject: [PATCH 02/13] New package: dcmtk-3.6.7 --- common/shlibs | 28 ++++++++++++++++++++++++ srcpkgs/dcmtk-doc | 1 + srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++ srcpkgs/libdcmtk | 1 + srcpkgs/libdcmtk-devel | 1 + 5 files changed, 80 insertions(+) create mode 120000 srcpkgs/dcmtk-doc create mode 100644 srcpkgs/dcmtk/template create mode 120000 srcpkgs/libdcmtk create mode 120000 srcpkgs/libdcmtk-devel diff --git a/common/shlibs b/common/shlibs index a941669934ef..39dd712edb27 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1 libopensmtpd.so.0 libopensmtpd-0.7_1 libiio.so.0 libiio-0.23_1 libcivetweb.so.1 libcivetweb-1.15_1 +libcmr.so.17 +libcmr.so.17 libdcmtk-3.6.7_1 +libdcmrt.so.17 libdcmtk-3.6.7_1 +libdcmdata.so.17 libdcmtk-3.6.7_1 +libdcmseg.so.17 libdcmtk-3.6.7_1 +libdcmdsig.so.17 libdcmtk-3.6.7_1 +libdcmsr.so.17 libdcmtk-3.6.7_1 +libdcmect.so.17 libdcmtk-3.6.7_1 +libdcmtkcharls.so.17 libdcmtk-3.6.7_1 +libdcmfg.so.17 libdcmtk-3.6.7_1 +libdcmtls.so.17 libdcmtk-3.6.7_1 +libdcmimage.so.17 libdcmtk-3.6.7_1 +libdcmtract.so.17 libdcmtk-3.6.7_1 +libdcmimgle.so.17 libdcmtk-3.6.7_1 +libdcmwlm.so.17 libdcmtk-3.6.7_1 +libdcmiod.so.17 libdcmtk-3.6.7_1 +libi2d.so.17 libdcmtk-3.6.7_1 +libdcmjpeg.so.17 libdcmtk-3.6.7_1 +libijg12.so.17 libdcmtk-3.6.7_1 +libdcmjpls.so.17 libdcmtk-3.6.7_1 +libijg16.so.17 libdcmtk-3.6.7_1 +libdcmnet.so.17 libdcmtk-3.6.7_1 +libijg8.so.17 libdcmtk-3.6.7_1 +libdcmpmap.so.17 libdcmtk-3.6.7_1 +liboflog.so.17 libdcmtk-3.6.7_1 +libdcmpstat.so.17 libdcmtk-3.6.7_1 +libofstd.so.17 libdcmtk-3.6.7_1 +libdcmqrdb.so.17 libdcmtk-3.6.7_1 diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/dcmtk-doc @@ -0,0 +1 @@ +dcmtk \ No newline at end of file diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template new file mode 100644 index 000000000000..63c28bc3c376 --- /dev/null +++ b/srcpkgs/dcmtk/template @@ -0,0 +1,49 @@ +# Template file for 'dcmtk' +pkgname=dcmtk +version=3.6.7 +revision=1 +build_style=cmake +configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON" +hostmakedepends="doxygen" +makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel" +short_desc="Libraries and tools that implements DICOM standard" +maintainer="Carlos E. Gallo F. " +license="custom: see /usr/share/licenses/${pkgname}" +homepage="https://dcmtk.org/dcmtk.php.en" +distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz" +checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a + +pre_build() { + ninja -C build DOXYGEN +} + +post_install() { + vlicense COPYRIGHT +} + +dcmtk-doc_package() { + short_desc+=' - documentation' + pkg_install() { + vmove usr/share/doc + } +} + +# TODO need license here +libdcmtk_package() { + short_desc+=' - runtime libraries' + pkg_install() { + vmove "usr/lib/*.so.*" + vmove usr/share/dcmtk + } +} + +libdcmtk-devel_package() { + short_desc+=' - development files' + depends="lib${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove usr/lib/cmake + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/libdcmtk @@ -0,0 +1 @@ +dcmtk \ No newline at end of file diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/libdcmtk-devel @@ -0,0 +1 @@ +dcmtk \ No newline at end of file From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:41 -0300 Subject: [PATCH 03/13] New package: Orthanc-1.11.1 --- srcpkgs/Orthanc-devel | 1 + srcpkgs/Orthanc-plugins | 1 + srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++ srcpkgs/Orthanc/files/orthanc/run | 32 + srcpkgs/Orthanc/template | 57 ++ 5 files changed, 1006 insertions(+) create mode 120000 srcpkgs/Orthanc-devel create mode 120000 srcpkgs/Orthanc-plugins create mode 100644 srcpkgs/Orthanc/files/Configuration.json create mode 100755 srcpkgs/Orthanc/files/orthanc/run create mode 100644 srcpkgs/Orthanc/template diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel new file mode 120000 index 000000000000..6d0405937430 --- /dev/null +++ b/srcpkgs/Orthanc-devel @@ -0,0 +1 @@ +Orthanc \ No newline at end of file diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins new file mode 120000 index 000000000000..6d0405937430 --- /dev/null +++ b/srcpkgs/Orthanc-plugins @@ -0,0 +1 @@ +Orthanc \ No newline at end of file diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json new file mode 100644 index 000000000000..e0e594bb4647 --- /dev/null +++ b/srcpkgs/Orthanc/files/Configuration.json @@ -0,0 +1,915 @@ +{ + /** + * General configuration of Orthanc + **/ + + // The logical name of this instance of Orthanc. This one is + // displayed in Orthanc Explorer and at the URI "/system". + "Name" : "MyOrthanc", + + // Path to the directory that holds the heavyweight files (i.e. the + // raw DICOM instances). Backslashes must be either escaped by + // doubling them, or replaced by forward slashes "/". + "StorageDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory that holds the SQLite index (if unset, the + // value of StorageDirectory is used). This index could be stored on + // a RAM-drive or a SSD device for performance reasons. + "IndexDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory where Orthanc stores its large temporary + // files. The content of this folder can be safely deleted once + // Orthanc is stopped. The folder must exist. The corresponding + // filesystem must be properly sized, given that for instance a ZIP + // archive of DICOM images created by a job can weight several GBs, + // and that there might be up to "min(JobsHistorySize, + // MediaArchiveSize)" archives to be stored simultaneously. If not + // set, Orthanc will use the default temporary folder of the + // operating system (such as "/tmp/" on UNIX-like systems, or + // "C:/Temp" on Microsoft Windows). + // "TemporaryDirectory" : "/tmp/Orthanc/", + + // Enable the transparent compression of the DICOM instances + "StorageCompression" : false, + + // Maximum size of the storage in MB (a value of "0" indicates no + // limit on the storage size) + "MaximumStorageSize" : 0, + + // Maximum number of patients that can be stored at a given time + // in the storage (a value of "0" indicates no limit on the number + // of patients) + "MaximumPatientCount" : 0, + + // Maximum size of the storage cache in MB. The storage cache + // is stored in RAM and contains a copy of recently accessed + // files (written or read). A value of "0" indicates the cache + // is disabled. (new in Orthanc 1.10.0) + "MaximumStorageCacheSize" : 128, + + // List of paths to the custom Lua scripts that are to be loaded + // into this instance of Orthanc + "LuaScripts" : [ + ], + + // The period (in seconds) between 2 calls of the "OnHeartBeat" + // lua callback. O means the heart beat is disabled. + // TODO: text below for Orthanc book: + // Note: that the period is not actually the delay between + // the end of an execution and the triggering of the next one. + // Since there is only one lua context, if other lua code is being + // executed, the heart beat might be delayed even more. + "LuaHeartBeatPeriod" : 0, + + // List of paths to the plugins that are to be loaded into this + // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or + // "./PluginTest.dll" for Windows). These paths can refer to + // folders, in which case they will be scanned non-recursively to + // find shared libraries. Backslashes must be either escaped by + // doubling them, or replaced by forward slashes "/". + "Plugins" : [ + ], + + // Maximum number of processing jobs that are simultaneously running + // at any given time. A value of "0" indicates to use all the + // available CPU logical cores. To emulate Orthanc <= 1.3.2, set + // this value to "1". + "ConcurrentJobs" : 2, + + + /** + * Configuration of the HTTP server + **/ + + // Enable the HTTP server. If this parameter is set to "false", + // Orthanc acts as a pure DICOM server. The REST API and Orthanc + // Explorer will not be available. + "HttpServerEnabled" : true, + + // Enable/disable the Orthanc Explorer Web user interface. This + // option is only meaningful if the "HttpServerEnabled" option is + // set to "true" (new in Orthanc 1.8.2). + "OrthancExplorerEnabled" : true, + + // HTTP port for the REST services and for the GUI + "HttpPort" : 8042, + + // When the following option is "true", if an error is encountered + // while calling the REST API, a JSON message describing the error + // is put in the HTTP answer. This feature can be disabled if the + // HTTP client does not properly handles such answers. + "HttpDescribeErrors" : true, + + // Enable HTTP compression to improve network bandwidth utilization, + // at the expense of more computations on the server. Orthanc + // supports the "gzip" and "deflate" HTTP encodings. + "HttpCompressionEnabled" : true, + + // Enable the publication of the content of the Orthanc server as a + // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV + // share is mapped as "http://localhost:8042/webdav/". + "WebDavEnabled" : true, + + // Whether to allow deletions through the WebDAV share. This is + // disabled by default to avoid accidental loss of DICOM instances. + "WebDavDeleteAllowed" : false, + + // Whether to allow uploads through the WebDAV share. + "WebDavUploadAllowed" : true, + + + + /** + * Configuration of the DICOM server + **/ + + // Enable the DICOM server. If this parameter is set to "false", + // Orthanc acts as a pure REST server. It will not be possible to + // receive files or to do query/retrieve through the DICOM protocol. + "DicomServerEnabled" : true, + + // The DICOM Application Entity Title (cannot be longer than 16 + // characters) + "DicomAet" : "ORTHANC", + + // Check whether the called AET corresponds to the AET of Orthanc + // during an incoming DICOM SCU request + "DicomCheckCalledAet" : false, + + // The DICOM port + "DicomPort" : 4242, + + // The default encoding that is assumed for DICOM files without + // "SpecificCharacterSet" DICOM tag, and that is used when answering + // C-FIND requests (including worklists). The allowed values are + // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4", + // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew", + // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and + // "SimplifiedChinese". + "DefaultEncoding" : "Latin1", + + // The transfer syntaxes that are accepted by Orthanc C-STORE SCP. + // This is an array listing the accepted transfer syntax UIDs. Each + // entry can contain wildcards ("?" or "*"). By default, all the + // known transfer syntaxes are accepted. (new in Orthanc 1.9.0) + "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ], + + // User-friendly groups of transfer syntaxes that can be enabled or + // disabled at once. These options are applied after the main + // "AcceptedTransferSyntaxes" option has been applied (if present). + /** + "DeflatedTransferSyntaxAccepted" : true, + "JpegTransferSyntaxAccepted" : true, + "Jpeg2000TransferSyntaxAccepted" : true, + "JpegLosslessTransferSyntaxAccepted" : true, + "JpipTransferSyntaxAccepted" : true, + "Mpeg2TransferSyntaxAccepted" : true, + "RleTransferSyntaxAccepted" : true, + "Mpeg4TransferSyntaxAccepted" : true, // New in Orthanc 1.6.0 + "H265TransferSyntaxAccepted" : true, // New in Orthanc 1.9.0 + **/ + + // Whether Orthanc accepts to act as C-STORE SCP for unknown storage + // SOP classes (aka. "promiscuous mode") + "UnknownSopClassAccepted" : false, + + // Set the timeout (in seconds) after which the DICOM associations + // are closed by the Orthanc SCP (server) if no further DIMSE + // command is received from the SCU (client). + "DicomScpTimeout" : 30, + + + + /** + * Security-related options for the HTTP server + **/ + + // Whether remote hosts can connect to the HTTP server + "RemoteAccessAllowed" : false, + + // Whether or not SSL is enabled + "SslEnabled" : false, + + // Path to the SSL certificate used by the HTTP server. The file + // must be stored in the PEM format, and must contain both the + // certificate and the private key. This option is only meaningful + // if "SslEnabled" is true. + "SslCertificate" : "certificate.pem", + + // Sets the minimum accepted SSL protocol version + // (cf. "ssl_protocol_version" option of civetweb). By default, + // require SSL 1.2. This option is only meaningful if "SslEnabled" + // is true. (new in Orthanc 1.8.2) + // + // Value => Protocols + // 0 SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2 + // 1 SSL3+TLS1.0+TLS1.1+TLS1.2 + // 2 TLS1.0+TLS1.1+TLS1.2 + // 3 TLS1.1+TLS1.2 + // 4 TLS1.2 + "SslMinimumProtocolVersion" : 4, + + // Set the accepted ciphers for SSL connections. The ciphers must be + // provided as a list of strings. If not set, this will default to + // FIPS 140-2 ciphers. This option is only meaningful if + // "SslEnabled" is true. (new in Orthanc 1.8.2) + /** + "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ], + **/ + + // Whether or not peer client certificates shall be checked. This + // option is only meaningful if "SslEnabled" is true. + "SslVerifyPeers" : false, + + // Path to a file containing the concatenation of the client SSL + // certificate(s) that are trusted to verify the identify of remote + // HTTP clients. The individual certificate(s) must be stored in the + // PEM format. This option is only meaningful if "SslVerifyPeers" + // is true. + "SslTrustedClientCertificates" : "trustedClientCertificates.pem", + + // Whether or not the password protection is enabled (using HTTP + // basic access authentication). Starting with Orthanc 1.5.8, if + // "AuthenticationEnabled" is not explicitly set, authentication is + // enabled iff. remote access is allowed (i.e. the default value of + // "AuthenticationEnabled" equals that of "RemoteAccessAllowed"). + /** + "AuthenticationEnabled" : false, + **/ + + // The list of the registered users. Because Orthanc uses HTTP + // Basic Authentication, the passwords are stored as plain text. + "RegisteredUsers" : { + // "alice" : "alicePassword" + }, + + + + /** + * Security-related options for the DICOM connections (SCU/SCP) + **/ + + // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0) + "DicomTlsEnabled" : false, + + // Path to the TLS certificate file (in PEM format) to be used for + // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU + // (outgoing DICOM connections). Note that contrarily to the + // "SslCertificate" option, the certificate and its private key must + // be split into two separate files. (new in Orthanc 1.9.0) + /** + "DicomTlsCertificate" : "orthanc.crt", + **/ + + // Path to the file containing the private key (in PEM format) that + // corresponds to the TLS certificate specified in option + // "DicomTlsCertificate". (new in Orthanc 1.9.0) + /** + "DicomTlsPrivateKey" : "orthanc.key", + **/ + + // Path to a file containing all the TLS certificates that Orthanc + // can trust, both for its SCP (incoming DICOM connections) and SCU + // (outgoing DICOM connections). This file must contain a sequence + // of PEM certificates. (new in Orthanc 1.9.0) + /** + "DicomTlsTrustedCertificates" : "trusted.crt", + **/ + + // Whether Orthanc rejects DICOM TLS connections to/from remote + // modalities that do not provide a certificate. Setting this option + // to "true" (resp. "false") corresponds to "--require-peer-cert" + // (resp. "--verify-peer-cert") in the DCMTK command-line + // tools. (new in Orthanc 1.9.3) + "DicomTlsRemoteCertificateRequired" : true, + + // Whether the Orthanc SCP allows incoming C-ECHO requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Orthanc 1.3.0 + // is the only version to behave as if this argument were set to "false". + "DicomAlwaysAllowEcho" : true, + + // Whether the Orthanc SCP allows incoming C-STORE requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above) + "DicomAlwaysAllowStore" : true, + + // Whether the Orthanc SCP allows incoming C-FIND requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Setting this + // option to "true" implies security risks. (new in Orthanc 1.9.0) + // Note: From Orthanc 1.10.0, this option only applies to C-FIND + // requests for patients/studies/series/instances. Use option + // "DicomAlwaysAllowFindWorklist" for worklists. + "DicomAlwaysAllowFind" : false, + + // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, + // even from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Setting this + // option to "true" implies security risks. (new in Orthanc 1.10.0) + "DicomAlwaysAllowFindWorklist" : false, + + // Whether the Orthanc SCP allows incoming C-GET requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Setting this + // option to "true" implies security risks. (new in Orthanc 1.9.0) + "DicomAlwaysAllowGet" : false, + + // Whether the Orthanc SCP allows incoming C-MOVE requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Setting this + // option to "true" implies security risks. (new in Orthanc 1.9.7) + "DicomAlwaysAllowMove" : false, + + // Whether Orthanc checks the IP/hostname address of the remote + // modality initiating a DICOM connection (as listed in the + // "DicomModalities" option above). If this option is set to + // "false", Orthanc only checks the AET of the remote modality. + "DicomCheckModalityHost" : false, + + + + /** + * Network topology + **/ + + // The list of the known DICOM modalities. This option is ignored if + // "DicomModalitiesInDatabase" is set to "true", in which case you + // must use the REST API to define modalities. + "DicomModalities" : { + /** + * Uncommenting the following line would enable Orthanc to + * connect to an instance of the "storescp" open-source DICOM + * store (shipped in the DCMTK distribution), as started by the + * command line "storescp 2000". The first parameter is the + * AET of the remote modality (cannot be longer than 16 + * characters), the second one is the remote network address, + * and the third one is the TCP port number corresponding + * to the DICOM protocol on the remote modality (usually 104). + **/ + // "sample" : [ "STORESCP", "127.0.0.1", 2000 ] + + /** + * A fourth parameter is available to enable patches for + * specific PACS manufacturers. The allowed values are currently: + * - "Generic" (default value), + * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields + * in outgoing C-FIND requests originating from Orthanc), + * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields + * in outgoing C-FIND SCU requests originating from Orthanc), + * - "Vitrea", + * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation + * from GE Healthcare). + * + * This parameter is case-sensitive. + **/ + // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ] + + /** + * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO, + * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the + * registered remote SCU modalities. Starting with Orthanc 1.5.0, + * it is possible to specify which DICOM commands are allowed, + * separately for each remote modality, using the syntax + * below. + * + * The "AllowEcho" (resp. "AllowStore") option only has an effect + * respectively if global option "DicomAlwaysAllowEcho" + * (resp. "DicomAlwaysAllowStore") is set to "false". + * + * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to + * disable the transcoding to uncompressed transfer syntaxes if + * this remote modality doesn't support compressed transfer + * syntaxes. This option currently applies to Orthanc C-GET SCP + * and to Orthanc C-STORE SCU. This option only has an effect if + * the global option "EnableTranscoding" is set to "true". + * + * By default, all "Allow*" options are true. + * "AllowStorageCommitment" is actually an alias for + * "AllowNAction" & "AllowEventReport". + * + * The "UseDicomTls" option specifies whether DICOM TLS should be + * used when opening a SCU connection from Orthanc to this remote + * modality. By default, DICOM TLS is not enabled. + * + * The "LocalAet" option allows one to overwrite the global + * "DicomAet" configuration option in order to specify another AET + * for Orthanc when initiating an SCU to this very specific + * modality. Similarly, "Timeout" allows one to overwrite the + * global value "DicomScuTimeout" on a per-modality basis. + **/ + //"untrusted" : { + // "AET" : "ORTHANC", + // "Port" : 104, + // "Host" : "127.0.0.1", + // "Manufacturer" : "Generic", + // "AllowEcho" : false, + // "AllowFind" : false, + // "AllowFindWorklist" : false, // new in 1.10.0 + // "AllowGet" : false, + // "AllowMove" : false, + // "AllowStore" : true, + // "AllowStorageCommitment" : false, // new in 1.6.0 + // "AllowTranscoding" : true, // new in 1.7.0 + // "UseDicomTls" : false // new in 1.9.0 + // "LocalAet" : "HELLO" // new in 1.9.0 + // "Timeout" : 60 // new in 1.9.1 + //} + }, + + // Whether to store the DICOM modalities in the Orthanc database + // instead of in this configuration file (new in Orthanc 1.5.0) + "DicomModalitiesInDatabase" : false, + + // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU, + // while testing the connectivity from Orthanc to a remote DICOM + // modality. This allows one to check that the remote modality does + // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1). + "DicomEchoChecksFind" : false, + + // The timeout (in seconds) after which the DICOM associations are + // considered as closed by the Orthanc SCU (client) if the remote + // DICOM SCP (server) does not answer. + "DicomScuTimeout" : 10, + + // During a C-STORE SCU request initiated by Orthanc, if the remote + // modality doesn't support the original transfer syntax of some + // DICOM instance, specify which transfer syntax should be preferred + // to transcode this instance (provided the remote modality accepts + // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter + // was implicitly set to "Little Endian Implicit" + // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0, + // this parameter is by default set to "Little Endian Explicit" + // (1.2.840.10008.1.2.1). This parameter can possibly correspond to + // a compressed transfer syntax. (new in Orthanc 1.9.0) + "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1", + + // Number of threads that are used by the embedded DICOM server. + // This defines the number of concurrent DICOM operations that can + // be run. Note: This is not limiting the number of concurrent + // connections. With a single thread, if a C-Find is received during + // e.g the transcoding of an incoming C-Store, it will have to wait + // until the end of the C-Store before being processed. (new in + // Orthanc 1.10.0, before this version, the value was fixed to 4) + "DicomThreadsCount" : 4, + + // The list of the known Orthanc peers. This option is ignored if + // "OrthancPeersInDatabase" is set to "true", in which case you must + // use the REST API to define Orthanc peers. + "OrthancPeers" : { + /** + * Each line gives the base URL of an Orthanc peer, possibly + * followed by the username/password pair (if the password + * protection is enabled on the peer). + **/ + // "peer" : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ] + // "peer2" : [ "http://127.0.0.1:8044/" ] + + /** + * This is another, more advanced format to define Orthanc + * peers. It notably allows one to specify HTTP headers, a HTTPS + * client certificate in the PEM format (as in the "--cert" option + * of curl), or to enable PKCS#11 authentication for smart cards. + * + * The "Timeout" option allows one to overwrite the global value + * "HttpTimeout" on a per-peer basis. + **/ + // "peer" : { + // "Url" : "http://127.0.0.1:8043/", + // "Username" : "alice", + // "Password" : "alicePassword", + // "HttpHeaders" : { "Token" : "Hello world" }, + // "CertificateFile" : "client.crt", + // "CertificateKeyFile" : "client.key", + // "CertificateKeyPassword" : "certpass", + // "Pkcs11" : false, + // "Timeout" : 42 // New in Orthanc 1.9.1 + // } + }, + + // Whether to store the Orthanc peers in the Orthanc database + // instead of in this configuration file (new in Orthanc 1.5.0) + "OrthancPeersInDatabase" : false, + + // Parameters of the HTTP proxy to be used by Orthanc. If set to the + // empty string, no HTTP proxy is used. For instance: + // "HttpProxy" : "192.168.0.1:3128" + // "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128" + "HttpProxy" : "", + + // If set to "true", debug messages from libcurl will be issued + // whenever Orthanc makes an outgoing HTTP request. This is notably + // useful to debug HTTPS-related problems. + "HttpVerbose" : false, + + // Set the timeout for HTTP requests issued by Orthanc (in seconds). + "HttpTimeout" : 60, + + // Enable the verification of the peers during HTTPS requests. This + // option must be set to "false" if using self-signed certificates. + // Pay attention that setting this option to "false" results in + // security risks! + // Reference: http://curl.haxx.se/docs/sslcerts.html + "HttpsVerifyPeers" : true, + + // Path to the CA (certification authority) certificates to validate + // peers in HTTPS requests. From curl documentation ("--cacert" + // option): "Tells curl to use the specified certificate file to + // verify the peers. The file may contain multiple CA + // certificates. The certificate(s) must be in PEM format." On + // Debian-based systems, this option can be set to + // "/etc/ssl/certs/ca-certificates.crt" + "HttpsCACertificates" : "", + + + + /** + * Advanced options + **/ + + // Dictionary of symbolic names for the user-defined metadata. Each + // entry must map an unique string to an unique number between 1024 + // and 65535. Reserved values: + // - The Orthanc whole-slide imaging plugin uses metadata 4200 + "UserMetadata" : { + // "Sample" : 1024 + }, + + // Dictionary of symbolic names for the user-defined types of + // attached files. Each entry must map an unique string to an unique + // number between 1024 and 65535. Optionally, a second argument can + // provided to specify a MIME content type for the attachment. + "UserContentType" : { + // "sample" : 1024 + // "sample2" : [ 1025, "application/pdf" ] + }, + + // Number of seconds without receiving any instance before a + // patient, a study or a series is considered as stable. + "StableAge" : 60, + + // By default, Orthanc compares AET (Application Entity Titles) in a + // case-insensitive way. Setting this option to "true" will enable + // case-sensitive matching. + "StrictAetComparison" : false, + + // When the following option is "true", the MD5 of the DICOM files + // will be computed and stored in the Orthanc database. This + // information can be used to detect disk corruption, at the price + // of a small performance overhead. + "StoreMD5ForAttachments" : true, + + // The maximum number of results for a single C-FIND request at the + // Patient, Study or Series level. Setting this option to "0" means + // no limit. + "LimitFindResults" : 0, + + // The maximum number of results for a single C-FIND request at the + // Instance level. Setting this option to "0" means no limit. + "LimitFindInstances" : 0, + + // If this option is set to "true" (default behavior until Orthanc + // 1.3.2), Orthanc will log the resources that are exported to other + // DICOM modalities or Orthanc peers, inside the URI + // "/exports". Setting this option to "false" is useful to prevent + // the index to grow indefinitely in auto-routing tasks (this is the + // default behavior since Orthanc 1.4.0). + "LogExportedResources" : false, + + // Enable or disable HTTP Keep-Alive (persistent HTTP + // connections). Setting this option to "true" prevents Orthanc + // issue #32 ("HttpServer does not support multiple HTTP requests in + // the same TCP stream"), but can possibly slow down HTTP clients + // that do not support persistent connections. The default behavior + // used to be "false" in Orthanc <= 1.5.1. Setting this option to + // "false" is also recommended if Orthanc is compiled against + // Mongoose. + "KeepAlive" : true, + + // Enable or disable Nagle's algorithm. Only taken into + // consideration if Orthanc is compiled to use CivetWeb. Experiments + // show that best performance can be obtained by setting both + // "KeepAlive" and "TcpNoDelay" to "true". Beware however of + // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay + "TcpNoDelay" : true, + + // Number of threads that are used by the embedded HTTP server. + "HttpThreadsCount" : 50, + + // If this option is set to "false", Orthanc will run in index-only + // mode. The DICOM files will not be stored on the drive: Orthanc + // only indexes the small subset of the so-called "main DICOM tags" + // in its SQL database. Note that this option might prevent the + // upgrade to newer versions of Orthanc. Also note that this + // behavior might not be available with the storage area plugins. + "StoreDicom" : true, + + // DICOM associations initiated by Lua scripts are kept open as long + // as new DICOM commands are issued. This option sets the number of + // seconds of inactivity to wait before automatically closing a + // DICOM association used by Lua. If set to 0, the connection is + // closed immediately. This option is only used in Lua scripts. + "DicomAssociationCloseDelay" : 5, + + // Maximum number of query/retrieve DICOM requests that are + // maintained by Orthanc. The least recently used requests get + // deleted as new requests are issued. + "QueryRetrieveSize" : 100, + + // When handling a C-FIND SCP request, setting this flag to "true" + // will enable case-sensitive match for PN value representation + // (such as PatientName). By default, the search is + // case-insensitive, which does not follow the DICOM standard. + "CaseSensitivePN" : false, + + // Configure PKCS#11 to use hardware security modules (HSM) and + // smart cards when carrying on HTTPS client authentication. + /** + "Pkcs11" : { + "Module" : "/usr/local/lib/libbeidpkcs11.so", + "Module" : "C:/Windows/System32/beidpkcs11.dll", + "Pin" : "1234", + "Verbose" : true + } + **/ + + // If set to "false", Orthanc will not load its default dictionary + // of private tags. This might be necessary if you cannot import a + // DICOM file encoded using the Implicit VR Endian transfer syntax, + // and containing private tags: Such an import error might stem from + // a bad dictionary. You can still list your private tags of + // interest in the "Dictionary" configuration option below. + "LoadPrivateDictionary" : true, + + // Locale to be used by Orthanc. Currently, only used if comparing + // strings in a case-insensitive way. It should be safe to keep this + // value undefined, which lets Orthanc autodetect the suitable locale. + // "Locale" : "en_US.UTF-8", + + // Register a new tag in the dictionary of DICOM tags that are known + // to Orthanc. Each line must contain the tag (formatted as 2 + // hexadecimal numbers), the value representation (2 upcase + // characters), a nickname for the tag, possibly the minimum + // multiplicity (> 0 with defaults to 1), possibly the maximum + // multiplicity (0 means arbitrary multiplicity, defaults to 1), and + // possibly the Private Creator (for private tags). + // Note: For private tags, you should only declare the lower 8 bits + // of the element since the higher 8 bits may vary from one file to + // the other. + "Dictionary" : { + // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ] + // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ] + // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ] + // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ] + }, + + // Load a set of external DICOM dictionaries in order to replace the + // default dictionaries. This option must contain a set of files in + // the DCMTK format. The order of the dictionaries *is* + // important. This option can be used to turn Orthanc into a DICONDE + // server. (new in Orthanc 1.9.4) + /** + "ExternalDictionaries" : [ + "/usr/share/dcmtk/dicom.dic", + "/usr/share/dcmtk/diconde.dic" + ] + **/ + + // Whether to run DICOM C-MOVE operations synchronously. If set to + // "false" (asynchronous mode), each incoming C-MOVE request results + // in the creation of a new background job. Up to Orthanc 1.3.2, the + // implicit behavior was to use synchronous C-MOVE ("true"). Between + // Orthanc 1.4.0 and 1.4.2, the default behavior was set to + // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default + // behavior is back to synchronous C-MOVE ("true", which ensures + // backward compatibility with Orthanc <= 1.3.2). + "SynchronousCMove" : true, + + // Maximum number of completed jobs that are kept in memory. A + // processing job is considered as complete once it is tagged as + // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0" + // indicates to keep no job in memory (i.e. jobs are removed from + // the history as soon as they are completed), which prevents the + // use of some features of Orthanc (typically, synchronous mode in + // REST API) and should be avoided for non-developers. + "JobsHistorySize" : 10, + + // Whether to save the jobs into the Orthanc database. If this + // option is set to "true", the pending/running/completed jobs are + // automatically reloaded from the database if Orthanc is stopped + // then restarted (except if the "--no-jobs" command-line argument + // is specified). This option should be set to "false" if multiple + // Orthanc servers are using the same database (e.g. if PostgreSQL + // or MariaDB/MySQL is used). + "SaveJobs" : true, + + // Specifies how Orthanc reacts when it receives a DICOM instance + // whose SOPInstanceUID is already stored. If set to "true", the new + // instance replaces the old one. If set to "false", the new + // instance is discarded and the old one is kept. Up to Orthanc + // 1.4.1, the implicit behavior corresponded to "false". + "OverwriteInstances" : false, + + // Maximum number of ZIP/media archives that are maintained by + // Orthanc, as a response to the asynchronous creation of archives. + // The least recently used archives get deleted as new archives are + // generated. This option was introduced in Orthanc 1.5.0, and has + // no effect on the synchronous generation of archives. + "MediaArchiveSize" : 1, + + // Performance setting to specify how Orthanc accesses the storage + // area during find operations (C-FIND, /tools/find API route and + // QIDO-RS in dicom-web). Three modes are available: (1) "Always" + // allows Orthanc to read the storage area as soon as it needs an + // information that is not present in its database (slowest mode), + // (2) "Never" prevents Orthanc from accessing the storage area, and + // makes it uses exclusively its database (fastest mode), and (3) + // "Answers" allows Orthanc to read the storage area to generate its + // answers, but not to filter the DICOM resources (balance between + // the two modes). By default, the mode is "Always", which + // corresponds to the behavior of Orthanc <= 1.5.0. + "StorageAccessOnFind" : "Always", + + // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If + // set to "true", the metrics can be retrieved at + // "/tools/metrics-prometheus" formetted using the Prometheus + // text-based exposition format. + "MetricsEnabled" : true, + + // Whether calls to URI "/tools/execute-script" is enabled. Starting + // with Orthanc 1.5.8, this URI is disabled by default for security. + "ExecuteLuaEnabled" : false, + + // Set the timeout while serving HTTP requests by the embedded Web + // server, in seconds. This corresponds to option + // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket + // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value. + "HttpRequestTimeout" : 30, + + // Set the default private creator that is used by Orthanc when it + // looks for a private tag in its dictionary (cf. "Dictionary" + // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0). + "DefaultPrivateCreator" : "", + + // Maximum number of storage commitment reports (i.e. received from + // remote modalities) to be kept in memory (new in Orthanc 1.6.0). + "StorageCommitmentReportsSize" : 100, + + // Whether Orthanc transcodes DICOM files to an uncompressed + // transfer syntax over the DICOM protocol, if the remote modality + // does not support compressed transfer syntaxes (new in Orthanc 1.7.0). + "TranscodeDicomProtocol" : true, + + // If some plugin to decode/transcode DICOM instances is installed, + // this option specifies whether the built-in decoder/transcoder of + // Orthanc (that uses DCMTK) is applied before or after the plugins, + // or is not applied at all (new in Orthanc 1.7.0). The allowed + // values for this option are "After" (default value, corresponding + // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled". + "BuiltinDecoderTranscoderOrder" : "After", + + // If this option is set, Orthanc will transparently transcode any + // incoming DICOM instance to the given transfer syntax before + // storing it into its database. Beware that this might result in + // high CPU usage (if transcoding to some compressed transfer + // syntax), or in higher disk consumption (if transcoding to an + // uncompressed syntax). Also, beware that transcoding to a transfer + // syntax with lossy compression (notably JPEG) will change the + // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at + // the instance level, which might break external workflow. + /** + "IngestTranscoding" : "1.2.840.10008.1.2", + **/ + + // Whether ingest transcoding is applied to incoming DICOM instances + // that have an uncompressed transfer syntax, i.e. Little Endian + // Implicit, Little Endian Explicit or Big Endian Explicit (new in + // Orthanc 1.8.2). + "IngestTranscodingOfUncompressed" : true, + + // Whether ingest transcoding is applied to incoming DICOM instances + // that have a compressed transfer syntax (new in Orthanc 1.8.2). + "IngestTranscodingOfCompressed" : true, + + // The compression level that is used when transcoding to one of the + // lossy/JPEG transfer syntaxes (integer between 1 and 100). + "DicomLossyTranscodingQuality" : 90, + + // Whether "fsync()" is called after each write to the storage area + // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc + // will run more slowly, but the DICOM are guaranteed to be + // immediately written to the disk. This option only makes sense if + // the builtin filesystem storage area is used. It defaults to + // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4. + "SyncStorageArea" : true, + + // If specified, on compatible systems, call "mallopt(M_ARENA_MAX, + // ...)" while starting Orthanc. This has the same effect at setting + // the environment variable "MALLOC_ARENA_MAX". This avoids large + // growth in RES memory if the threads of the embedded HTTP server + // have to allocate large chunks of memory (typically the case with + // large DICOM files). By setting "MallocArenaMax" to "N", these + // threads share "N" memory pools (known as "arenas"). Setting this + // option to "0" doesn't call mallopt()", which was the behavior of + // Orthanc <= 1.8.1. + "MallocArenaMax" : 5, + + // Deidentify/anonymize the contents of the logs (notably C-FIND, + // C-GET, and C-MOVE queries submitted to Orthanc) according to + // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2) + "DeidentifyLogs" : true, + + // If "DeidentifyLogs" is true, this sets the DICOM standard to + // follow for the deidentification/anonymization of the query + // contents. Possible values are "2008", "2017c" and "2021b" (new + // in Orthanc 1.8.2) + "DeidentifyLogsDicomVersion" : "2021b", + + // Maximum length of the PDU (Protocol Data Unit) in the DICOM + // network protocol, expressed in bytes. This value affects both + // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed + // range is [4096,131072]. (new in Orthanc 1.9.0) + "MaximumPduLength" : 16384, + + // Arbitrary identifier of this Orthanc server when storing its + // global properties if a custom index plugin is used. This + // identifier is only useful in the case of multiple + // readers/writers, in order to avoid collisions between multiple + // Orthanc servers. If unset, this identifier is taken as a SHA-1 + // hash derived from the MAC addresses of the network interfaces, + // and from the AET and TCP ports used by Orthanc. Manually setting + // this option is needed in Docker/Kubernetes environments. (new in + // Orthanc 1.9.2) + /** + "DatabaseServerIdentifier" : "Orthanc1", + **/ + + // Whether Orthanc protects the modification of metadata and + // attachments using revisions, which is done using the HTTP headers + // "ETag", "If-Match" and "If-None-Match" in the calls to the REST + // API. This is needed to handle collisions between concurrent + // modifications in the case of multiple writers. The database + // back-end must support this option, which is notably *not* yet the + // case of the built-in SQLite index. (new in Orthanc 1.9.2) + "CheckRevisions" : false, + + // Whether Orthanc streams ZIP archive/media to the HTTP + // client. Setting this option to "false" corresponds to the + // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written + // to a temporary file, then sent to the client (which necessitates + // disk space and might lead to HTTP timeouts on large archives). If + // set to "true", the chunks of the ZIP file are progressively sent + // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4) + "SynchronousZipStream" : true, + + // Default number of loader threads when generating Zip archive/media. + // A value of 0 means reading and writing are performed in sequence + // (default behaviour). A value > 1 is meaningful only if the storage + // is a distributed network storage (e.g object storage plugin). + // (new experimental feature in Orthanc 1.10.0) + "ZipLoaderThreads": 0, + + // Extra Main Dicom tags that are stored in DB together with all default + // Main Dicom tags that are already stored (TODO: see book new page). + // (new in Orthanc 1.11.0) + // Sequences tags are not supported. + /** + "ExtraMainDicomTags" : { + "Instance" : [ + "Rows", + "Columns", + "ImageType", + "SOPClassUID", + "ContentDate", + "ContentTime", + "FrameOfReferenceUID", + "PixelSpacing", + "SpecificCharacterSet", + "BitsAllocated" + ], + "Series" : [], + "Study": [], + "Patient": [] + }, + */ + + // Enables/disables warnings in the logs. + // "true" enables a warning. All warnings are enabled by default + // TODO: see book new page + // (new in Orthanc 1.11.0) + "Warnings" : { + // A "RequestedTags" has been read from storage which is slower than + // reading it from DB. + // You might want to store this tag in ExtraMainDicomTags to build + // the response faster. + "W001_TagsBeingReadFromStorage": true, + + // Retrieving a list of Main dicom tags from a resource that has been + // saved with another "ExtraMainDicomTags" configuration which means that + // your response might be incomplete/inconsistent. + // You should call patients|studies|series|instances/../reconstruct to rebuild + // the DB. TODO: also check for "rebuild DB" plugin + "W002_InconsistentDicomTagsInDb": true + } + +} diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run new file mode 100755 index 000000000000..32050bf2928c --- /dev/null +++ b/srcpkgs/Orthanc/files/orthanc/run @@ -0,0 +1,32 @@ +#!/bin/sh +OPTS="" +[ -r conf ] && . ./conf + +: ${USER:="_orthanc"} + +: ${CONFIGFILE:="/etc/orthanc/Configuration.json"} +[ -r $CONFIGFILE ] || exit 1 + +: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"} +if [ ! -e $ORTHANCSTORAGE ] +then + mkdir -pm 0750 $ORTHANCSTORAGE && + chown ${USER}:${USER} $ORTHANCSTORAGE || + exit 1 +fi + +# Enable log +if [ -n $LOG ]; then + : ${LOGDIR:="/log/orthanc"} + OPTS="${OPTS}--logdir=$LOGDIR " + + if [ ! -e $LOGDIR ]; then + mkdir -pm 0750 $LOGDIR && + chown ${USER}:${USER} $LOGDIR || + exit 1 + fi +fi + +# Set OPTS on conf file for aditional parameters +OPTS="$OPTS$CONFIGFILE" +exec chpst -u ${USER}:${USER} Orthanc $OPTS diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template new file mode 100644 index 000000000000..d5cb61514619 --- /dev/null +++ b/srcpkgs/Orthanc/template @@ -0,0 +1,57 @@ +# Template file for 'Orthanc' +pkgname=Orthanc +version=1.11.1 +revision=1 +build_wrksrc="OrthancServer" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk" +hostmakedepends="python3 unzip tar doxygen dcmtk" +makedepends="libuuid-devel boost-devel libcurl-devel + libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel + sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel + pugixml-devel" +depends="dcmtk" +short_desc="Lightweight RESTful DICOM server" +maintainer="Carlos E. Gallo F. " +license="GPL-3.0-or-later" +homepage="https://www.orthanc-server.com/index.php" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz" +checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5 +ignore_elf_dirs="/usr/share/orthanc" +python_version=3 + +# Create '_orthanc' user for the server +system_accounts="_orthanc" +_orthanc_descr="Orthanc server user" +conf_files="etc/orthanc/Configuration.json" + +post_install() { + cd ${DESTDIR} + mv usr/sbin/* usr/bin/ + rm -rf usr/sbin + + # Remove garbage + rm -rf builddir + + vsv orthanc + vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc +} + +Orthanc-devel_package() { + depends+=" ${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/share/doc + vmkdir usr/share/orthanc/OrthancFramework 0755 + vcopy ${wrksrc}/OrthancFramework usr/share/orthanc + } +} + +Orthanc-plugins_package() { + depends+=" ${sourcepkg}>=${version}_${revision}" + short_desc+=" - official plugins" + pkg_install() { + vmove usr/share/orthanc/plugins + } +} From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:59 -0300 Subject: [PATCH 04/13] New package: Orthanc-DicomWeb-1.9 --- srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 srcpkgs/Orthanc-DicomWeb/template diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template new file mode 100644 index 000000000000..e1300c4d4550 --- /dev/null +++ b/srcpkgs/Orthanc-DicomWeb/template @@ -0,0 +1,22 @@ +# Template file for 'Orthanc-DicomWeb' +pkgname=Orthanc-DicomWeb +version=1.9 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" +hostmakedepends="tar unzip python3" +makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel + libuuid-devel boost-devel" +short_desc="Plugin to bring support of the DICOMweb standard into Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://www.orthanc-server.com/static.php?page=dicomweb" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz" +checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f +ignore_elf_dirs="/usr/share/orthanc" + +post_install() { + vlicense COPYING +} From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:25:15 -0300 Subject: [PATCH 05/13] New package: Orthanc-PostgreSQL-4.0 --- srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/Orthanc-PostgreSQL/template diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template new file mode 100644 index 000000000000..630a333a62fe --- /dev/null +++ b/srcpkgs/Orthanc-PostgreSQL/template @@ -0,0 +1,23 @@ +# Template file for 'Orthanc-PostgreSQL' +pkgname=Orthanc-PostgreSQL +version=4.0 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_wrksrc="PostgreSQL" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" +hostmakedepends="tar unzip python3" +makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel + jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel" +short_desc="PostgreSQL database plugin for Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://www.orthanc-server.com/static.php?page=dicomweb" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz" +checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5 +ignore_elf_dirs="/usr/share/orthanc" + +post_install() { + vlicense ../COPYING +} From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:25:48 -0300 Subject: [PATCH 06/13] New package: Orthanc-Python-4.0 --- srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/Orthanc-Python/template diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template new file mode 100644 index 000000000000..347c622c9eff --- /dev/null +++ b/srcpkgs/Orthanc-Python/template @@ -0,0 +1,23 @@ +# Template file for 'Orthanc-Python' +pkgname=Orthanc-Python +version=4.0 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources + -DPYTHON_VERSION=3.10" +hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config" +makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel + python3-devel>=3.10<3.11" +short_desc="Python plugin for Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://book.orthanc-server.com/plugins/python.html" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz" +checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647 +ignore_elf_dirs="/usr/share/orthanc" + +post_install() { + vlicense COPYING +} From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:16 -0300 Subject: [PATCH 07/13] New package: dcmtk-3.6.7 --- common/shlibs | 1 - 1 file changed, 1 deletion(-) diff --git a/common/shlibs b/common/shlibs index 39dd712edb27..d3fd58874703 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1 libopensmtpd.so.0 libopensmtpd-0.7_1 libiio.so.0 libiio-0.23_1 libcivetweb.so.1 libcivetweb-1.15_1 -libcmr.so.17 libcmr.so.17 libdcmtk-3.6.7_1 libdcmrt.so.17 libdcmtk-3.6.7_1 libdcmdata.so.17 libdcmtk-3.6.7_1 From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:59 -0300 Subject: [PATCH 08/13] New package: Orthanc-DicomWeb-1.9 --- srcpkgs/Orthanc-DicomWeb/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template index e1300c4d4550..ce68fbd8038a 100644 --- a/srcpkgs/Orthanc-DicomWeb/template +++ b/srcpkgs/Orthanc-DicomWeb/template @@ -7,7 +7,7 @@ build_style=cmake configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" hostmakedepends="tar unzip python3" -makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel +makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel libuuid-devel boost-devel" short_desc="Plugin to bring support of the DICOMweb standard into Orthanc" maintainer="Carlos E. Gallo F. " From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:25:15 -0300 Subject: [PATCH 09/13] New package: Orthanc-PostgreSQL-4.0 --- srcpkgs/Orthanc-PostgreSQL/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template index 630a333a62fe..360fe0c56796 100644 --- a/srcpkgs/Orthanc-PostgreSQL/template +++ b/srcpkgs/Orthanc-PostgreSQL/template @@ -8,7 +8,7 @@ build_style=cmake configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" hostmakedepends="tar unzip python3" -makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel +makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel" short_desc="PostgreSQL database plugin for Orthanc" maintainer="Carlos E. Gallo F. " From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:25:48 -0300 Subject: [PATCH 10/13] New package: Orthanc-Python-4.0 --- srcpkgs/Orthanc-Python/template | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template index 347c622c9eff..3efa389a99c5 100644 --- a/srcpkgs/Orthanc-Python/template +++ b/srcpkgs/Orthanc-Python/template @@ -7,9 +7,8 @@ build_style=cmake configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources -DPYTHON_VERSION=3.10" -hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config" -makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel - python3-devel>=3.10<3.11" +hostmakedepends="tar unzip python3 pkg-config" +makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel" short_desc="Python plugin for Orthanc" maintainer="Carlos E. Gallo F. " license="AGPL-3.0-or-later" From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:41 -0300 Subject: [PATCH 11/13] New package: Orthanc-1.11.1 --- srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run index 32050bf2928c..08f727da62c1 100755 --- a/srcpkgs/Orthanc/files/orthanc/run +++ b/srcpkgs/Orthanc/files/orthanc/run @@ -5,28 +5,27 @@ OPTS="" : ${USER:="_orthanc"} : ${CONFIGFILE:="/etc/orthanc/Configuration.json"} -[ -r $CONFIGFILE ] || exit 1 +[ -r "$CONFIGFILE" ] || exit 1 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"} -if [ ! -e $ORTHANCSTORAGE ] +if [ ! -e "$ORTHANCSTORAGE" ] then - mkdir -pm 0750 $ORTHANCSTORAGE && - chown ${USER}:${USER} $ORTHANCSTORAGE || + mkdir -pm 0750 "$ORTHANCSTORAGE" && + chown ${USER}:${USER} "$ORTHANCSTORAGE" || exit 1 fi # Enable log -if [ -n $LOG ]; then +if [ -n "$LOG" ]; then : ${LOGDIR:="/log/orthanc"} - OPTS="${OPTS}--logdir=$LOGDIR " + OPTS="${OPTS} --logdir=\"$LOGDIR\"" - if [ ! -e $LOGDIR ]; then - mkdir -pm 0750 $LOGDIR && - chown ${USER}:${USER} $LOGDIR || + if [ ! -e "$LOGDIR" ]; then + mkdir -pm 0750 "$LOGDIR" && + chown ${USER}:${USER} "$LOGDIR" || exit 1 fi fi # Set OPTS on conf file for aditional parameters -OPTS="$OPTS$CONFIGFILE" -exec chpst -u ${USER}:${USER} Orthanc $OPTS +exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}" From 28295cf4013a38911719d903831794b127478322 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:41 -0300 Subject: [PATCH 12/13] New package: Orthanc-1.11.1 --- srcpkgs/Orthanc/files/Configuration.json | 915 ----------------------- srcpkgs/Orthanc/patches/config.patch | 28 + srcpkgs/Orthanc/template | 9 +- 3 files changed, 33 insertions(+), 919 deletions(-) delete mode 100644 srcpkgs/Orthanc/files/Configuration.json create mode 100644 srcpkgs/Orthanc/patches/config.patch diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json deleted file mode 100644 index e0e594bb4647..000000000000 --- a/srcpkgs/Orthanc/files/Configuration.json +++ /dev/null @@ -1,915 +0,0 @@ -{ - /** - * General configuration of Orthanc - **/ - - // The logical name of this instance of Orthanc. This one is - // displayed in Orthanc Explorer and at the URI "/system". - "Name" : "MyOrthanc", - - // Path to the directory that holds the heavyweight files (i.e. the - // raw DICOM instances). Backslashes must be either escaped by - // doubling them, or replaced by forward slashes "/". - "StorageDirectory" : "/var/lib/OrthancStorage", - - // Path to the directory that holds the SQLite index (if unset, the - // value of StorageDirectory is used). This index could be stored on - // a RAM-drive or a SSD device for performance reasons. - "IndexDirectory" : "/var/lib/OrthancStorage", - - // Path to the directory where Orthanc stores its large temporary - // files. The content of this folder can be safely deleted once - // Orthanc is stopped. The folder must exist. The corresponding - // filesystem must be properly sized, given that for instance a ZIP - // archive of DICOM images created by a job can weight several GBs, - // and that there might be up to "min(JobsHistorySize, - // MediaArchiveSize)" archives to be stored simultaneously. If not - // set, Orthanc will use the default temporary folder of the - // operating system (such as "/tmp/" on UNIX-like systems, or - // "C:/Temp" on Microsoft Windows). - // "TemporaryDirectory" : "/tmp/Orthanc/", - - // Enable the transparent compression of the DICOM instances - "StorageCompression" : false, - - // Maximum size of the storage in MB (a value of "0" indicates no - // limit on the storage size) - "MaximumStorageSize" : 0, - - // Maximum number of patients that can be stored at a given time - // in the storage (a value of "0" indicates no limit on the number - // of patients) - "MaximumPatientCount" : 0, - - // Maximum size of the storage cache in MB. The storage cache - // is stored in RAM and contains a copy of recently accessed - // files (written or read). A value of "0" indicates the cache - // is disabled. (new in Orthanc 1.10.0) - "MaximumStorageCacheSize" : 128, - - // List of paths to the custom Lua scripts that are to be loaded - // into this instance of Orthanc - "LuaScripts" : [ - ], - - // The period (in seconds) between 2 calls of the "OnHeartBeat" - // lua callback. O means the heart beat is disabled. - // TODO: text below for Orthanc book: - // Note: that the period is not actually the delay between - // the end of an execution and the triggering of the next one. - // Since there is only one lua context, if other lua code is being - // executed, the heart beat might be delayed even more. - "LuaHeartBeatPeriod" : 0, - - // List of paths to the plugins that are to be loaded into this - // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or - // "./PluginTest.dll" for Windows). These paths can refer to - // folders, in which case they will be scanned non-recursively to - // find shared libraries. Backslashes must be either escaped by - // doubling them, or replaced by forward slashes "/". - "Plugins" : [ - ], - - // Maximum number of processing jobs that are simultaneously running - // at any given time. A value of "0" indicates to use all the - // available CPU logical cores. To emulate Orthanc <= 1.3.2, set - // this value to "1". - "ConcurrentJobs" : 2, - - - /** - * Configuration of the HTTP server - **/ - - // Enable the HTTP server. If this parameter is set to "false", - // Orthanc acts as a pure DICOM server. The REST API and Orthanc - // Explorer will not be available. - "HttpServerEnabled" : true, - - // Enable/disable the Orthanc Explorer Web user interface. This - // option is only meaningful if the "HttpServerEnabled" option is - // set to "true" (new in Orthanc 1.8.2). - "OrthancExplorerEnabled" : true, - - // HTTP port for the REST services and for the GUI - "HttpPort" : 8042, - - // When the following option is "true", if an error is encountered - // while calling the REST API, a JSON message describing the error - // is put in the HTTP answer. This feature can be disabled if the - // HTTP client does not properly handles such answers. - "HttpDescribeErrors" : true, - - // Enable HTTP compression to improve network bandwidth utilization, - // at the expense of more computations on the server. Orthanc - // supports the "gzip" and "deflate" HTTP encodings. - "HttpCompressionEnabled" : true, - - // Enable the publication of the content of the Orthanc server as a - // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV - // share is mapped as "http://localhost:8042/webdav/". - "WebDavEnabled" : true, - - // Whether to allow deletions through the WebDAV share. This is - // disabled by default to avoid accidental loss of DICOM instances. - "WebDavDeleteAllowed" : false, - - // Whether to allow uploads through the WebDAV share. - "WebDavUploadAllowed" : true, - - - - /** - * Configuration of the DICOM server - **/ - - // Enable the DICOM server. If this parameter is set to "false", - // Orthanc acts as a pure REST server. It will not be possible to - // receive files or to do query/retrieve through the DICOM protocol. - "DicomServerEnabled" : true, - - // The DICOM Application Entity Title (cannot be longer than 16 - // characters) - "DicomAet" : "ORTHANC", - - // Check whether the called AET corresponds to the AET of Orthanc - // during an incoming DICOM SCU request - "DicomCheckCalledAet" : false, - - // The DICOM port - "DicomPort" : 4242, - - // The default encoding that is assumed for DICOM files without - // "SpecificCharacterSet" DICOM tag, and that is used when answering - // C-FIND requests (including worklists). The allowed values are - // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4", - // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew", - // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and - // "SimplifiedChinese". - "DefaultEncoding" : "Latin1", - - // The transfer syntaxes that are accepted by Orthanc C-STORE SCP. - // This is an array listing the accepted transfer syntax UIDs. Each - // entry can contain wildcards ("?" or "*"). By default, all the - // known transfer syntaxes are accepted. (new in Orthanc 1.9.0) - "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ], - - // User-friendly groups of transfer syntaxes that can be enabled or - // disabled at once. These options are applied after the main - // "AcceptedTransferSyntaxes" option has been applied (if present). - /** - "DeflatedTransferSyntaxAccepted" : true, - "JpegTransferSyntaxAccepted" : true, - "Jpeg2000TransferSyntaxAccepted" : true, - "JpegLosslessTransferSyntaxAccepted" : true, - "JpipTransferSyntaxAccepted" : true, - "Mpeg2TransferSyntaxAccepted" : true, - "RleTransferSyntaxAccepted" : true, - "Mpeg4TransferSyntaxAccepted" : true, // New in Orthanc 1.6.0 - "H265TransferSyntaxAccepted" : true, // New in Orthanc 1.9.0 - **/ - - // Whether Orthanc accepts to act as C-STORE SCP for unknown storage - // SOP classes (aka. "promiscuous mode") - "UnknownSopClassAccepted" : false, - - // Set the timeout (in seconds) after which the DICOM associations - // are closed by the Orthanc SCP (server) if no further DIMSE - // command is received from the SCU (client). - "DicomScpTimeout" : 30, - - - - /** - * Security-related options for the HTTP server - **/ - - // Whether remote hosts can connect to the HTTP server - "RemoteAccessAllowed" : false, - - // Whether or not SSL is enabled - "SslEnabled" : false, - - // Path to the SSL certificate used by the HTTP server. The file - // must be stored in the PEM format, and must contain both the - // certificate and the private key. This option is only meaningful - // if "SslEnabled" is true. - "SslCertificate" : "certificate.pem", - - // Sets the minimum accepted SSL protocol version - // (cf. "ssl_protocol_version" option of civetweb). By default, - // require SSL 1.2. This option is only meaningful if "SslEnabled" - // is true. (new in Orthanc 1.8.2) - // - // Value => Protocols - // 0 SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2 - // 1 SSL3+TLS1.0+TLS1.1+TLS1.2 - // 2 TLS1.0+TLS1.1+TLS1.2 - // 3 TLS1.1+TLS1.2 - // 4 TLS1.2 - "SslMinimumProtocolVersion" : 4, - - // Set the accepted ciphers for SSL connections. The ciphers must be - // provided as a list of strings. If not set, this will default to - // FIPS 140-2 ciphers. This option is only meaningful if - // "SslEnabled" is true. (new in Orthanc 1.8.2) - /** - "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ], - **/ - - // Whether or not peer client certificates shall be checked. This - // option is only meaningful if "SslEnabled" is true. - "SslVerifyPeers" : false, - - // Path to a file containing the concatenation of the client SSL - // certificate(s) that are trusted to verify the identify of remote - // HTTP clients. The individual certificate(s) must be stored in the - // PEM format. This option is only meaningful if "SslVerifyPeers" - // is true. - "SslTrustedClientCertificates" : "trustedClientCertificates.pem", - - // Whether or not the password protection is enabled (using HTTP - // basic access authentication). Starting with Orthanc 1.5.8, if - // "AuthenticationEnabled" is not explicitly set, authentication is - // enabled iff. remote access is allowed (i.e. the default value of - // "AuthenticationEnabled" equals that of "RemoteAccessAllowed"). - /** - "AuthenticationEnabled" : false, - **/ - - // The list of the registered users. Because Orthanc uses HTTP - // Basic Authentication, the passwords are stored as plain text. - "RegisteredUsers" : { - // "alice" : "alicePassword" - }, - - - - /** - * Security-related options for the DICOM connections (SCU/SCP) - **/ - - // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0) - "DicomTlsEnabled" : false, - - // Path to the TLS certificate file (in PEM format) to be used for - // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU - // (outgoing DICOM connections). Note that contrarily to the - // "SslCertificate" option, the certificate and its private key must - // be split into two separate files. (new in Orthanc 1.9.0) - /** - "DicomTlsCertificate" : "orthanc.crt", - **/ - - // Path to the file containing the private key (in PEM format) that - // corresponds to the TLS certificate specified in option - // "DicomTlsCertificate". (new in Orthanc 1.9.0) - /** - "DicomTlsPrivateKey" : "orthanc.key", - **/ - - // Path to a file containing all the TLS certificates that Orthanc - // can trust, both for its SCP (incoming DICOM connections) and SCU - // (outgoing DICOM connections). This file must contain a sequence - // of PEM certificates. (new in Orthanc 1.9.0) - /** - "DicomTlsTrustedCertificates" : "trusted.crt", - **/ - - // Whether Orthanc rejects DICOM TLS connections to/from remote - // modalities that do not provide a certificate. Setting this option - // to "true" (resp. "false") corresponds to "--require-peer-cert" - // (resp. "--verify-peer-cert") in the DCMTK command-line - // tools. (new in Orthanc 1.9.3) - "DicomTlsRemoteCertificateRequired" : true, - - // Whether the Orthanc SCP allows incoming C-ECHO requests, even - // from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above). Orthanc 1.3.0 - // is the only version to behave as if this argument were set to "false". - "DicomAlwaysAllowEcho" : true, - - // Whether the Orthanc SCP allows incoming C-STORE requests, even - // from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above) - "DicomAlwaysAllowStore" : true, - - // Whether the Orthanc SCP allows incoming C-FIND requests, even - // from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above). Setting this - // option to "true" implies security risks. (new in Orthanc 1.9.0) - // Note: From Orthanc 1.10.0, this option only applies to C-FIND - // requests for patients/studies/series/instances. Use option - // "DicomAlwaysAllowFindWorklist" for worklists. - "DicomAlwaysAllowFind" : false, - - // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, - // even from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above). Setting this - // option to "true" implies security risks. (new in Orthanc 1.10.0) - "DicomAlwaysAllowFindWorklist" : false, - - // Whether the Orthanc SCP allows incoming C-GET requests, even - // from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above). Setting this - // option to "true" implies security risks. (new in Orthanc 1.9.0) - "DicomAlwaysAllowGet" : false, - - // Whether the Orthanc SCP allows incoming C-MOVE requests, even - // from SCU modalities it does not know about (i.e. that are not - // listed in the "DicomModalities" option above). Setting this - // option to "true" implies security risks. (new in Orthanc 1.9.7) - "DicomAlwaysAllowMove" : false, - - // Whether Orthanc checks the IP/hostname address of the remote - // modality initiating a DICOM connection (as listed in the - // "DicomModalities" option above). If this option is set to - // "false", Orthanc only checks the AET of the remote modality. - "DicomCheckModalityHost" : false, - - - - /** - * Network topology - **/ - - // The list of the known DICOM modalities. This option is ignored if - // "DicomModalitiesInDatabase" is set to "true", in which case you - // must use the REST API to define modalities. - "DicomModalities" : { - /** - * Uncommenting the following line would enable Orthanc to - * connect to an instance of the "storescp" open-source DICOM - * store (shipped in the DCMTK distribution), as started by the - * command line "storescp 2000". The first parameter is the - * AET of the remote modality (cannot be longer than 16 - * characters), the second one is the remote network address, - * and the third one is the TCP port number corresponding - * to the DICOM protocol on the remote modality (usually 104). - **/ - // "sample" : [ "STORESCP", "127.0.0.1", 2000 ] - - /** - * A fourth parameter is available to enable patches for - * specific PACS manufacturers. The allowed values are currently: - * - "Generic" (default value), - * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields - * in outgoing C-FIND requests originating from Orthanc), - * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields - * in outgoing C-FIND SCU requests originating from Orthanc), - * - "Vitrea", - * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation - * from GE Healthcare). - * - * This parameter is case-sensitive. - **/ - // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ] - - /** - * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO, - * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the - * registered remote SCU modalities. Starting with Orthanc 1.5.0, - * it is possible to specify which DICOM commands are allowed, - * separately for each remote modality, using the syntax - * below. - * - * The "AllowEcho" (resp. "AllowStore") option only has an effect - * respectively if global option "DicomAlwaysAllowEcho" - * (resp. "DicomAlwaysAllowStore") is set to "false". - * - * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to - * disable the transcoding to uncompressed transfer syntaxes if - * this remote modality doesn't support compressed transfer - * syntaxes. This option currently applies to Orthanc C-GET SCP - * and to Orthanc C-STORE SCU. This option only has an effect if - * the global option "EnableTranscoding" is set to "true". - * - * By default, all "Allow*" options are true. - * "AllowStorageCommitment" is actually an alias for - * "AllowNAction" & "AllowEventReport". - * - * The "UseDicomTls" option specifies whether DICOM TLS should be - * used when opening a SCU connection from Orthanc to this remote - * modality. By default, DICOM TLS is not enabled. - * - * The "LocalAet" option allows one to overwrite the global - * "DicomAet" configuration option in order to specify another AET - * for Orthanc when initiating an SCU to this very specific - * modality. Similarly, "Timeout" allows one to overwrite the - * global value "DicomScuTimeout" on a per-modality basis. - **/ - //"untrusted" : { - // "AET" : "ORTHANC", - // "Port" : 104, - // "Host" : "127.0.0.1", - // "Manufacturer" : "Generic", - // "AllowEcho" : false, - // "AllowFind" : false, - // "AllowFindWorklist" : false, // new in 1.10.0 - // "AllowGet" : false, - // "AllowMove" : false, - // "AllowStore" : true, - // "AllowStorageCommitment" : false, // new in 1.6.0 - // "AllowTranscoding" : true, // new in 1.7.0 - // "UseDicomTls" : false // new in 1.9.0 - // "LocalAet" : "HELLO" // new in 1.9.0 - // "Timeout" : 60 // new in 1.9.1 - //} - }, - - // Whether to store the DICOM modalities in the Orthanc database - // instead of in this configuration file (new in Orthanc 1.5.0) - "DicomModalitiesInDatabase" : false, - - // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU, - // while testing the connectivity from Orthanc to a remote DICOM - // modality. This allows one to check that the remote modality does - // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1). - "DicomEchoChecksFind" : false, - - // The timeout (in seconds) after which the DICOM associations are - // considered as closed by the Orthanc SCU (client) if the remote - // DICOM SCP (server) does not answer. - "DicomScuTimeout" : 10, - - // During a C-STORE SCU request initiated by Orthanc, if the remote - // modality doesn't support the original transfer syntax of some - // DICOM instance, specify which transfer syntax should be preferred - // to transcode this instance (provided the remote modality accepts - // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter - // was implicitly set to "Little Endian Implicit" - // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0, - // this parameter is by default set to "Little Endian Explicit" - // (1.2.840.10008.1.2.1). This parameter can possibly correspond to - // a compressed transfer syntax. (new in Orthanc 1.9.0) - "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1", - - // Number of threads that are used by the embedded DICOM server. - // This defines the number of concurrent DICOM operations that can - // be run. Note: This is not limiting the number of concurrent - // connections. With a single thread, if a C-Find is received during - // e.g the transcoding of an incoming C-Store, it will have to wait - // until the end of the C-Store before being processed. (new in - // Orthanc 1.10.0, before this version, the value was fixed to 4) - "DicomThreadsCount" : 4, - - // The list of the known Orthanc peers. This option is ignored if - // "OrthancPeersInDatabase" is set to "true", in which case you must - // use the REST API to define Orthanc peers. - "OrthancPeers" : { - /** - * Each line gives the base URL of an Orthanc peer, possibly - * followed by the username/password pair (if the password - * protection is enabled on the peer). - **/ - // "peer" : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ] - // "peer2" : [ "http://127.0.0.1:8044/" ] - - /** - * This is another, more advanced format to define Orthanc - * peers. It notably allows one to specify HTTP headers, a HTTPS - * client certificate in the PEM format (as in the "--cert" option - * of curl), or to enable PKCS#11 authentication for smart cards. - * - * The "Timeout" option allows one to overwrite the global value - * "HttpTimeout" on a per-peer basis. - **/ - // "peer" : { - // "Url" : "http://127.0.0.1:8043/", - // "Username" : "alice", - // "Password" : "alicePassword", - // "HttpHeaders" : { "Token" : "Hello world" }, - // "CertificateFile" : "client.crt", - // "CertificateKeyFile" : "client.key", - // "CertificateKeyPassword" : "certpass", - // "Pkcs11" : false, - // "Timeout" : 42 // New in Orthanc 1.9.1 - // } - }, - - // Whether to store the Orthanc peers in the Orthanc database - // instead of in this configuration file (new in Orthanc 1.5.0) - "OrthancPeersInDatabase" : false, - - // Parameters of the HTTP proxy to be used by Orthanc. If set to the - // empty string, no HTTP proxy is used. For instance: - // "HttpProxy" : "192.168.0.1:3128" - // "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128" - "HttpProxy" : "", - - // If set to "true", debug messages from libcurl will be issued - // whenever Orthanc makes an outgoing HTTP request. This is notably - // useful to debug HTTPS-related problems. - "HttpVerbose" : false, - - // Set the timeout for HTTP requests issued by Orthanc (in seconds). - "HttpTimeout" : 60, - - // Enable the verification of the peers during HTTPS requests. This - // option must be set to "false" if using self-signed certificates. - // Pay attention that setting this option to "false" results in - // security risks! - // Reference: http://curl.haxx.se/docs/sslcerts.html - "HttpsVerifyPeers" : true, - - // Path to the CA (certification authority) certificates to validate - // peers in HTTPS requests. From curl documentation ("--cacert" - // option): "Tells curl to use the specified certificate file to - // verify the peers. The file may contain multiple CA - // certificates. The certificate(s) must be in PEM format." On - // Debian-based systems, this option can be set to - // "/etc/ssl/certs/ca-certificates.crt" - "HttpsCACertificates" : "", - - - - /** - * Advanced options - **/ - - // Dictionary of symbolic names for the user-defined metadata. Each - // entry must map an unique string to an unique number between 1024 - // and 65535. Reserved values: - // - The Orthanc whole-slide imaging plugin uses metadata 4200 - "UserMetadata" : { - // "Sample" : 1024 - }, - - // Dictionary of symbolic names for the user-defined types of - // attached files. Each entry must map an unique string to an unique - // number between 1024 and 65535. Optionally, a second argument can - // provided to specify a MIME content type for the attachment. - "UserContentType" : { - // "sample" : 1024 - // "sample2" : [ 1025, "application/pdf" ] - }, - - // Number of seconds without receiving any instance before a - // patient, a study or a series is considered as stable. - "StableAge" : 60, - - // By default, Orthanc compares AET (Application Entity Titles) in a - // case-insensitive way. Setting this option to "true" will enable - // case-sensitive matching. - "StrictAetComparison" : false, - - // When the following option is "true", the MD5 of the DICOM files - // will be computed and stored in the Orthanc database. This - // information can be used to detect disk corruption, at the price - // of a small performance overhead. - "StoreMD5ForAttachments" : true, - - // The maximum number of results for a single C-FIND request at the - // Patient, Study or Series level. Setting this option to "0" means - // no limit. - "LimitFindResults" : 0, - - // The maximum number of results for a single C-FIND request at the - // Instance level. Setting this option to "0" means no limit. - "LimitFindInstances" : 0, - - // If this option is set to "true" (default behavior until Orthanc - // 1.3.2), Orthanc will log the resources that are exported to other - // DICOM modalities or Orthanc peers, inside the URI - // "/exports". Setting this option to "false" is useful to prevent - // the index to grow indefinitely in auto-routing tasks (this is the - // default behavior since Orthanc 1.4.0). - "LogExportedResources" : false, - - // Enable or disable HTTP Keep-Alive (persistent HTTP - // connections). Setting this option to "true" prevents Orthanc - // issue #32 ("HttpServer does not support multiple HTTP requests in - // the same TCP stream"), but can possibly slow down HTTP clients - // that do not support persistent connections. The default behavior - // used to be "false" in Orthanc <= 1.5.1. Setting this option to - // "false" is also recommended if Orthanc is compiled against - // Mongoose. - "KeepAlive" : true, - - // Enable or disable Nagle's algorithm. Only taken into - // consideration if Orthanc is compiled to use CivetWeb. Experiments - // show that best performance can be obtained by setting both - // "KeepAlive" and "TcpNoDelay" to "true". Beware however of - // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay - "TcpNoDelay" : true, - - // Number of threads that are used by the embedded HTTP server. - "HttpThreadsCount" : 50, - - // If this option is set to "false", Orthanc will run in index-only - // mode. The DICOM files will not be stored on the drive: Orthanc - // only indexes the small subset of the so-called "main DICOM tags" - // in its SQL database. Note that this option might prevent the - // upgrade to newer versions of Orthanc. Also note that this - // behavior might not be available with the storage area plugins. - "StoreDicom" : true, - - // DICOM associations initiated by Lua scripts are kept open as long - // as new DICOM commands are issued. This option sets the number of - // seconds of inactivity to wait before automatically closing a - // DICOM association used by Lua. If set to 0, the connection is - // closed immediately. This option is only used in Lua scripts. - "DicomAssociationCloseDelay" : 5, - - // Maximum number of query/retrieve DICOM requests that are - // maintained by Orthanc. The least recently used requests get - // deleted as new requests are issued. - "QueryRetrieveSize" : 100, - - // When handling a C-FIND SCP request, setting this flag to "true" - // will enable case-sensitive match for PN value representation - // (such as PatientName). By default, the search is - // case-insensitive, which does not follow the DICOM standard. - "CaseSensitivePN" : false, - - // Configure PKCS#11 to use hardware security modules (HSM) and - // smart cards when carrying on HTTPS client authentication. - /** - "Pkcs11" : { - "Module" : "/usr/local/lib/libbeidpkcs11.so", - "Module" : "C:/Windows/System32/beidpkcs11.dll", - "Pin" : "1234", - "Verbose" : true - } - **/ - - // If set to "false", Orthanc will not load its default dictionary - // of private tags. This might be necessary if you cannot import a - // DICOM file encoded using the Implicit VR Endian transfer syntax, - // and containing private tags: Such an import error might stem from - // a bad dictionary. You can still list your private tags of - // interest in the "Dictionary" configuration option below. - "LoadPrivateDictionary" : true, - - // Locale to be used by Orthanc. Currently, only used if comparing - // strings in a case-insensitive way. It should be safe to keep this - // value undefined, which lets Orthanc autodetect the suitable locale. - // "Locale" : "en_US.UTF-8", - - // Register a new tag in the dictionary of DICOM tags that are known - // to Orthanc. Each line must contain the tag (formatted as 2 - // hexadecimal numbers), the value representation (2 upcase - // characters), a nickname for the tag, possibly the minimum - // multiplicity (> 0 with defaults to 1), possibly the maximum - // multiplicity (0 means arbitrary multiplicity, defaults to 1), and - // possibly the Private Creator (for private tags). - // Note: For private tags, you should only declare the lower 8 bits - // of the element since the higher 8 bits may vary from one file to - // the other. - "Dictionary" : { - // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ] - // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ] - // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ] - // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ] - }, - - // Load a set of external DICOM dictionaries in order to replace the - // default dictionaries. This option must contain a set of files in - // the DCMTK format. The order of the dictionaries *is* - // important. This option can be used to turn Orthanc into a DICONDE - // server. (new in Orthanc 1.9.4) - /** - "ExternalDictionaries" : [ - "/usr/share/dcmtk/dicom.dic", - "/usr/share/dcmtk/diconde.dic" - ] - **/ - - // Whether to run DICOM C-MOVE operations synchronously. If set to - // "false" (asynchronous mode), each incoming C-MOVE request results - // in the creation of a new background job. Up to Orthanc 1.3.2, the - // implicit behavior was to use synchronous C-MOVE ("true"). Between - // Orthanc 1.4.0 and 1.4.2, the default behavior was set to - // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default - // behavior is back to synchronous C-MOVE ("true", which ensures - // backward compatibility with Orthanc <= 1.3.2). - "SynchronousCMove" : true, - - // Maximum number of completed jobs that are kept in memory. A - // processing job is considered as complete once it is tagged as - // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0" - // indicates to keep no job in memory (i.e. jobs are removed from - // the history as soon as they are completed), which prevents the - // use of some features of Orthanc (typically, synchronous mode in - // REST API) and should be avoided for non-developers. - "JobsHistorySize" : 10, - - // Whether to save the jobs into the Orthanc database. If this - // option is set to "true", the pending/running/completed jobs are - // automatically reloaded from the database if Orthanc is stopped - // then restarted (except if the "--no-jobs" command-line argument - // is specified). This option should be set to "false" if multiple - // Orthanc servers are using the same database (e.g. if PostgreSQL - // or MariaDB/MySQL is used). - "SaveJobs" : true, - - // Specifies how Orthanc reacts when it receives a DICOM instance - // whose SOPInstanceUID is already stored. If set to "true", the new - // instance replaces the old one. If set to "false", the new - // instance is discarded and the old one is kept. Up to Orthanc - // 1.4.1, the implicit behavior corresponded to "false". - "OverwriteInstances" : false, - - // Maximum number of ZIP/media archives that are maintained by - // Orthanc, as a response to the asynchronous creation of archives. - // The least recently used archives get deleted as new archives are - // generated. This option was introduced in Orthanc 1.5.0, and has - // no effect on the synchronous generation of archives. - "MediaArchiveSize" : 1, - - // Performance setting to specify how Orthanc accesses the storage - // area during find operations (C-FIND, /tools/find API route and - // QIDO-RS in dicom-web). Three modes are available: (1) "Always" - // allows Orthanc to read the storage area as soon as it needs an - // information that is not present in its database (slowest mode), - // (2) "Never" prevents Orthanc from accessing the storage area, and - // makes it uses exclusively its database (fastest mode), and (3) - // "Answers" allows Orthanc to read the storage area to generate its - // answers, but not to filter the DICOM resources (balance between - // the two modes). By default, the mode is "Always", which - // corresponds to the behavior of Orthanc <= 1.5.0. - "StorageAccessOnFind" : "Always", - - // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If - // set to "true", the metrics can be retrieved at - // "/tools/metrics-prometheus" formetted using the Prometheus - // text-based exposition format. - "MetricsEnabled" : true, - - // Whether calls to URI "/tools/execute-script" is enabled. Starting - // with Orthanc 1.5.8, this URI is disabled by default for security. - "ExecuteLuaEnabled" : false, - - // Set the timeout while serving HTTP requests by the embedded Web - // server, in seconds. This corresponds to option - // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket - // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value. - "HttpRequestTimeout" : 30, - - // Set the default private creator that is used by Orthanc when it - // looks for a private tag in its dictionary (cf. "Dictionary" - // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0). - "DefaultPrivateCreator" : "", - - // Maximum number of storage commitment reports (i.e. received from - // remote modalities) to be kept in memory (new in Orthanc 1.6.0). - "StorageCommitmentReportsSize" : 100, - - // Whether Orthanc transcodes DICOM files to an uncompressed - // transfer syntax over the DICOM protocol, if the remote modality - // does not support compressed transfer syntaxes (new in Orthanc 1.7.0). - "TranscodeDicomProtocol" : true, - - // If some plugin to decode/transcode DICOM instances is installed, - // this option specifies whether the built-in decoder/transcoder of - // Orthanc (that uses DCMTK) is applied before or after the plugins, - // or is not applied at all (new in Orthanc 1.7.0). The allowed - // values for this option are "After" (default value, corresponding - // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled". - "BuiltinDecoderTranscoderOrder" : "After", - - // If this option is set, Orthanc will transparently transcode any - // incoming DICOM instance to the given transfer syntax before - // storing it into its database. Beware that this might result in - // high CPU usage (if transcoding to some compressed transfer - // syntax), or in higher disk consumption (if transcoding to an - // uncompressed syntax). Also, beware that transcoding to a transfer - // syntax with lossy compression (notably JPEG) will change the - // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at - // the instance level, which might break external workflow. - /** - "IngestTranscoding" : "1.2.840.10008.1.2", - **/ - - // Whether ingest transcoding is applied to incoming DICOM instances - // that have an uncompressed transfer syntax, i.e. Little Endian - // Implicit, Little Endian Explicit or Big Endian Explicit (new in - // Orthanc 1.8.2). - "IngestTranscodingOfUncompressed" : true, - - // Whether ingest transcoding is applied to incoming DICOM instances - // that have a compressed transfer syntax (new in Orthanc 1.8.2). - "IngestTranscodingOfCompressed" : true, - - // The compression level that is used when transcoding to one of the - // lossy/JPEG transfer syntaxes (integer between 1 and 100). - "DicomLossyTranscodingQuality" : 90, - - // Whether "fsync()" is called after each write to the storage area - // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc - // will run more slowly, but the DICOM are guaranteed to be - // immediately written to the disk. This option only makes sense if - // the builtin filesystem storage area is used. It defaults to - // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4. - "SyncStorageArea" : true, - - // If specified, on compatible systems, call "mallopt(M_ARENA_MAX, - // ...)" while starting Orthanc. This has the same effect at setting - // the environment variable "MALLOC_ARENA_MAX". This avoids large - // growth in RES memory if the threads of the embedded HTTP server - // have to allocate large chunks of memory (typically the case with - // large DICOM files). By setting "MallocArenaMax" to "N", these - // threads share "N" memory pools (known as "arenas"). Setting this - // option to "0" doesn't call mallopt()", which was the behavior of - // Orthanc <= 1.8.1. - "MallocArenaMax" : 5, - - // Deidentify/anonymize the contents of the logs (notably C-FIND, - // C-GET, and C-MOVE queries submitted to Orthanc) according to - // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2) - "DeidentifyLogs" : true, - - // If "DeidentifyLogs" is true, this sets the DICOM standard to - // follow for the deidentification/anonymization of the query - // contents. Possible values are "2008", "2017c" and "2021b" (new - // in Orthanc 1.8.2) - "DeidentifyLogsDicomVersion" : "2021b", - - // Maximum length of the PDU (Protocol Data Unit) in the DICOM - // network protocol, expressed in bytes. This value affects both - // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed - // range is [4096,131072]. (new in Orthanc 1.9.0) - "MaximumPduLength" : 16384, - - // Arbitrary identifier of this Orthanc server when storing its - // global properties if a custom index plugin is used. This - // identifier is only useful in the case of multiple - // readers/writers, in order to avoid collisions between multiple - // Orthanc servers. If unset, this identifier is taken as a SHA-1 - // hash derived from the MAC addresses of the network interfaces, - // and from the AET and TCP ports used by Orthanc. Manually setting - // this option is needed in Docker/Kubernetes environments. (new in - // Orthanc 1.9.2) - /** - "DatabaseServerIdentifier" : "Orthanc1", - **/ - - // Whether Orthanc protects the modification of metadata and - // attachments using revisions, which is done using the HTTP headers - // "ETag", "If-Match" and "If-None-Match" in the calls to the REST - // API. This is needed to handle collisions between concurrent - // modifications in the case of multiple writers. The database - // back-end must support this option, which is notably *not* yet the - // case of the built-in SQLite index. (new in Orthanc 1.9.2) - "CheckRevisions" : false, - - // Whether Orthanc streams ZIP archive/media to the HTTP - // client. Setting this option to "false" corresponds to the - // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written - // to a temporary file, then sent to the client (which necessitates - // disk space and might lead to HTTP timeouts on large archives). If - // set to "true", the chunks of the ZIP file are progressively sent - // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4) - "SynchronousZipStream" : true, - - // Default number of loader threads when generating Zip archive/media. - // A value of 0 means reading and writing are performed in sequence - // (default behaviour). A value > 1 is meaningful only if the storage - // is a distributed network storage (e.g object storage plugin). - // (new experimental feature in Orthanc 1.10.0) - "ZipLoaderThreads": 0, - - // Extra Main Dicom tags that are stored in DB together with all default - // Main Dicom tags that are already stored (TODO: see book new page). - // (new in Orthanc 1.11.0) - // Sequences tags are not supported. - /** - "ExtraMainDicomTags" : { - "Instance" : [ - "Rows", - "Columns", - "ImageType", - "SOPClassUID", - "ContentDate", - "ContentTime", - "FrameOfReferenceUID", - "PixelSpacing", - "SpecificCharacterSet", - "BitsAllocated" - ], - "Series" : [], - "Study": [], - "Patient": [] - }, - */ - - // Enables/disables warnings in the logs. - // "true" enables a warning. All warnings are enabled by default - // TODO: see book new page - // (new in Orthanc 1.11.0) - "Warnings" : { - // A "RequestedTags" has been read from storage which is slower than - // reading it from DB. - // You might want to store this tag in ExtraMainDicomTags to build - // the response faster. - "W001_TagsBeingReadFromStorage": true, - - // Retrieving a list of Main dicom tags from a resource that has been - // saved with another "ExtraMainDicomTags" configuration which means that - // your response might be incomplete/inconsistent. - // You should call patients|studies|series|instances/../reconstruct to rebuild - // the DB. TODO: also check for "rebuild DB" plugin - "W002_InconsistentDicomTagsInDb": true - } - -} diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch new file mode 100644 index 000000000000..94db1a0a6c90 --- /dev/null +++ b/srcpkgs/Orthanc/patches/config.patch @@ -0,0 +1,28 @@ +--- a/OrthancServer/Resources/Configuration.json 2022-06-30 08:04:50.000000000 -0300 ++++ b/OrthancServer/Resources/Configuration.json 2022-06-30 08:04:50.000000000 -0300 +@@ -10,12 +10,12 @@ + // Path to the directory that holds the heavyweight files (i.e. the + // raw DICOM instances). Backslashes must be either escaped by + // doubling them, or replaced by forward slashes "/". +- "StorageDirectory" : "OrthancStorage", ++ "StorageDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory that holds the SQLite index (if unset, the + // value of StorageDirectory is used). This index could be stored on + // a RAM-drive or a SSD device for performance reasons. +- "IndexDirectory" : "OrthancStorage", ++ "IndexDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory where Orthanc stores its large temporary + // files. The content of this folder can be safely deleted once +@@ -670,8 +670,8 @@ + // server. (new in Orthanc 1.9.4) + /** + "ExternalDictionaries" : [ +- "/usr/share/libdcmtk12/dicom.dic", +- "/usr/share/libdcmtk12/diconde.dic" ++ "/usr/share/dcmtk/dicom.dic", ++ "/usr/share/dcmtk/diconde.dic" + ] + **/ + diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template index d5cb61514619..96c4bb3115ec 100644 --- a/srcpkgs/Orthanc/template +++ b/srcpkgs/Orthanc/template @@ -23,18 +23,19 @@ python_version=3 # Create '_orthanc' user for the server system_accounts="_orthanc" _orthanc_descr="Orthanc server user" -conf_files="etc/orthanc/Configuration.json" + +conf_files="/etc/orthanc/Configuration.json" post_install() { + vsv orthanc + vinstall Resources/Configuration.json 0644 etc/orthanc + cd ${DESTDIR} mv usr/sbin/* usr/bin/ rm -rf usr/sbin # Remove garbage rm -rf builddir - - vsv orthanc - vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc } Orthanc-devel_package() { From a82a1d61b3cb34d18c00b98c3e79f1ba9f8af843 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:25:48 -0300 Subject: [PATCH 13/13] New package: Orthanc-Python-4.0 --- srcpkgs/Orthanc-Python/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template index 3efa389a99c5..bcd098f272e1 100644 --- a/srcpkgs/Orthanc-Python/template +++ b/srcpkgs/Orthanc-Python/template @@ -4,9 +4,9 @@ version=4.0 revision=1 wrksrc="${pkgname/-}-${version}" build_style=cmake -configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path +configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources - -DPYTHON_VERSION=3.10" + -DORTHANC_FRAMEWORK_VERSION=1.11.1" hostmakedepends="tar unzip python3 pkg-config" makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel" short_desc="Python plugin for Orthanc"