Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия Следующая версия Следующая версия справа и слева | ||
orthanc [2019/10/03 01:02] sector |
orthanc [2022/02/01 02:23] sector |
||
---|---|---|---|
Строка 6: | Строка 6: | ||
Решил попробовать сделать единое хранилище. \\ | Решил попробовать сделать единое хранилище. \\ | ||
Конечно, | Конечно, | ||
- | Поиск выдал Orthanc, система у меня Debian | + | Поиск выдал Orthanc, система у меня Debian |
<code | ini> | <code | ini> | ||
Строка 13: | Строка 13: | ||
Установил, | Установил, | ||
- | Что-то мне не понравился стандартный web viewer...\\ | ||
- | Решил прикрутить | ||
- | Прописал в конфиг плагин: | ||
- | <code | ini > | + | В последних версиях пользователи хранятся |
- | " | + | <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> | ||
- | sudo apt-get install build-essential unzip cmake mercurial uuid-dev libcurl4-openssl-dev | ||
- | liblua5.1-0-dev libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev | ||
- | libdcmtk-dev libboost-all-dev libwrap0-dev libcharls-dev libjsoncpp-dev libpugixml-dev doxygen | ||
</ | </ | ||
- | + | Включение http сервера и авторизации тут: | |
- | скачиваем:\\ | + | |
<code | ini> | <code | ini> | ||
- | wget https:// | + | Orthanc.json |
+ | " | ||
- | </ | ||
- | распаковываем, | + | " |
- | <code | ini> | ||
- | # cmake -DALLOW_DOWNLOADS=ON -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON -DUSE_SYSTEM_CIVETWEB=OFF | ||
- | -DDCMTK_LIBRARIES=dcmjpls -DCMAKE_BUILD_TYPE=Release ~/ | ||
- | # make | ||
- | # make install | ||
</ | </ | ||
- | Скачал и подкинул плагин: | + | Что-то мне не понравился стандартный web viewer...\\ |
+ | Решил прикрутить | ||
+ | |||
+ | скачиваем: | ||
<code | ini> | <code | ini> | ||
Строка 58: | Строка 56: | ||
</ | </ | ||
- | все | + | нужно посмотреть -> http:// |
+ | |||
+ | по умолчанию подгружаются | ||
+ | поэтому директиву Plugins править не нужно.\\ | ||
+ | скаченную | ||
+ | и перезапустить orthanc.\\ | ||
- | Конфиг был тут - / | ||
- | Пока что в конфиге исправил только одну строчку, | ||
<code | ini> | <code | ini> | ||
Строка 71: | Строка 72: | ||
] | ] | ||
| | ||
+ | </ | ||
+ | |||
+ | TITLE AE -сервера, | ||
+ | И кодировка в которую они будут преобразованы " | ||
+ | |||
+ | |||
+ | <code | ini> | ||
+ | // The DICOM Application Entity Title | ||
+ | " | ||
+ | |||
+ | // Check whether the called AET corresponds to the AET of Orthanc | ||
+ | // during an incoming DICOM SCU request | ||
+ | " | ||
+ | |||
+ | // The DICOM port | ||
+ | " | ||
+ | |||
+ | // The default encoding that is assumed for DICOM files without | ||
+ | // " | ||
+ | // C-Find requests (including worklists). The allowed values are | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | //" | ||
+ | " | ||
+ | |||
</ | </ | ||
Строка 78: | Строка 106: | ||
</ | </ | ||
- | Запуск с нужным | + | |
+ | {{: | ||
+ | |||
+ | Подключение к СУБД: | ||
<code | ini> | <code | ini> | ||
- | # Orthanc / | + | apt-get install default-mysql-server default-mysql-clietn defaultlt-libmysqlclient-dev orthanc-mysql |
</ | </ | ||
- | {{:orthanc1.jpg?400|}} | + | Увеличиваем размер блока данных: |
+ | |||
+ | <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 | ||
+ | | ||
+ | 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 | ||
+ | </ | ||
- | Продолжение скоро. \\ | + | |
- | В плане подключить MariaDB и собирать все снимки с устройств централизованно. \\ | + | |