搭建 dicom 开发环境
vagrant centos8.box + docker 搭建 dcm4chee-arc-light准备vagrant准备dockerdcm4chee-arc-light参考github准备vagrantsudo apt updatesudo apt install virtualboxcurl -O https://releases.hashicorp.com/vagrant/2.2.10/va
·
搭建 dicom 开发环境
搭建 dcm4chee-arc-light (可选)
dcm4chee-arc-light : Dcm4che归档服务, DICOM Archive Java EE application running in WildFly.
准备vagrant
sudo apt update
sudo apt install virtualbox
curl -O https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.10_x86_64.deb
sudo apt install ./vagrant_2.2.10_x86_64.deb
vagrant --version
# vagrant box add centos/8 CentOS-8-Vagrant-8.3.2011-20201204.2.x86_64.vagrant-virtualbox.box
vagrant box list
vagrant init centos/8
gedit Vagrantfile
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/8"
config.vm.provision "shell", inline: <<-SHELL
sudo dnf update -y
sudo dnf install vim -y
sudo dnf install langpacks-en glibc-all-langpacks -y
SHELL
config.vm.define :CentOS8 do |node_conf|
node_conf.vm.hostname = "lei" # 指定vm的hostname,会覆盖vm中/etc/hostsname中的设置
node_conf.vm.network :private_network, ip: "192.168.33.11"
config.vm.provider :virtualbox do |vb| # vm提供者配置
# 通用配置
vb.name = "CentOS8" # #指定vm-name,也就是virtualbox管理控制台中的虚机名称
vb.gui = false # vagrant up启动时,是否自动打开virtual box的窗口,缺省为false
vb.memory = "2048" # 指定vm内存,单位为MB
vb.cpus = 2 # 设置CPU个数
end
end
end
准备docker
vagrant up
vagrant ssh
mkdir dcm && cd dcm/
sudo dnf install dnf-utils device-mapper-persistent-data lvm2 fuse-overlayfs wget -y
wget https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/stable/Packages/containerd.io-1.4.4-3.1.el8.x86_64.rpm
sudo dnf localinstall ./containerd.io-1.4.4-3.1.el8.x86_64.rpm
# 添加阿里镜像源
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli -y
sudo systemctl start docker
sudo systemctl enable docker
docker version
# 阿里镜像加速 https://cr.console.aliyun.com/#/accelerator
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://mwwg80su.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
wget https://github.com/docker/compose/releases/download/1.28.6/docker-compose-`uname -s`-`uname -m`
sudo mv ./docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
cat /etc/group | grep docker
sudo gpasswd -a $USER docker #将登陆用户加入到docker用户组中
newgrp docker #更新用户组
dcm4che/dcm4chee-arc-light
vim docker-compose.yml
vim docker-compose.env
docker-compose -p dcm4chee up -d
# 验证 http://ip:8080/dcm4chee-arc/ui2
docker-compose.yml
version: "3"
services:
ldap:
image: dcm4che/slapd-dcm4chee:2.4.57-23.2
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "389:389"
env_file: docker-compose.env
volumes:
- /var/local/dcm4chee-arc/ldap:/var/lib/openldap/openldap-data
- /var/local/dcm4chee-arc/slapd.d:/etc/openldap/slapd.d
db:
image: dcm4che/postgres-dcm4chee:13.1-23
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "5432:5432"
env_file: docker-compose.env
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/local/dcm4chee-arc/db:/var/lib/postgresql/data
arc:
image: dcm4che/dcm4chee-arc-psql:5.23.2
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "8080:8080"
- "8443:8443"
- "9990:9990"
- "9993:9993"
- "11112:11112"
- "2762:2762"
- "2575:2575"
- "12575:12575"
env_file: docker-compose.env
environment:
WILDFLY_CHOWN: /opt/wildfly/standalone /storage
WILDFLY_WAIT_FOR: ldap:389 db:5432
depends_on:
- ldap
- db
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/local/dcm4chee-arc/wildfly:/opt/wildfly/standalone
- /var/local/dcm4chee-arc/storage:/storage
docker-compose.env
STORAGE_DIR=/storage/fs1
POSTGRES_DB=pacsdb
POSTGRES_USER=pacs
POSTGRES_PASSWORD=pacs
dicom 开发环境
编译 dcm4che/dcm4che
# 使用 gitee 加速 git clone https://github.com/dcm4che/dcm4che.git
git clone https://gitee.com/mirrors/dcm4che.git
cd dcm4che
# 替换pom.xml中远程仓库url
'''
<repository>
<id>nroduit-mvn-repo-master</id>
<!--<url>https://raw.github.com/nroduit/mvn-repo/master/</url>-->
<url>https://github.com/nroduit/mvn-repo/tree/master/</url>
</repository>
'''
mvn clean install -Dmaven.test.skip=true
# 如果jar无法下载或下载不完整
# 则使用gitee加速 https://github.com/nroduit/mvn-repo ==> https://gitee.com/yingli_wuli/mvn-repo 可下载 org.weasis.core:weasis-core-img:jar 等jar包
# 手动安装 org.dcm4che:dcm4che-imageio-opencv:jar:5.23.2
mvn install:install-file -Dfile=./dcm4che-imageio-opencv-5.23.2.jar -DgroupId=org.dcm4che -DartifactId=dcm4che-imageio-opencv -Dversion=5.23.2 -Dpackaging=jar
# 手动安装 org.weasis.core:weasis-core-img:jar:4.5.1
mvn install:install-file -Dfile=./weasis-core-img-4.5.1.jar -DgroupId=org.weasis.core -DartifactId=weasis-core-img -Dversion=4.5.1 -Dpackaging=jar
mvn clean install -Dmaven.test.skip=true
weasis-dicom-tools
基于 dcm4che 封装的 API
This project provides a DICOM API for C-Echo , C-Move , C-Get , C-Find and C-Store based on dcm4che3
Getting started: see the test classes
to tee dicomserver
编译安装
# 这里的版本和dcm4che一致,我这里都是 5.23.2 的
# https://github.com/nroduit/weasis-dicom-tools/
git clone https://github.com/nroduit/weasis-dicom-tools.git
cd weasis-dicom-tools
mvn clean install
更多推荐




所有评论(0)