Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
orthanc [2019/12/26 15:26] sector |
orthanc [2022/05/27 02:34] sector |
||
---|---|---|---|
Строка 13: | Строка 13: | ||
Установил, | Установил, | ||
- | Что-то мне не понравился стандартный web viewer...\\ | ||
- | Решил прикрутить | ||
- | Прописал в конфиг плагин: \\ | + | В последних версиях |
+ | <code | ini> | ||
+ | credentials.json | ||
+ | |||
+ | { | ||
+ | /** | ||
+ | * Sensitive configuration options. This file must *not* be | ||
+ | * publicly-readable. It must only be readable by the users that run | ||
+ | * the " | ||
+ | **/ | ||
+ | |||
+ | // The list of the registered users. Because Orthanc uses HTTP | ||
+ | // Basic Authentication, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
- | <code | ini > | ||
- | " | ||
- | "/ | ||
- | ] | ||
</ | </ | ||
+ | |||
+ | Включение http сервера и авторизации тут: | ||
+ | |||
+ | <code | ini> | ||
+ | |||
+ | Orthanc.json | ||
+ | " | ||
+ | |||
+ | |||
+ | " | ||
+ | |||
+ | </ | ||
+ | |||
+ | Что-то мне не понравился стандартный web viewer...\\ | ||
+ | Решил прикрутить | ||
+ | |||
+ | скачиваем: | ||
<code | ini> | <code | ini> | ||
Строка 28: | Строка 56: | ||
</ | </ | ||
- | Конфиг был тут - / | + | нужно посмотреть -> http:// |
- | Пока что в конфиге исправил | + | |
- | по умолчанию подгружаются все плагины находящиеся в папке / | + | по умолчанию подгружаются все плагины находящиеся в папке / |
- | поэтому директиву Plugins править не нужно. | + | поэтому директиву Plugins править не нужно.\\ |
- | скаченную библиотеку надо поместить в папку: / | + | скаченную библиотеку надо поместить в папку: / |
- | и перезапустить orthanc. | + | и перезапустить orthanc.\\ |
Строка 82: | Строка 109: | ||
{{: | {{: | ||
- | Продолжение скоро. \\ | + | Подключение к СУБД: |
- | В плане подключить MariaDB и собирать все снимки с устройств централизованно. \\ | + | |
+ | <code | ini> | ||
+ | apt-get install default-mysql-server default-mysql-clietn defaultlt-libmysqlclient-dev orthanc-mysql | ||
+ | </ | ||
+ | |||
+ | Увеличиваем размер блока данных: | ||
+ | |||
+ | <code | ini> | ||
+ | mcedit my.cnf | ||
+ | |||
+ | max_allowed_packet = 128M | ||
+ | |||
+ | </ | ||
+ | |||
+ | создаем пользователя и бд, подключаемся: | ||
+ | |||
+ | <code | ini> | ||
+ | mcedit / | ||
+ | |||
+ | cat / | ||
+ | { | ||
+ | /** | ||
+ | * Configuration to use MySQL or MariaDB instead of the default | ||
+ | * SQLite back-end of Orthanc. You will have to install the | ||
+ | * " | ||
+ | **/ | ||
+ | " | ||
+ | // Enable the use of MySQL to store the Orthanc index? | ||
+ | " | ||
+ | | ||
+ | // Enable the use of MySQL to store the DICOM files? | ||
+ | " | ||
+ | | ||
+ | // Parameters of the MySLQ database | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | // Optional: Disable the locking of the MySQL database | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Контроль доступа и отправка на другие модальности: | ||
+ | <code | ini> | ||
+ | Orthanc.json | ||
+ | |||
+ | " | ||
+ | "/ | ||
+ | "/ | ||
+ | ], | ||
+ | |||
+ | " | ||
+ | </ | ||
+ | Lua: | ||
+ | |||
+ | Разрешения выполнять запросы | ||
+ | |||
+ | <code | ini> | ||
+ | |||
+ | cat access.lua | ||
+ | function IncomingHttpRequestFilter(method, | ||
+ | -- Only allow GET requests for non-admin users | ||
+ | |||
+ | if method == ' | ||
+ | return true | ||
+ | | ||
+ | return true | ||
+ | else | ||
+ | return false | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Можно по ip | ||
+ | |||
+ | <code | ini> | ||
+ | |||
+ | function IncomingHttpRequestFilter(method, | ||
+ | if method == ' | ||
+ | -- Read-only access (only GET method is allowed) | ||
+ | return true | ||
+ | elseif username == ' | ||
+ | -- Read-write access for administrator (any HTTP method is allowed on localhost) | ||
+ | return true | ||
+ | else | ||
+ | -- Access is disallowed by default | ||
+ | return false | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | С помощью этого скрипта можно отправлять снимки которые пришли в Orthanc на другие DICOM сервера или на рабочие станции врачей. | ||
+ | |||
+ | <code | ini> | ||
+ | cat send.lua | ||
+ | function OnStoredInstance(instanceId, | ||
+ | SendToModality(instanceId, | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | |||
+ | С помощью этого скрипта можно разбирать изображение которые приходят на Orthanc и маршрутизировать их на другие сервера. | ||
+ | |||
+ | <code | ini> | ||
+ | cat / | ||
+ | function OnStoredInstance(instanceId, | ||
+ | local Modality = tags[' | ||
+ | if string.find(Modality, | ||
+ | SendToModality(instanceId, | ||
+ | elseif string.find(Modality, | ||
+ | SendToModality(instanceId, | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | перезапускаем: | ||
+ | |||
+ | <code | ini> | ||
+ | services orthanc restart | ||
+ | </ | ||
+ | |||
+ | Удаление старых записей | ||
+ | <code | ini> | ||
+ | $ curl --user admin: | ||
+ | [ | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | $ curl -X DELETE http:// | ||
+ | $ curl -X DELETE http:// | ||
+ | </ | ||