dcm4chee-mysql 5.13 install

author£º
jerry.zhang zhangjing#qed-tec.com


document
https://github.com/dcm4che/dcm4chee-arc-light/wiki/Installation


Preparation information
windows 10 x64
dcm4chee-arc-5.13.0-mysql, https://sourceforge.net/projects/dcm4che/files/dcm4chee-arc-light5/
mysql-5.5.38-winx64, http://dev.mysql.com/downloads/mysql
jdk-8u161-windows-x64, http://www.oracle.com/technetwork/java/javase/downloads/index.html
apacheds-2.0.0-M24, http://directory.apache.org/apacheds/downloads.html
ApacheDirectoryStudio-2.0.0.v20170904-M13-win32.win32.x86_64, http://directory.apache.org/studio/
mysql-connector-java-5.1.36.jar, https://download.csdn.net/download/zj850324/10362457
jboss-eap-7.1.0, https://developers.redhat.com/products/eap/download/

step:
1,mysql
install & start
cd %MYSQL_HOME%\bin
mysqld -install
net start mysql
window> mysql -uroot -p***
mysql> create database pacsdb;
mysql> grant all on pacsdb.* to 'pacs'@'localhost' identified by 'pacs';
mysql> exit
window> mysql -upacs -pacs pacsds <%DCM4CHEE_HOME%\sql\create-install.mysql

-- uninstall service
net stop mysql
cd %MYSQL_HOME%\bin
mysqld-nt --remove MySQL
rd /s/q %cd%

2,jdk
install add environment variable
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
JAVA_BIN=%JAVA_HOME%\bin
CLASSPATH£=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
path add %JAVA_HOME%,%JAVA_BIN%,%CLASSPATH£%

3,apacheds
Install Apache DS 2.0.0-M20 on the system and start Apache DS

4,ApacheDirectoryStudio
Install Apache Directory Studio 2.0.0-M9 and create a new LDAP Connection with:
Network Parameter:
    Hostname: localhost
    Port:     10389
Authentication Parameter:
    Bind DN or user: dc=dcm4che,dc=org
    Bind password:   secret
Browser Options:
Base DN: dc=dcm4che,dc=org

Import LDAP schema files for Apache DS:
$DCM4CHEE_ARC/ldap/apacheds/dicom.ldif
$DCM4CHEE_ARC/ldap/apacheds/dcm4che.ldif
$DCM4CHEE_ARC/ldap/apacheds/dcm4chee-archive.ldif
$DCM4CHEE_ARC/ldap/apacheds/dcm4chee-archive-ui.ldif

New zoning dc=dcm4che,dc=org
open configuration->Partitions
add ID:dcm4che,Suffix:dc=dcm4che,dc=org
restart ApacheDS
update $DCM4CHEE_ARC/ldap/init-baseDN.ldif,Appending attribute:
userpassword: secret
delete dc=dcm4che,dc=org entry
Import init-baseDN.ldif

If one configured a different Directory Base DN thandc=dcm4che,dc=org, one has to replace all occurrences of dc=dcm4che,dc=org in LDIF files
$DCM4CHEE_ARC/ldap/init-baseDN.ldif
$DCM4CHEE_ARC/ldap/init-config.ldif
$DCM4CHEE_ARC/ldap/default-config.ldif
$DCM4CHEE_ARC/ldap/init-ui-config.ldif
$DCM4CHEE_ARC/ldap/default-ui-permissions.ldif
$DCM4CHEE_ARC/ldap/add-vendor-data.ldif

Configuring Archive's AE Title (s)[default:DCM4CHEE]
create file AETitle.ldif,The contents are as follows:
                                                version: 1
						# LDIF for modifying the AE Title of the Archive
						# Adjust Base DN (dc=dc=dcm4che,dc=org), Device name (dcm4chee-arc), previous AE Title (DCM4CHEE),
						# new AE Title (MY_AE) before import it into the LDAP server
						dn: dicomAETitle=DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
						changetype: moddn
						newrdn: dicomAETitle=jerry
						deleteoldrdn: 1
						newsuperior: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org


Import AETitle.ldif

                                Changing the default storage path
