Orthanc  本身内置Sqlit数据库 但是只能独占访问

对sqlit是在不熟悉 就扩展成mysql

​​linux下 扩展mysql​​

windows相比比较简单 

1)在mysql电脑上创建orthanc数据库,字符集utf8mb4 -- UTF-8 Unicode,排序规则utf8mb4_unicode_ci 就可以了

2)用源码的兄弟要记住 C++源码并没有Configuration.json文件

需要在main里可以使用绝对路径来引用Configuration.json

具体代码位置 在这里

Orthanc windows下扩展mysql_mysql

OK 在研究orthanc 的时候 你一定安装过他的安装程序

没有的没关系

下载地址:​​Orthanc - DICOM Server​​。在官网下载页面中输入基本信息就会在邮箱中获得下载链接,Windows下的二进制安装包名称为:Orthanc-***-Installer.exe。双击安装包, ,单击“下一步”就可以顺利完成安装。

我用的1.6.0

安装后 会有这样的文件目录

Orthanc windows下扩展mysql_orthanc_02

plugins文件下 有这几个DLL 考出来

Orthanc windows下扩展mysql_orthanc_03

我们有插件

下一步 我们修改Configuration.json

我的Configuration.json 路径修改成相对路径了 在Debug下

Mysql 是用来存放刚才那4个DLL的

Orthanc windows下扩展mysql_mysql_04

Configuration.json内容

1)修改Plugins 指定Mysql问插件路径

2)新增 MySQL访问数据

// 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" : [
"MySQL"
],
"MySQL" : {
"EnableIndex" : true, //使用mysql存储文件索引
"EnableStorage" : false, //使用mysql存储dicom文件
"Host" : "你的Mysql电脑IP", // For TCP connections (notably Windows)
"Port" : 3306, // For TCP connections (notably Windows)
"UnixSocket" : "", // For UNIX on localhost, Linux set to blank
"Database" : "orthanc",
"Username" : "root",
"Password" : "1234",
"Lock" : false // 单个orthanc server独占数据库,如果使用多个orthanc server共享mysql数据库,必须关闭
},

重启后 运行 第一次运行会创建表 以后就不用了!

OK