Инструменты пользователя

Инструменты сайта


orthanc

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
Последняя версия Следующая версия справа и слева
orthanc [2019/12/26 15:26]
sector
orthanc [2022/02/01 02:25]
sector
Строка 13: Строка 13:
  
 Установил, поправил конфиг для того что бы зайти в WEB, загрузил несколько картинок... \\ Установил, поправил конфиг для того что бы зайти в WEB, загрузил несколько картинок... \\
-Что-то мне не понравился стандартный web viewer...\\ 
-Решил прикрутить  viewer от Osimis.  \\ 
  
-Прописал в конфиг плагин: \\+В последних версиях пользователи хранятся тут : 
 +<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 "orthanc" service. 
 +   **/ 
 + 
 +  // The list of the registered users. Because Orthanc uses HTTP 
 +  // Basic Authentication, the passwords are stored as plain text. 
 +  "RegisteredUsers" : { 
 +    "alice" : "alicePassword" 
 +    "admin" "adminPassword", 
 +  } 
 +}
  
-<code | ini > 
-"Plugins" : [ 
-    "/home/user/ libOsimisWebViewer.so r.so", 
- 
 </code> </code>
 +
 +Включение http сервера и авторизации тут:
 +
 +<code | ini>
 +
 +Orthanc.json
 + "HttpServerEnabled" : true,
 +
 +
 + "AuthenticationEnabled" : true,
 +
 +</code>
 +
 +Что-то мне не понравился стандартный web viewer...\\
 +Решил прикрутить  viewer от Osimis.  \\
 +
 +скачиваем:
  
 <code | ini> <code | ini>
Строка 28: Строка 56:
 </code> </code>
  
-Конфиг был тут - /root/Orthanc-1.5.6/Resources/Configuration.json - собственно где распаковывал и собирал.   +нужно посмотреть -> http://orthanc.osimis.io/lsb/plugin-osimis-webviewer/releases/1.3.1/libOsimisWebViewer.so
-Пока что в конфиге исправил только одну строчку, разрешающую доступ к Web-интерфейсу и одну дописал что бы подключить плагин:+
  
-по умолчанию подгружаются все плагины находящиеся в папке /usr/share/orthanc/plugins +по умолчанию подгружаются все плагины находящиеся в папке /usr/share/orthanc/plugins\\ 
-поэтому директиву Plugins править не нужно.  +поэтому директиву Plugins править не нужно.\\ 
-скаченную библиотеку надо поместить в папку: /usr/share/orthanc/plugins  +скаченную библиотеку надо поместить в папку: /usr/share/orthanc/plugins\\  
-и перезапустить orthanc.+и перезапустить orthanc.\\
  
  
Строка 82: Строка 109:
 {{:orthanc1.jpg?400|}} {{:orthanc1.jpg?400|}}
  
-Продолжение скоро. \\ +Подключение к СУБД: 
-В плане подключить MariaDB и собирать все снимки с устройств централизованно. \\+ 
 +<code | ini> 
 +apt-get install default-mysql-server default-mysql-clietn defaultlt-libmysqlclient-dev orthanc-mysql 
 +</code> 
 + 
 +Увеличиваем размер блока данных:  
 + 
 +<code | ini> 
 +mcedit my.cnf 
 + 
 +max_allowed_packet = 128M 
 + 
 +</code> 
 + 
 +создаем пользователя и бд, подключаемся: 
 + 
 +<code | ini> 
 +mcedit /etc/orthanc/mysql.json 
 + 
 +cat /etc/orthanc/mysql.json  
 +
 +  /** 
 +   * Configuration to use MySQL or MariaDB instead of the default 
 +   * SQLite back-end of Orthanc. You will have to install the 
 +   * "orthanc-mysql" package to take advantage of this feature. 
 +   **/ 
 +  "MySQL" : { 
 +    // Enable the use of MySQL to store the Orthanc index? 
 +    "EnableIndex" : true, 
 +     
 +    // Enable the use of MySQL to store the DICOM files? 
 +    "EnableStorage" : true, 
 +     
 +    // Parameters of the MySLQ database 
 +    "Host" : "localhost", 
 +    "Port" : 3306, 
 +    "Database" : "orthanc", 
 +    "Username" : "orthanc", 
 +    "UnixSocket" : "/var/run/mysqld/mysqld.sock", 
 +    "Password" : "dDE4dkULEYrbBZxc", 
 +     
 +    // Optional: Disable the locking of the MySQL database 
 +    "Lock" : true 
 +  } 
 +
 + 
 +</code> 
 + 
 +Контроль доступа и отправка на другие модальности
 +<code | ini> 
 +Orthanc.json 
 + 
 +  "LuaScripts" : [ 
 +    "/etc/orthanc/lua/access.lua", 
 +    "/etc/orthanc/lua/send.lua" 
 +  ], 
 + 
 +"sample" : [ "AE_TITLE", "192.168.1.235", 4006 ] 
 +</code> 
 +Lua: 
 + 
 +Разрешения выполнять запросы  к Orthanc, с помощью этого скрипта можно разграничить права доступа к web интерфейсу Orthanc 
 + 
 +<code | ini> 
 + 
 +cat access.lua 
 +function IncomingHttpRequestFilter(method, uri, ip, username, httpHeaders) 
 +   -- Only allow GET requests for non-admin users 
 + 
 +  if method == 'GET' or method == 'POST' then 
 +      return true 
 +   elseif username == 'admin' then 
 +      return true 
 +   else 
 +      return false 
 +   end 
 +end 
 + 
 +</code> 
 + 
 + 
 +Можно по ip 
 + 
 +<code | ini> 
 + 
 +function IncomingHttpRequestFilter(method, uri, ip, username, httpHeaders) 
 +  if method == 'GET' and (username == 'user' or username == 'admin') then 
 +    -- Read-only access (only GET method is allowed) 
 +    return true 
 +  elseif username == 'admin' and ip == '127.0.0.1' then 
 +    -- Read-write access for administrator (any HTTP method is allowed on localhost) 
 +    return true 
 +  else 
 +    -- Access is disallowed by default 
 +    return false 
 +  end 
 +end 
 + 
 +</code> 
 + 
 + 
 +С помощью этого скрипта можно отправлять снимки которые пришли в Orthanc на другие DICOM сервера или на рабочие станции врачей. 
 + 
 +<code | ini> 
 +cat send.lua 
 +function OnStoredInstance(instanceId, tags, metadata) 
 +    SendToModality(instanceId, 'sample'
 +end 
 + 
 +</code> 
 + 
 +С помощью этого скрипта можно разбирать изображение которые приходят на Orthanc и маршрутизировать их на другие сервера 
 + 
 +<code | ini> 
 +cat /etc/orthanc/lua/send.lua 
 +function OnStoredInstance(instanceId, tags, metadata) 
 +    local Modality = tags['Modality'
 +        if string.find(Modality, 'CR') ~= nil then 
 +            SendToModality(instanceId, 'sample'
 +        elseif string.find(Modality, 'MR') ~= nil then 
 +            SendToModality(instanceId, 'sample'
 +        end 
 +end 
 +</code> 
 + 
 + 
 +перезапускаем: 
 + 
 +<code | ini> 
 +services orthanc restart 
 +</code> 
 + 
 + 
  
  
orthanc.txt · Последнее изменение: 2022/05/27 02:34 — sector

Яндекс.Метрика