Create a directory $DCM4CHEE_ARC/data
Create file storage-directory.ldif,The contents are as follows:
                                                version: 1
						dn: dcmStorageID=fs1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
						changetype: modify
						replace: dcmURI
						dcmURI: file:///$DCM4CHEE_ARC/data


Import storage-directory.ldif
    


5,jboss
Create Config:
xcopy %DCM4CHEE_ARC%\configuration\dcm4chee-arc %WILDFLY_HOME%\standalone\configuration\dcm4chee-arc
cp standalone-full.xml dcm4chee-arc.xml

Create file jerry_run.bat in%WILDFLY_HOME%\bin\ directory,The contents are as follows:
standalone.bat -c dcm4chee-arc.xml
pause

double-click jerry_run.bat start jboss

Access the console at http://localhost:8080

Install DCM4CHE libraries as JBoss modules:
Unzip all zip in the a directory

Copy org,com to $WILDFLY_HOME\modules

Modify file $WILDFLY_HOME\modules\com\mysql\main\module.xml, The contents are as follows:
                                                <?xml version="1.0" encoding="UTF-8"?>
						<module xmlns="urn:jboss:module:1.1" name="com.mysql">
						    <resources>
						        <resource-root path="mysql-connector-java-5.1.36.jar"/>
						    </resources>
						
						    <dependencies>
						        <module name="javax.api"/>
						        <module name="javax.transaction.api"/>
						    </dependencies>
						</module>



add mysql-connector-java-5.1.36.jar to $WILDFLY_HOME\modules\com\mysql\main\

Modify file %DCM4CHEE_ARC%\cli\add-data-source-mysql.cli, The contents are as follows:
/subsystem=datasources/jdbc-driver=mysql:add(driver-module-name=com.mysql,driver-name=mysql)
data-source add --name=pacsds --driver-name=mysql --jndi-name=java:/PacsDS \
--connection-url=jdbc:mysql://localhost:3306/pacsds \
--user-name=pacs --password=pacs

Create and enable a new Data Source bound to JNDI name java:/PacsDS using JBoss CLI:
cd %WILDFLY_HOME%\bin
[standalone@localhost:9990 /] $WILDFLY_HOME/bin/jboss-cli.bat -c file=%DCM4CHEE_ARC%\cli\add-data-source-mysql.cli

Create JMS Queues using JBoss CLI:
[standalone@localhost:9990 /] $WILDFLY_HOME/bin/jboss-cli.bat -c file=%DCM4CHEE_ARC%\cli\add-jms-queues.cli

One of the differences between the default configurations of Wildfly 9 and 10(or higher) is in the managed-executor-services of the ee subsystem (core-threads and max-threads attributes are missing) which causes thread-pool related issues in the latter, typically when there are long running tasks on archive or multiple association requests at the same time. Hence to make Wildfly 10(or higher) behave like default in Wildfly 9, adjust the managed-executor-services configuration using JBoss CLI as given below:
				[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:undefine-attribute(name=hung-task-threshold)
				[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=long-running-tasks,value=true)
				[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=core-threads,value=2)
				[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=max-threads,value=100)
				[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=queue-length,value=0)



Deploy DCM4CHEE Archive 5.x using JBoss CLI, e.g.:
[standalone@localhost:9990 /] deploy $DCM4CHEE_ARC/deploy/dcm4chee-arc-ear-5.13.0-mysql.ear

Verify that the Web UI is accessable at http://localhost:8080/dcm4chee-arc/ui2

Undeploy
[standalone@localhost:9999 /] undeploy dcm4chee-arc-ear-5.13.0-mysql.ear

6,Send dicom
I use DCMTK 3.6's storescu to send DICOM to localhost:11112 jerry[defaule DCM4CHEE]

7,Restful API test
document:
http://petstore.swagger.io/index.html?url=https://raw.githubusercontent.com/dcm4che/dcm4chee-arc-light/master/dcm4chee-arc-ui2/src/swagger/swagger-dicom.json
http://petstore.swagger.io/index.html?url=https://raw.githubusercontent.com/dcm4che/dcm4chee-arc-light/master/dcm4chee-arc-ui2/src/swagger/swagger.json
 
I used jQuery's Ajax test, and some of the code is as follows:
                                <!DOCTYPE html>
				<html lang="en">
				<head>
				    <script type="text/javascript" src="jquery.min.js"></script>
				</head>
				<body>
				<!--<form method="post" action="http://192.168.1.181:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies" enctype="multipart/form-data" type=application/dicom>-->
				    <!--<input type="file" name="file" id="file">-->
				    <!--<input type="submit"></input>-->
				<!--</form>-->
				
				<input type="file" name="uploadfile" id="uploadfile">
				<input type="button" οnclick="UploadInstance()" value="upload"></input>
				
				<script>
				    function GetPatientsAll(Cellback) {
				        $.ajax(
				            {
				                url: "http://192.168.1.181:8080/dcm4chee-arc/aets/DCM4CHEE/rs/patients",
				                type: "GET",
				                success: function (data) {
				                    Cellback(data);
				                }
				            });
				    }
				    
				    function GetStudiesAll(Cellback) {
				        $.ajax(
				            {
				                url: "http://192.168.1.181:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies",
				                type: "GET",
				                success: function (data) {
				                    Cellback(data);
				                }
				            });
				    }
				    
				    function GetStriesByStudyUID(study,Cellback) {
				        var url = study['00081190']['Value'][0] + "/instances";
				        $.ajax(
				            {
				                url: url,
				                type: "GET",
				                success: function (data) {
				                    Cellback(data);
				                }
				            });
				    }
				    
				    function GetDicomByInstancesUID(study_Instance_UID,series_Instance_UID,sop_Instance_UID,Cellback) {
				        var url = "http://192.168.1.181:8080/dcm4chee-arc/aets/DCM4CHEE/wado";
				        var data = {
				            requestType:'WADO',
				            studyUID:study_Instance_UID,
				            seriesUID:series_Instance_UID,
				            objectUID:sop_Instance_UID,
				            contentType:'application/dicom' // 'image/jpeg'
				        };
				        $.ajax(
				            {
				                url: url,
				                type: "GET",
				                data:data,
				                success: function (data) {
				                    Cellback(data);
				                }
				            });
				    }
				
				    function GetTags(series,Cellback)
				    {
				        var url = series['00081190']['Value'][0] + "/metadata";
				        $.ajax(
				            {
				                url: url,
				                type: "GET",
				                success: function (data) {
				                    Cellback(data);
				                }
				            });
				    }
				
				    function UploadInstance(){
				        var formdata = new FormData();
				        formdata.append('file',$('#uploadfile')[0].files[0]);
				        $.ajax(
				            {
				                url: "http://192.168.1.181:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies",
				                type:"POST",
				                data:formdata,
				                success: function (data) {
				                    console.log(data);
				                },
				                error:function (err) {
				                    console.log(err);
				                }
				            });
				    }
				
				    /
				    //获取病人
				    /*GetPatientsAll();*/
				    //获取检查
				    /*GetStudiesAll();*/
				    /*
				    //获取序列
				    GetStudiesAll(function fun(data) {
				        if(data!=undefined && data.length > 0)
				        {
				            GetStriesByStudyUID(data[0],function series(data) {
				                for(var i=0;i<data.length;i++)
				                {
				                    var study_Instance_UID = data[i]['0020000D']['Value'][0];
				                    var series_Instance_UID = data[i]['0020000E']['Value'][0];
				                    var sop_Instance_UID = data[i]['00080018']['Value'][0];
				
				                    console.log(study_Instance_UID);
				                    console.log(series_Instance_UID);
				                    console.log(sop_Instance_UID);
				
				                    GetDicomByInstancesUID(study_Instance_UID,series_Instance_UID,sop_Instance_UID,function image(data) {
				                        // data dicom 无压缩流,交前端解析器
				
				                    });
				                }
				
				            })
				        }
				    });
				    */
				
				    /*
				    //get tags
				    GetStudiesAll(function fun(data) {
				        if(data!=undefined && data.length > 0)
				        {
				            GetStriesByStudyUID(data[0],function series(data) {
				                GetTags(data[0],function tags(data) {
				                    console.log(data);
				                })
				            })
				        }
				    });
				    */
				
				//    UploadInstance(function upload_finish(data) {
				//        console.log(data);
				//    });
				
				    
				</script>
				</body>
				</html>



  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

外码斯迪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值