From 812da1bf691708cb39cd761e3db0a7d6c75ec47e Mon Sep 17 00:00:00 2001 From: chinlinlee Date: Wed, 24 Jan 2024 16:01:02 +0800 Subject: [PATCH] ci: add `GitHub Wiki Action` --- .github/workflows/publish-wiki.yaml | 18 + wiki/DICOM-Instance-Test-Info.md | 56 ++++ wiki/From-zero-to-deploy.md | 311 ++++++++++++++++++ wiki/Home.md | 11 + wiki/Installation.md | 252 ++++++++++++++ wiki/_Sidebar.md | 15 + wiki/dcmtk-dimse.md | 48 +++ .../locale/zh-TW/From-zero-to-deploy.zh-TW.md | 307 +++++++++++++++++ wiki/locale/zh-TW/Home.zh-TW.md | 10 + wiki/locale/zh-TW/Installation.zh-TW.md | 256 ++++++++++++++ wiki/locale/zh-TW/_Sidebar.md | 16 + wiki/locale/zh-TW/dcmtk-dimse.zh-TW.md | 47 +++ wiki/step-by-step-installation-ubuntu.md | 4 + 13 files changed, 1351 insertions(+) create mode 100644 .github/workflows/publish-wiki.yaml create mode 100644 wiki/DICOM-Instance-Test-Info.md create mode 100644 wiki/From-zero-to-deploy.md create mode 100644 wiki/Home.md create mode 100644 wiki/Installation.md create mode 100644 wiki/_Sidebar.md create mode 100644 wiki/dcmtk-dimse.md create mode 100644 wiki/locale/zh-TW/From-zero-to-deploy.zh-TW.md create mode 100644 wiki/locale/zh-TW/Home.zh-TW.md create mode 100644 wiki/locale/zh-TW/Installation.zh-TW.md create mode 100644 wiki/locale/zh-TW/_Sidebar.md create mode 100644 wiki/locale/zh-TW/dcmtk-dimse.zh-TW.md create mode 100644 wiki/step-by-step-installation-ubuntu.md diff --git a/.github/workflows/publish-wiki.yaml b/.github/workflows/publish-wiki.yaml new file mode 100644 index 00000000..a17d4604 --- /dev/null +++ b/.github/workflows/publish-wiki.yaml @@ -0,0 +1,18 @@ +name: Publish wiki +on: + push: + branches: [main] + paths: + - wiki/** + - .github/workflows/publish-wiki.yaml +concurrency: + group: publish-wiki + cancel-in-progress: true +permissions: + contents: write +jobs: + publish-wiki: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Andrew-Chen-Wang/github-wiki-action@v4 \ No newline at end of file diff --git a/wiki/DICOM-Instance-Test-Info.md b/wiki/DICOM-Instance-Test-Info.md new file mode 100644 index 00000000..b30d7a85 --- /dev/null +++ b/wiki/DICOM-Instance-Test-Info.md @@ -0,0 +1,56 @@ +# DICOM Instance Test Info +- This page about test info of raccoon-dicom + +## DICOM Instances' Info +| Patient ID | Procedure Code | Modality | Series Count | Image Count | +|--------------|----------------|----------|--------------|---------------| +| C3L-00277 | 36643-5 | DX | 1 | 1 | +| C3N-00953 | 42274-1 | CT | 3 | 11 | +| TCGA-G4-6304 | 42274-1 | CT | 3 | 14 | +| 123456 | | SM | 1 | 1 (Frame: 15) | + +## Test Search For Studies +### Query By `StudyDate (0008, 0020)` +#### Step 100 +- StudyDate=19990101-19991231 + - Expect 2 matches +#### Step 110 +- StudyDate=20220101-20221231 + - Expect 0 match +### Step 170: Query By `PatientID (0010, 0020)` +- PatientID=TCGA-G4-6304 + - Expect 1 match + +### Step 120: Query By `PatientName (0010, 0010)` & `StudyDate (0008, 0020)` +- PatientName=TCGA\*&StudyDate=20100101-20101231 + - Expect 0 match +- PatientName=TCGA\*&StudyDate=19990101-19991231 + - Expect 1 match + +### Step 130: Query By `PatientName (0010, 0010)` & `PatientBirthDate (0010, 0030)` +- PatientName=ChestXR\*&PatientBirthDate=19590101 + - Expect 0 match +- PatientName=ChestXR\*&PatientBirthDate=19601218 + - Expect 1 match + +### Step 140: Query By `PatientID (0010, 0020)` & `AccessionNumber (0008, 0050)` +- PatientID=C3N-00953&AccessionNumber=4444 + - Expect 0 match +- PatientID=C3N-00953&AccessionNumber=2794663908550664 + +## Test Search For Series +### Step 150 +- Use StudyInstanceUID from [Query By `PatientID (0010, 0020)` & `AccessionNumber (0008, 0050)`](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info#query-by-patientid-0010-0020--accessionnumber-0008-0050) to search + - Expect 3 series +### Step 180 +- Use StudyInstanceUID from [170](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info#query-by-patientid-0010-0020-170) to search + - Expect 3 series + +## Test Search For Instances +### Step 160 +- Use response's SeriesInstanceUIDs from [150](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info#150) + - Expect 1 image, 5 images, and 5 images in 3 series, respectively + +## Test limit +- Query limit=1 in study level + - Expect 1 match \ No newline at end of file diff --git a/wiki/From-zero-to-deploy.md b/wiki/From-zero-to-deploy.md new file mode 100644 index 00000000..d1e99b28 --- /dev/null +++ b/wiki/From-zero-to-deploy.md @@ -0,0 +1,311 @@ +# Step by Step guide to installing - Windows + +## Download Raccoon +### Use git +```bash +git clone https://github.com/Chinlinlee/raccoon-dicom.git +``` + +### Alternative, Download ZIP +![image](https://user-images.githubusercontent.com/49154622/236674835-6f2f3c09-6892-49cd-8939-0dfbfd747094.png) + +> ⚠️ Please unzip by yourself + +## Install Environment Requirements + +### Environment Requirements +The following is a list of requirements, we will install each software next. +- [Node.js](https://nodejs.org/zh-tw/download) >= 16 +- [Mongodb](https://www.mongodb.com/try/download/community) >= 4 +- [Imagemagick](https://imagemagick.org/script/download.php) +- openJDK >= 11 + + +### Install Node.js 16 +- [Click here to download Node.js 16 installer](https://nodejs.org/download/release/v16.20.0/node-v16.20.0-x64.msi) +- Open `node-v16.20.0-x64.msi` that you downloaded + +![image](https://user-images.githubusercontent.com/49154622/236499884-fa642d85-52da-400e-96a9-2ef9eb182a27.png) + +- **Select Install Destination** and click Next + +![image](https://user-images.githubusercontent.com/49154622/236484132-ac3eac5e-1a7b-4e21-9723-b4ee4219318b.png) + +- Click Install + +![image](https://user-images.githubusercontent.com/49154622/236484658-e44012a3-483f-433b-8be3-6615a36c044e.png) + +#### Verify Node.js has been installed successfully +Open cmd and type `node -v`. +If present v16.20.0, congratulations install successfully. + +![image](https://user-images.githubusercontent.com/49154622/236499777-8c053649-9017-47bb-a098-b1a1a9c28018.png) + +### Install MongoDB +- Enter Home of MongoDB: https://www.mongodb.com/try/download/community +- Select Version → `4.4.21`,`Platform` → `Windows` -> `Package` → `msi` and click Download + +![image](https://user-images.githubusercontent.com/49154622/236500530-0a54eb24-d129-4f23-a061-4cb39ef01b11.png) + +- Open `mongodb-windows-x86_64-4.4.21-signed.msi` that you downloaded + +![image](https://user-images.githubusercontent.com/49154622/236500743-67feca07-f8e8-40c2-92ed-02b59cef7cb1.png) + +- Select Complete + +![image](https://user-images.githubusercontent.com/49154622/236500947-7981d72a-ae48-4e8c-bdb2-a77bcb2e4c6a.png) + +- Set Data Directory and Log Directory and then click Next + +![image](https://user-images.githubusercontent.com/49154622/236501004-aa9d5045-f76b-47a6-bd22-87efde381268.png) + +- Install MongoDB Compass + +![image](https://user-images.githubusercontent.com/49154622/236501025-a262ec70-6b90-4e2b-98aa-d79deff57c49.png) + +- Click Install + +![image](https://user-images.githubusercontent.com/49154622/236501069-ef6c13b2-0bf1-4b43-868f-ae040bd62df0.png) + +- Installation Completed! + +![image](https://user-images.githubusercontent.com/49154622/236501222-5940691f-1264-4e4a-b277-0baddb11be10.png) + +#### Create User in MongoDB +Since the MongoDB connection with Raccoon-DICOM requires username and password. +You need to create a user in the MongoDB to use Raccoon-DICOM. +- Open MongoDB Compass +- Enter the following connection string in New Connection and click Connect. + +```bash +mongodb://localhost:27017 +``` + +![image](https://user-images.githubusercontent.com/49154622/236501408-6e8f2de7-e210-4fc5-a689-30611600fa9e.png) + +- Click `>_MONGOSH` below. + +![image](https://user-images.githubusercontent.com/49154622/236501469-29e00407-a9ce-4735-9fbf-bf5900a6f9c0.png) + +- Enter the following command to switch to admin database +```bash +use admin; +``` + +![image](https://user-images.githubusercontent.com/49154622/236501573-27d25a7d-58b0-4d2d-80f1-376da370c46f.png) + +- Enter the following command to create root user + +> **Warning** +> ⚠️Please change the username and password to a secure one by yourself! + +```js +db.createUser({ + user : "root", + pwd : "root" , + roles : [{role : "root" , db:"admin"}] +}); +``` + +> If present { ok: 1 }, it means the creation was successful! + +### Install ImageMagick +- Enter Download page of ImageMagick: https://imagemagick.org/script/download.php +- Click `Windows Binary Release` to redirect to Windows paragraph + +![image](https://user-images.githubusercontent.com/49154622/236501838-3d3ea957-0e34-4e97-a318-51040d2ca9c9.png) + +- Click `ImageMagick-7.1.0-27-Q16-HDRI-x64-dll.exe` to download + +![image](https://user-images.githubusercontent.com/49154622/236501885-394fcb02-20f2-424d-afd5-1230667a823d.png) + +- Open `ImageMagick-7.1.0-27-Q16-HDRI-x64-dll` that you downloaded + +![image](https://user-images.githubusercontent.com/49154622/236501961-84e2b3ae-8c1b-44d1-aaa9-1b14c7530236.png) + +- Select install destination and click Next + +![image](https://user-images.githubusercontent.com/49154622/236502088-65574950-384f-4a7b-af52-d10823ec1605.png) + +- Click Install + +![image](https://user-images.githubusercontent.com/49154622/236502936-e57bf08b-7d76-49b2-a9ae-987653429f07.png) + +- Click Next, and uncheck `View Index.html`, and click Finish + +![image](https://user-images.githubusercontent.com/49154622/236502971-09bbffd9-b83c-42d5-b476-a5c8689764b2.png) +![image](https://user-images.githubusercontent.com/49154622/236502991-c1bec239-b8a0-4668-adc8-9ee29caf8045.png) + +#### Verify installation is complete +Open cmd (command prompt) and enter "magick -version". If you see the following message, the installation is successful! + +![image](https://user-images.githubusercontent.com/49154622/236503048-9944480f-39ee-4986-ae94-86725de5c8a4.png) + +### Install JAVA JDK +- Go to https://adoptium.net/temurin/releases/ +- Select Operating System: Windows +- Architecture: x64 +- Package Type: JDK +- Version: 11 +- Click to download + +![image](https://user-images.githubusercontent.com/49154622/236673675-1d43e668-c5c0-4fbd-b047-97e2ecab7825.png) + +- Open `OpenJDK11U-jdk_x64_windows_hotspot_11.0.19_7` that you downloaded one + +![image](https://user-images.githubusercontent.com/49154622/236673749-35fcc2fb-c5d9-4437-8b95-d99c905eda70.png) + +- Select install destination and click Next + +![image](https://user-images.githubusercontent.com/49154622/236674541-ecbbd581-6b33-4304-9f82-8b815df3f493.png) + +- Click Install + +![image](https://user-images.githubusercontent.com/49154622/236674557-e9f8b8e6-c8d4-4528-b7a7-86024e96d8aa.png) + +- Completed! + +![image](https://user-images.githubusercontent.com/49154622/236674566-639c8b4e-f132-45c1-827a-fbac5cdf16d1.png) + +> ⚠️Please reboot after installation + +#### Verify JAVA is installed successfully +- Open the command prompt and enter `javac --version` +- If present version info on cmd, congrats! + +![image](https://user-images.githubusercontent.com/49154622/236674166-2e96a631-077b-4f6f-b265-dab2d527a412.png) + +## Raccoon-DICOM Installation +The required software has been installed, and you can now proceed with setting up Raccoon! +⚠️ Note: Before the following steps, please navigate to the Raccoon project directory. +### Install Node.js Packages +Open the command prompt and navigate to the Raccoon project directory, then execute the following command: +```bash +npm i --only=production +``` + +> **Note** +> --only=production means only install dependencies in the `dependencies` block of package.json file + +### Configure dotenv `.env` file +- Copy `.env.template` in the project root and rename it to `.env` + +![image](https://user-images.githubusercontent.com/49154622/236674914-fe62c2eb-d176-4606-967d-c3439a7c7b00.png) + +- Modify `.env` +```text +# MongoDB +MONGODB_NAME="raccoon-dicom" +MONGODB_HOSTS=["mongodb"] +MONGODB_PORTS=[27017] +MONGODB_USER="root" +MONGODB_PASSWORD="root" +MONGODB_AUTH_SOURCE="admin" +MONGODB_OPTIONS="" +MONGODB_IS_SHARDING_MODE=false + +# Server +SERVER_PORT=8081 +SERVER_SESSION_SECRET_KEY="secret-key" + +# DICOM Web +DICOM_STORE_ROOTPATH="/dicomFiles" +DICOMWEB_HOST="{host}" +DICOMWEB_PORT=8081 +DICOMWEB_API="dicom-web" + +# DICOM DIMSE +ENABLE_DIMSE=true +DIMSE_AE_TITLE="RACCOONQRSCP" # default: RACCOONQRSCP +DIMSE_HOSTNAME="0.0.0.0" # default: 127.0.0.1 +DIMSE_PORT=11112 # default: 11112 +DIMSE_MAX_PDULEN_RCV=16378 +DIMSE_MAX_PDULEN_SND=16378 +DIMSE_NOT_ASYNC=false +DIMSE_MAX_OPS_INVOKED=0 +DIMSE_MAX_OPS_PERFORMED=0 +DIMSE_NOT_PACK_PDV=false +DIMSE_CONNECT_TIMEOUT=0 +DIMSE_REQUEST_TIMEOUT=0 +DIMSE_ACCEPT_TIMEOUT=0 +DIMSE_RELEASE_TIMEOUT=0 +DIMSE_SEND_TIMEOUT=0 +DIMSE_STORE_TIMEOUT=0 +DIMSE_RESPONSE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT_TOTAL=0 +DIMSE_IDLE_TIMEOUT=0 +DIMSE_SOCLOSE_DELAY=50 +DIMSE_SOSND_BUFFER=0 +DIMSE_SORCV_BUFFER=0 +DIMSE_TCP_DELAY=false + +# DIMSE TLS +DIMSE_TLS=false +DIMSE_TLS_NULL=false +DIMSE_TLS_3DES=false +DIMSE_TLS_AES=false +DIMSE_TLS_CIPHER="" + +DIMSE_TLS13=false +DIMSE_TLS12=false +DIMSE_TLS11=false +DIMSE_TLS1=false +DIMSE_SSL3=false +DIMSE_SSL2HELLO=false +DIMSE_TLS_PROTOCOL="" +DIMSE_TLS_EIA_HTTPS=false +DIMSE_TLS_EIA_LDAPS=false +DIMSE_TLS_NOAUTH=false +DIMSE_KEY_STORE="./config/certs/key.p12" +DIMSE_KEY_STORE_TYPE="PKCS12" +DIMSE_KEY_STORE_PASS="secret" +DIMSE_KEY_PASS="secret" +DIMSE_TRUST_STORE="./config/certs/cacerts.p12" +DIMSE_TRUST_STORE_TYPE="PKCS12" +DIMSE_TRUST_STORE_PASS="secret" + +# FHIR +SYCN_TO_FHIR_SERVER=false +FHIRSERVER_BASE_URL="http://localhost:8088/fhir" +``` + +## Deploy Raccoon-DICOM +- Open command prompt and enter Raccoon project directory, then execute following command +``` +node server.js +``` + +## Test Raccoon-DICOM features +### Upload DICOM Instance (STOW-RS) +- The following steps will use the file test/dicomFiles/jpeg2000/example-jpeg-2000.dcm for uploading test +- Use curl for uploading + +```powershell +curl --location --request POST "http://localhost:8081/dicom-web/studies" ^ +--header "Accept: application/dicom+json" ^ +--header "Content-Type: multipart/related; type=\"application/dicom\"" ^ +--form "file=@example-jpeg-2000.dcm; type=application/dicom" +``` + +- If present message following, congrats upload successful!! +```json +{"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543"]},"00081198":{"vr":"SQ","Value":[]},"00081199":{"vr":"SQ","Value":[{"00081150":{"vr":"UI","Value":["1.2.840.10008.5.1.4.1.1.77.1.6"]},"00081155":{"vr":"UI","Value":["1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]},"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]}}]}} +``` + +### Get Image info (QIDO-RS) +- Open browser or Postman +- Access http://localhost:8081/dicom-web/studies and get DICOM Json + + +### Retrieve Image (WADO-RS) +- Open browser or Postman +- Access http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered +- Result: + +![image](https://user-images.githubusercontent.com/49154622/236471229-5ea2fad0-3781-4075-a755-66712d9ef44f.png) + +- You can also test imagemagick is working normally:Access http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered?iccprofile=rommrgb +- Check whether the color changes + +![image](https://user-images.githubusercontent.com/49154622/236471143-9af313c4-e6ca-42c8-a5e7-6a5de66e2005.png) diff --git a/wiki/Home.md b/wiki/Home.md new file mode 100644 index 00000000..300fb74a --- /dev/null +++ b/wiki/Home.md @@ -0,0 +1,11 @@ +Welcome to the raccoon-dicom wiki! + +Raccoon-DICOM is a noSQL-based medical image archive designed for managing DICOM images, utilizing MongoDB to store and manage the images while providing RESTful APIs that support [DICOMweb](https://www.dicomstandard.org/dicomweb/%22) protocols for querying, retrieving, and managing DICOM images. + +Please refer to the following resources to start using Raccoon-DICOM: +- [Installation](https://github.com/Chinlinlee/raccoon-dicom/wiki/Installation): Installation, Deploy using Docker, and local deployment + - [Step by Step guideline to installing - Windows](https://github.com/Chinlinlee/raccoon-dicom/wiki/From-zero-to-deploy) +- [DICOM Instance Test Info](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info): explain the test workflow of raccoon-dicom +- Data schema: Raccoon-DICOM's schema design with Mongoose (🚧WIP) + + diff --git a/wiki/Installation.md b/wiki/Installation.md new file mode 100644 index 00000000..9b5d0dd9 --- /dev/null +++ b/wiki/Installation.md @@ -0,0 +1,252 @@ +# Installation +## Environment Requirements +- Before starting Raccoon, MongoDB, imagemagick, node.js, and JAVA JDK must be installed. +- node.js >= 16 +- Java JDK >= 11 +- [imagemagick](https://imagemagick.org/script/download.php) +- MongoDB >= 4.4 + +📢📢📢 +- You must copy opencv_java library into JDK's `lib` folder (on windows is `bin` folder) +- On Windows, please copy `opencv_java.dll`, you can find this file at `models/DICOM/dcm4che/javaNode/dcm4chee/lib/windows-x86-64` +- On Linux, please copy `libclib_jiio.so` and `libopencv_java.so`, you can find this file at `models/DICOM/dcm4che/javaNode/dcm4chee/lib/linux-x86-64` + +## Install Node.js Packages +- ⚠️ Please enter Raccoon-DICOM project folder first +```bash +npm install +``` + +## Configuration +### dotenv `.env` +- The `.env` file at project root. +- You can copy the `.env.template` and modify it. + +```dotenv +# MongoDB +MONGODB_NAME="raccoon-dicom" +MONGODB_HOSTS=["mongodb"] +MONGODB_PORTS=[27017] +MONGODB_USER="root" +MONGODB_PASSWORD="root" +MONGODB_AUTH_SOURCE="admin" +MONGODB_IS_SHARDING_MODE=false + +# Server +SERVER_PORT=8081 +SERVER_SESSION_SECRET_KEY="secret-key" + +# DICOM Web +DICOM_STORE_ROOTPATH="/dicomFiles" +DICOMWEB_HOST="{host}" +DICOMWEB_PORT=8081 +DICOMWEB_API="dicom-web" + +# DICOM DIMSE +ENABLE_DIMSE=false +DIMSE_AE_TITLE="RACCOONQRSCP" # default: RACCOONQRSCP +DIMSE_HOSTNAME="0.0.0.0" # default: 127.0.0.1 +DIMSE_PORT=11112 # default: 11112 +DIMSE_MAX_PDULEN_RCV=16378 +DIMSE_MAX_PDULEN_SND=16378 +DIMSE_NOT_ASYNC=false +DIMSE_MAX_OPS_INVOKED=0 +DIMSE_MAX_OPS_PERFORMED=0 +DIMSE_NOT_PACK_PDV=false +DIMSE_CONNECT_TIMEOUT=0 +DIMSE_REQUEST_TIMEOUT=0 +DIMSE_ACCEPT_TIMEOUT=0 +DIMSE_RELEASE_TIMEOUT=0 +DIMSE_SEND_TIMEOUT=0 +DIMSE_STORE_TIMEOUT=0 +DIMSE_RESPONSE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT_TOTAL=0 +DIMSE_IDLE_TIMEOUT=0 +DIMSE_SOCLOSE_DELAY=50 +DIMSE_SOSND_BUFFER=0 +DIMSE_SORCV_BUFFER=0 +DIMSE_TCP_DELAY=false + +# DIMSE TLS +DIMSE_TLS=false +DIMSE_TLS_NULL=false +DIMSE_TLS_3DES=false +DIMSE_TLS_AES=false +DIMSE_TLS_CIPHER="" + +DIMSE_TLS13=false +DIMSE_TLS12=false +DIMSE_TLS11=false +DIMSE_TLS1=false +DIMSE_SSL3=false +DIMSE_SSL2HELLO=false +DIMSE_TLS_PROTOCOL="" +DIMSE_TLS_EIA_HTTPS=false +DIMSE_TLS_EIA_LDAPS=false +DIMSE_TLS_NOAUTH=false +DIMSE_KEY_STORE="./config/certs/key.p12" +DIMSE_KEY_STORE_TYPE="PKCS12" +DIMSE_KEY_STORE_PASS="secret" +DIMSE_KEY_PASS="secret" +DIMSE_TRUST_STORE="./config/certs/cacerts.p12" +DIMSE_TRUST_STORE_TYPE="PKCS12" +DIMSE_TRUST_STORE_PASS="secret" + +# FHIR +SYCN_TO_FHIR_SERVER=false +FHIRSERVER_BASE_URL="http://localhost:8088/fhir" + +``` + +
+

Environment Variables Info

+ + +| Field Name | Type of Value | Description | +| --- | --- | --- | +| #MongoDB | | +| MONGODB_NAME | string | The name of the MongoDB database. | +| MONGODB_HOSTS | array of strings | A list of hostnames or IP addresses where the MongoDB server is running. | +| MONGODB_PORTS | array of numbers | A list of port numbers corresponding to the MongoDB servers specified in MONGODB_HOSTS. | +| MONGODB_USER | string | The username to use when connecting to the MongoDB server. | +| MONGODB_PASSWORD | string | The password to use when connecting to the MongoDB server. | +| MONGODB_AUTH_SOURCE | string | The name of the MongoDB database to authenticate against. | +| MONGODB_IS_SHARDING_MODE | boolean | A flag indicating whether or not the MongoDB instance is running in sharding mode. | +|#Server | | +| SERVER_PORT | number | The port number on which the server will run. +| SERVER_SESSION_SECRET_KEY | string | The secret key of session +| #DICOMweb | | +| DICOM_STORE_ROOTPATH | string | The root directory where DICOM files will be stored. +| DICOMWEB_HOST | string | The hostname of the DICOM Web server. Which use to combine 00081190 (Retrieve URL).

You can use {host} in string that will replace to `request.headers.host` +| DICOMWEB_PORT | number | The port number on which the DICOM Web server will run. Which use to combine 00081190 (Retrieve URL)

e.g. 8088, will be http://example.com:8088/dicom-web/studies +| DICOMWEB_AE | string | Set returned Retrieve AE Title (0008,0054) in QIDO-RS. If the DIMSE service is enabled, the AE Title use from DIMSE. +| #DIMSE | | +| ENABLE_DIMSE | boolean | A flag indicating whether or not the DICOM DIMSE service should be enabled. +| DIMSE_AE_TITLE | string | DICOM Application Entity title. | +| DIMSE_HOSTNAME | string | Hostname to bind DICOM DIMSE to. | +| DIMSE_PORT | number | Port number for DICOM DIMSE communication. | +| DIMSE_MAX_PDULEN_RCV | number | specifies maximal length of received P-DATA TF PDUs communicated during association establishment. 0 indicates that no maximum length is specified. 16378 by default | +| DIMSE_MAX_PDULEN_SND | number | specifies maximal length of sent P-DATA-TF PDUs by this AE. The actual maximum length of sent P-DATA-TF PDUs is also limited by the maximal length of received P-DATA-TF PDUs of the peer AE communicated during association establishment. 16378 by default | +| DIMSE_NOT_ASYNC | boolean | do not use asynchronous mode; equivalent to --max-ops-invoked=1 and --max-ops-performed=1 | +| DIMSE_MAX_OPS_INVOKED | number | maximum number of operations this AE may invoke asynchronously, unlimited by default | +| DIMSE_MAX_OPS_PERFORMED | number | maximum number of operations this AE may perform asynchronously, unlimited by default | +| DIMSE_NOT_PACK_PDV | boolean | send only one PDV in one P-Data-TF PDU; pack command and data PDV in one P-DATA-TF PDU by default | +| DIMSE_CONNECT_TIMEOUT | number | timeout in ms for TCP connect, no timeout by default | +| DIMSE_REQUEST_TIMEOUT | number | timeout in ms for receiving A-ASSOCIATE-RQ, no timeout by default | +| DIMSE_ACCEPT_TIMEOUT | number | timeout in ms for receiving A-ASSOCIATE-AC, no timeout by default | +| DIMSE_RELEASE_TIMEOUT | number | timeout in ms for receiving A-RELEASE-RP, no timeout by default | +| DIMSE_SEND_TIMEOUT | number | timeout in ms for sending other DIMSE RQs than C-STORE RQs, no timeout by default | +| DIMSE_STORE_TIMEOUT | number | timeout in ms for sending C-STOREsRQ, no timeout by default | +| DIMSE_RESPONSE_TIMEOUT | number | timeout in ms for receiving other outstanding DIMSE RSPs than C-MOVE or C-GET RSPs, no timeout by default | +| DIMSE_RETRIEVE_TIMEOUT | number | Timeout for retrieving DIMSE objects. | +| DIMSE_RETRIEVE_TIMEOUT_TOTAL | number | Total timeout for retrieving DIMSE objects. | +| DIMSE_IDLE_TIMEOUT | number | timeout in ms for aborting idle Associations, no timeout by default | +| DIMSE_SOCLOSE_DELAY | number | delay in ms after sending A-ASSOCATE-RJ, A-RELEASE-RQ or A-ABORT before the socket is closed; 50ms by default | +| DIMSE_SOSND_BUFFER | number | set SO_SNDBUF socket option to specified value | +| DIMSE_SORCV_BUFFER | number | set SO_RCVBUF socket option to specified value | +| DIMSE_TCP_DELAY | boolean | set TCP_NODELAY socket option to false, true by default | +| DIMSE_TLS | boolean | enable TLS connection without encryption or with AES or 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_NULL_SHA --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_NULL | boolean | enable TLS connection without encryption; equivalent to --tls-cipher SSL_RSA_WITH_NULL_SHA | +| DIMSE_TLS_3DES | boolean | enable TLS connection with 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_AES | boolean | enable TLS connection with AES or 3DES encryption; equivalent to --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_CIPHER | string | enable TLS connection with specified Cipher Suite. Multiple Cipher Suites may be enabled by multiple --tls-cipher options | +| DIMSE_TLS13 | boolean | enable only TLS/SSL protocol TLSv1.3; equivalent to --tls-protocol TLSv1.3 | +| DIMSE_TLS12 | boolean | enable only TLS/SSL protocol TLSv1.2; equivalent to --tls-protocol TLSv1.2 | +| DIMSE_TLS11 | boolean | enable only TLS/SSL protocol TLSv1.1; equivalent to --tls-protocol TLSv1.1 | +| DIMSE_TLS1 | boolean | enable only TLS/SSL protocol TLSv1; equivalent to --tls-protocol TLSv1 | +| DIMSE_SSL3 | boolean | enable only TLS/SSL protocol SSLv3; equivalent to --tls-protocol SSLv3 | +| DIMSE_SSL2HELLO | boolean | send/accept SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet; equivalent to --tls-protocol SSLv2Hello --tls-protocol SSLv3 --tls-protocol TLSv1 --tls-protocol TLSv1.1 --tls-protocol TLSv1.2 | +| DIMSE_TLS_PROTOCOL | string | TLS/SSL protocol to use. Multiple TLS/SSL protocols may be enabled by multiple --tls-protocol options. Supported values by Java 11: TLSv1, TLSv1.1, TLSv1.2, TLSv1.3, SSLv3, SSLv2Hello. By default, only TLSv1.2 is enabled. | +| DIMSE_TLS_EIA_HTTPS | boolean | enable server endpoint identification according RFC 2818: HTTP Over TLS | +| DIMSE_TLS_EIA_LDAPS | boolean | enable server endpoint identification according RFC 2830: LDAP Extension for TLS | +| DIMSE_TLS_NOAUTH | boolean | disable client authentication for TLS | +| DIMSE_KEY_STORE | string | file path or URL of key store containing the private key, `config/certs/key.p12` by default | +| DIMSE_KEY_STORE_TYPE | string | type of key store containing the private key, PKCS12 by default | +| DIMSE_KEY_STORE_PASS | string | password for key store containing the private key, 'secret' by default | +| DIMSE_KEY_PASS | string | password for accessing the key in the key store, key store password by default | +| DIMSE_TRUST_STORE | string | file path of key store containing trusted certificates, `config/certs/cacerts.p12` by default | +| DIMSE_TRUST_STORE_TYPE | string | type of key store with trusted certificates, PKCS12 by default | +| DIMSE_TRUST_STORE_PASS | string | password for key store with trusted certificates, 'secret' by default | + + +
+ +### Plugins Config +- The `config.js` file is located at project `plugins` folder. +- You can copy the `config.template.js` and modify it. +- **You may just copy & rename without editing this config** + +#### For for `plugins/config.js` Properties Info +👉 See [this documentation](https://github.com/Chinlinlee/raccoon-dicom/blob/main/plugins/README.md) + +### DIMSE APP +- Raccoon-DICOM use [DCM4CHE QRSCP Tool](https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmqrscp/README.md) to provide DIMSE services +- You can set `ENABLE_DIMSE=true` to enable DICOM DIMSE service +- Raccoon-dicom will automatically generate `logback.xml` config for logging DIMSE service +- Raccoon-dicom's DIMSE service configuration is mostly the same as DCM4CHE, except for `DIMSE_AE_TITLE`, `DIMSE_HOSTNAME`, and `DIMSE_PORT`. If needed, please refer to [dcm4che-tool-dcmqrscp / README.md](https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmqrscp/README.md). +## Deploy +### Local +- Run command below to deploy Raccoon-DICOM + +```bash +node server.js +``` + +### Docker-compose +- You can also use Docker-compose to deploy +- ⚠️ You should do [Configuration](#Configuration) first +- Run command below to deploy Raccoon-DICOM + +```bash +sudo docker compose up +``` + +> **Note** +> You may need to copy docker-compose.yaml to another directory and modify path of raccoon.build.context +> To prevent mapping too much data in volumes (i.e. mongodb, raccoon-storage) +## Troubleshooting on linux +- `Unknown VR: Tag not found in data dictionary` when using `STOW-RS` + - You need set the `DCMDICTPATH` environment variable + - The `dicom.dic` can find in the `/usr/share/libdcmtk{version}` or `./models/DICOM/dcmtk/dicom.dic` + > The {version} corresponds to dcmtk version, e.g. 3.6.5 => libdcmtk15 + + - Set `DCMDICTPATH` environment variable using command or you can add the command to profile file(`~/.bashrc`,`~/.profile` etc.), example **with dcmtk 3.6.5**: + ```sh + export DCMDICTPATH=/usr/share/libdcmtk15/dicom.dic + ``` + - Check the environment variable + ```sh + echo $DCMDICTPATH + ``` + +## Test +### Upload DICOM (STOW-RS) +- Following use the file at `test/dicomFiles/jpeg2000/example-jpeg-2000.dcm` to test upload +- use curl to upload +```powershell +curl --location --request POST "http://localhost:8081/dicom-web/studies" ^ +--header "Accept: application/dicom+json" ^ +--header "Content-Type: multipart/related; type=\"application/dicom\"" ^ +--form "file=@example-jpeg-2000.dcm; type=application/dicom" +``` +- The successful message +```json +{"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543"]},"00081198":{"vr":"SQ","Value":[]},"00081199":{"vr":"SQ","Value":[{"00081150":{"vr":"UI","Value":["1.2.840.10008.5.1.4.1.1.77.1.6"]},"00081155":{"vr":"UI","Value":["1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]},"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]}}]}} +``` + +### GET DICOM Info (QIDO-RS) +- Open browser or Postman +- GET http://localhost:8081/dicom-web/studies to get DICOM Json + + +### Retrieve-DICOM-Frame (WADO-RS) +- Open browser or Postman +- Access http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered + +![image](https://user-images.githubusercontent.com/49154622/236471229-5ea2fad0-3781-4075-a755-66712d9ef44f.png) + +- You can also test imagemagick is working normally:Access http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered?iccprofile=rommrgb +- Check whether the color changes + +![image](https://user-images.githubusercontent.com/49154622/236471143-9af313c4-e6ca-42c8-a5e7-6a5de66e2005.png) diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md new file mode 100644 index 00000000..a803dd3c --- /dev/null +++ b/wiki/_Sidebar.md @@ -0,0 +1,15 @@ +| [![en-US](https://raw.githubusercontent.com/hjnilsson/country-flags/master/png100px/us.png)](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home) | [![zh-TW](https://raw.githubusercontent.com/hjnilsson/country-flags/master/png100px/tw.png)](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home.zh-TW) +| --- | --- | + +*** + +## Base +- **[🏠 Home](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home)** +- **[🔧 Installation](https://github.com/Chinlinlee/raccoon-dicom/wiki/Installation)** + - **[👨‍💻 Step by Step guideline to installing - Windows](https://github.com/Chinlinlee/raccoon-dicom/wiki/From-zero-to-deploy)** + +## Developer +- **[🧪 Test Workflow](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info)** + +## Plugin +- **[DCMTK DIMSE](https://github.com/Chinlinlee/raccoon-dicom/wiki/dcmtk-dimse)** diff --git a/wiki/dcmtk-dimse.md b/wiki/dcmtk-dimse.md new file mode 100644 index 00000000..a3a9e041 --- /dev/null +++ b/wiki/dcmtk-dimse.md @@ -0,0 +1,48 @@ +# DCMTK DIMSE Plugin + +Raccoon-DICOM offers another option for using DIMSE (i.e., DCMTK DIMSE). The following will explain how to enable the DCMTK DIMSE Plugin. + +Branch: dcmtk-dimse + +## Preparations +- Disable the DCM4CHE DIMSE in Raccoon. +- Set the `ENABLE_DIMSE` environment variable in the `.env` file to `false`. +```text +... +ENABLE_DIMSE=false +... +``` + +## Switch to dcmtk-dimse branch +```bash +git checkout dcmtk-dimse +``` + +## DCMTK DIMSE Configuration +### dcmqrscp Configuration File +- Path: `plugins/dcm4raccoon/dcmqrscp.cfg` +- You can copy `plugins/dcm4raccoon/dcmqrscp.example.cfg` and rename it as `dcmqrscp.cfg`. + +## Plugin Configuration File +- Path: `plugins/config.js` +```js +module.exports.pluginsConfig = { + "dcm4raccoon": { + // Please setup the dcmqrscp config in the plugin's dcmtk folder if needed. + // Please config the HostTable in dcmqrscp.cfg in order for people to connect. + enable: true, + before: false, + routers: [], + // this is temp folder for storing files from c-store. + storepath: "./plugins/dcm4raccoon/dicomFiles/", + port: 6066 + } +}; +``` +- If you need to use a different port, you can modify the listening port as needed. + +## Start +- Start Raccoon-DICOM as usual. +```bash +node server.js +``` \ No newline at end of file diff --git a/wiki/locale/zh-TW/From-zero-to-deploy.zh-TW.md b/wiki/locale/zh-TW/From-zero-to-deploy.zh-TW.md new file mode 100644 index 00000000..b5704068 --- /dev/null +++ b/wiki/locale/zh-TW/From-zero-to-deploy.zh-TW.md @@ -0,0 +1,307 @@ +# 從 0 開始部屬 Raccoon - Windows +## 下載 Raccoon-DICOM +- 進到 [Raccoon-DICOM](https://github.com/Chinlinlee/raccoon-dicom) 的 GitHub +### Use git +```bash +git clone https://github.com/Chinlinlee/raccoon-dicom.git +``` +### 或者 Download ZIP +![image](https://user-images.githubusercontent.com/49154622/236482211-a976d3a6-443e-4bc8-8934-80ec21aa0d14.png) + +> ⚠️請自行做解壓縮的動作喔! + +## 安裝所需軟體 +### 環境所需 +以下是 Raccoon-DICOM 列出的需求軟體,接下來會一項一項進行安裝。 +- [Node.js](https://nodejs.org/zh-tw/download) >= 16 +- [Mongodb](https://www.mongodb.com/try/download/community) >= 4 +- [Imagemagick](https://imagemagick.org/script/download.php) +- [OpenJDK]() + +### 安裝 Node.js 16 +- [點此下載 Node.js 16 版本安裝檔](https://nodejs.org/download/release/v16.20.0/node-v16.20.0-x64.msi) +- 打開下載的 `node-v16.20.0-x64.msi` 進行安裝 + +![image](https://user-images.githubusercontent.com/49154622/236499884-fa642d85-52da-400e-96a9-2ef9eb182a27.png) + + +- **選擇安裝目錄**並點擊 Next + +![image](https://user-images.githubusercontent.com/49154622/236484132-ac3eac5e-1a7b-4e21-9723-b4ee4219318b.png) + +- 點擊 Install + +![image](https://user-images.githubusercontent.com/49154622/236484658-e44012a3-483f-433b-8be3-6615a36c044e.png) + +#### 測試是否安裝完成 +開啟 cmd (命令提示字元),並輸入 node -v,出現 v16.20.0 就代表完整安裝成功囉! + +![image](https://user-images.githubusercontent.com/49154622/236499777-8c053649-9017-47bb-a098-b1a1a9c28018.png) + + +### 安裝 MongoDB +- 進到 MongoDB主頁,網址:https://www.mongodb.com/try/download/community +- 選擇 Version → `4.4.21`,`Platform` → `Windows`,`Package` → `msi` 並點擊 Download + +![image](https://user-images.githubusercontent.com/49154622/236500530-0a54eb24-d129-4f23-a061-4cb39ef01b11.png) + +- 打開下載的 `mongodb-windows-x86_64-4.4.21-signed.msi` 進行安裝 + +![image](https://user-images.githubusercontent.com/49154622/236500743-67feca07-f8e8-40c2-92ed-02b59cef7cb1.png) + +- 選擇 Complete + +![image](https://user-images.githubusercontent.com/49154622/236500947-7981d72a-ae48-4e8c-bdb2-a77bcb2e4c6a.png) + +- 設定 Data Directory (資料存放位置) 以及 Log Directory (紀錄存放位置),選擇完畢後按 Next + +![image](https://user-images.githubusercontent.com/49154622/236501004-aa9d5045-f76b-47a6-bd22-87efde381268.png) + +- 安裝 MongoDB Compass + +![image](https://user-images.githubusercontent.com/49154622/236501025-a262ec70-6b90-4e2b-98aa-d79deff57c49.png) + +- 點擊 Install + +![image](https://user-images.githubusercontent.com/49154622/236501069-ef6c13b2-0bf1-4b43-868f-ae040bd62df0.png) + +- 安裝完畢囉! + +![image](https://user-images.githubusercontent.com/49154622/236501222-5940691f-1264-4e4a-b277-0baddb11be10.png) + +#### 創建使用者帳號 +由於 Raccoon-DICOM 內的 MongoDB 連接需要帳號密碼,您必須創建 MongoDB 的帳號密碼以讓 Raccoon-DICOM 正常運作。 +- 打開 MongoDB Compass +- 在 New Connection 的 connection string 輸入以下內容,並點擊 Connect + +```bash +mongodb://localhost:27017 +``` + +![image](https://user-images.githubusercontent.com/49154622/236501408-6e8f2de7-e210-4fc5-a689-30611600fa9e.png) + +- 點開下方的 `>_MONGOSH` + +![image](https://user-images.githubusercontent.com/49154622/236501469-29e00407-a9ce-4735-9fbf-bf5900a6f9c0.png) + +- 輸入以下指令切換到 admin 資料庫 +```bash +use admin; +``` + +![image](https://user-images.githubusercontent.com/49154622/236501573-27d25a7d-58b0-4d2d-80f1-376da370c46f.png) + +- 輸入以下指令創建 root 帳號 + +> **Warning** +> ⚠️請自行更改成安全的帳號以及密碼! + +```js +db.createUser({ + user : "root", + pwd : "root" , + roles : [{role : "root" , db:"admin"}] +}); +``` +> 出現 { ok: 1 } 就代表創建成功囉! + +### 安裝 ImageMagick +- 進到 ImageMagick 下載頁面,網址:https://imagemagick.org/script/download.php +- 點擊 `Windows Binary Release` 跳轉到 Windows 下載相關的段落 + +![image](https://user-images.githubusercontent.com/49154622/236501838-3d3ea957-0e34-4e97-a318-51040d2ca9c9.png) + +- 點擊第一項 `ImageMagick-7.1.0-27-Q16-HDRI-x64-dll.exe` 下載 + +![image](https://user-images.githubusercontent.com/49154622/236501885-394fcb02-20f2-424d-afd5-1230667a823d.png) + +- 開啟下載的 `ImageMagick-7.1.0-27-Q16-HDRI-x64-dll` 進行安裝 + +![image](https://user-images.githubusercontent.com/49154622/236501961-84e2b3ae-8c1b-44d1-aaa9-1b14c7530236.png) + +- 選擇安裝目錄,並點擊 Next + +![image](https://user-images.githubusercontent.com/49154622/236502088-65574950-384f-4a7b-af52-d10823ec1605.png) + +- 點擊 Install + +![image](https://user-images.githubusercontent.com/49154622/236502936-e57bf08b-7d76-49b2-a9ae-987653429f07.png) + +- 點擊 Next , 並把 View Index.html 取消,最後 Finish,安裝完成! + +![image](https://user-images.githubusercontent.com/49154622/236502971-09bbffd9-b83c-42d5-b476-a5c8689764b2.png) +![image](https://user-images.githubusercontent.com/49154622/236502991-c1bec239-b8a0-4668-adc8-9ee29caf8045.png) + +#### 測試是否安裝完成 +開啟 cmd (命令提示字元),並輸入 magick -version , 出現以下訊息就代表安裝成功囉! + +![image](https://user-images.githubusercontent.com/49154622/236503048-9944480f-39ee-4986-ae94-86725de5c8a4.png) + +### 安裝 JAVA JDK +- 進入 https://adoptium.net/temurin/releases/ +- 選擇 Operating System: Windows +- Architecture: x64 +- Package Type: JDK +- Version: 11 +- 點擊下載 + +![image](https://user-images.githubusercontent.com/49154622/236673675-1d43e668-c5c0-4fbd-b047-97e2ecab7825.png) + +- 打開下載的 `OpenJDK11U-jdk_x64_windows_hotspot_11.0.19_7` + +![image](https://user-images.githubusercontent.com/49154622/236673749-35fcc2fb-c5d9-4437-8b95-d99c905eda70.png) + +- 選擇安裝目錄並點擊下一步 + +![image](https://user-images.githubusercontent.com/49154622/236674005-a3c0709f-d003-460e-bcc6-c0c91dafb30c.png) + +- 點擊安裝 + +![image](https://user-images.githubusercontent.com/49154622/236674021-a18032da-e8d5-42e2-b0e2-451a0128e7da.png) + +- 完成! + +![image](https://user-images.githubusercontent.com/49154622/236674041-972c0bd1-ee2a-4d97-bc21-49e6965d186f.png) + +> ⚠️完成後請先重新啟動 + +#### 測試 JAVA 是否完成安裝 +- 打開 cmd 並輸入 `javac --version`,出現版本訊息就代表成功囉! + +![image](https://user-images.githubusercontent.com/49154622/236674166-2e96a631-077b-4f6f-b265-dab2d527a412.png) + +## 設定 Raccoon +以上所需的軟體已經完畢了,您可以開始進行設定 Raccoon 的步驟啦! +⚠️注意!進行以下步驟前,請先進到 Raccoon 的專案目錄 + +### 安裝依賴 +開啟 cmd (命令提示字元) 進到 Raccoon 專案目錄並執行以下指令 +```bash +npm i --only=production +``` + +> **Note** +> --only=production 代表只安裝 package.json 內 dependencies 區塊的依賴 + +### 設定 .env 檔案 +- 複製根目錄的 .env.template ,貼上並更名為 .env + +![image](https://user-images.githubusercontent.com/49154622/236503587-74797412-4dd9-412f-a685-24a7cb4aed97.png) + +- 更改 .env 內的內容 +```text +# MongoDB +MONGODB_NAME="raccoon-dicom" +MONGODB_HOSTS=["mongodb"] +MONGODB_PORTS=[27017] +MONGODB_USER="root" +MONGODB_PASSWORD="root" +MONGODB_AUTH_SOURCE="admin" +MONGODB_OPTIONS="" +MONGODB_IS_SHARDING_MODE=false + +# Server +SERVER_PORT=8081 +SERVER_SESSION_SECRET_KEY="secret-key" + +# DICOM Web +DICOM_STORE_ROOTPATH="/dicomFiles" +DICOMWEB_HOST="{host}" +DICOMWEB_PORT=8081 +DICOMWEB_API="dicom-web" + +# DICOM DIMSE +ENABLE_DIMSE=true +DIMSE_AE_TITLE="RACCOONQRSCP" # default: RACCOONQRSCP +DIMSE_HOSTNAME="0.0.0.0" # default: 127.0.0.1 +DIMSE_PORT=11112 # default: 11112 +DIMSE_MAX_PDULEN_RCV=16378 +DIMSE_MAX_PDULEN_SND=16378 +DIMSE_NOT_ASYNC=false +DIMSE_MAX_OPS_INVOKED=0 +DIMSE_MAX_OPS_PERFORMED=0 +DIMSE_NOT_PACK_PDV=false +DIMSE_CONNECT_TIMEOUT=0 +DIMSE_REQUEST_TIMEOUT=0 +DIMSE_ACCEPT_TIMEOUT=0 +DIMSE_RELEASE_TIMEOUT=0 +DIMSE_SEND_TIMEOUT=0 +DIMSE_STORE_TIMEOUT=0 +DIMSE_RESPONSE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT_TOTAL=0 +DIMSE_IDLE_TIMEOUT=0 +DIMSE_SOCLOSE_DELAY=50 +DIMSE_SOSND_BUFFER=0 +DIMSE_SORCV_BUFFER=0 +DIMSE_TCP_DELAY=false + +# DIMSE TLS +DIMSE_TLS=false +DIMSE_TLS_NULL=false +DIMSE_TLS_3DES=false +DIMSE_TLS_AES=false +DIMSE_TLS_CIPHER="" + +DIMSE_TLS13=false +DIMSE_TLS12=false +DIMSE_TLS11=false +DIMSE_TLS1=false +DIMSE_SSL3=false +DIMSE_SSL2HELLO=false +DIMSE_TLS_PROTOCOL="" +DIMSE_TLS_EIA_HTTPS=false +DIMSE_TLS_EIA_LDAPS=false +DIMSE_TLS_NOAUTH=false +DIMSE_KEY_STORE="./config/certs/key.p12" +DIMSE_KEY_STORE_TYPE="PKCS12" +DIMSE_KEY_STORE_PASS="secret" +DIMSE_KEY_PASS="secret" +DIMSE_TRUST_STORE="./config/certs/cacerts.p12" +DIMSE_TRUST_STORE_TYPE="PKCS12" +DIMSE_TRUST_STORE_PASS="secret" + + +# FHIR +SYCN_TO_FHIR_SERVER=false +FHIRSERVER_BASE_URL="http://localhost:8088/fhir" +``` + +## 部屬 Raccoon-DICOM +- 開啟 cmd (命令提示字元) 進到 Raccoon 專案目錄並執行以下指令 +``` +node server.js +``` +執行後看到以下訊息就代表架設成功囉! +[TODO:加入啟動訊息圖]() + +## 測試 Raccoon-DICOM +### 上傳影像 (STOW-RS) +- 以下將使用來自 `test/dicomFiles/jpeg2000/example-jpeg-2000.dcm` 的檔案做上傳測試 +- 使用 curl 進行上傳 +```powershell +curl --location --request POST "http://localhost:8081/dicom-web/studies" ^ +--header "Accept: application/dicom+json" ^ +--header "Content-Type: multipart/related; type=\"application/dicom\"" ^ +--form "file=@example-jpeg-2000.dcm; type=application/dicom" +``` +- 出現以下訊息則代表成功 +```json +{"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543"]},"00081198":{"vr":"SQ","Value":[]},"00081199":{"vr":"SQ","Value":[{"00081150":{"vr":"UI","Value":["1.2.840.10008.5.1.4.1.1.77.1.6"]},"00081155":{"vr":"UI","Value":["1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]},"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]}}]}} +``` + +### 獲取影像資訊 (QIDO-RS) +- 開啟瀏覽器 or Postman +- 造訪 http://localhost:8081/dicom-web/studies 以取得 DICOM Json + + +### 調閱影像-Frame (WADO-RS) +- 開啟瀏覽器 or Postman +- 造訪 http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered + +![image](https://user-images.githubusercontent.com/49154622/236471229-5ea2fad0-3781-4075-a755-66712d9ef44f.png) + +- 您也可以測試 imagemagick 是否正常:造訪 http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered?iccprofile=rommrgb 確認顏色是否變更 + +![image](https://user-images.githubusercontent.com/49154622/236471143-9af313c4-e6ca-42c8-a5e7-6a5de66e2005.png) + diff --git a/wiki/locale/zh-TW/Home.zh-TW.md b/wiki/locale/zh-TW/Home.zh-TW.md new file mode 100644 index 00000000..5fa71746 --- /dev/null +++ b/wiki/locale/zh-TW/Home.zh-TW.md @@ -0,0 +1,10 @@ +歡迎來到 raccoon-dicom 的 wiki! + +Raccoon-DICOM 是使用 no-SQL 資料庫實作的醫學影像儲存系統([DICOMweb](https://www.dicomstandard.org/dicomweb/%22) PACS),其使用 MongoDB 管理 DICOM 影像並提供 DICOMweb RESTful API 功能進行儲存、查詢以及調閱 + +請參閱以下的資訊以開始使用 Raccoon-DICOM: + +- [安裝手冊](https://github.com/Chinlinlee/raccoon-dicom/wiki/Installation.zh-TW): 包含安裝、使用 Docker 部屬以及本地部屬 + - [從 0 開始部屬 Raccoon](https://github.com/Chinlinlee/raccoon-dicom/wiki/From-zero-to-deploy.zh-TW): 如果您是Web程式設計新手,非常推薦您觀看此篇 +- [DICOM Instance Test Info](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info): explain the test workflow of raccoon-dicom +- Data schema: Raccoon-DICOM's schema design with Mongoose (🚧WIP) \ No newline at end of file diff --git a/wiki/locale/zh-TW/Installation.zh-TW.md b/wiki/locale/zh-TW/Installation.zh-TW.md new file mode 100644 index 00000000..5e663814 --- /dev/null +++ b/wiki/locale/zh-TW/Installation.zh-TW.md @@ -0,0 +1,256 @@ +# 安裝手冊 +如果您是新手,請參閱[從 0 開始部屬 Raccoon - Windows](From-zero-to-deploy.zh-TW) +## 環境所需 +- node.js >= 16 +- Java JDK >= 11 +- [imagemagick](https://imagemagick.org/script/download.php) +- MongoDB >= 4 + +📢📢📢 +- 您必須複製 opencv_java 函式庫至 JDK 的 `lib` 資料夾 (Windows 為 `bin` 資料夾) +- Windows,請複製 `opencv_java.dll`,您可以在 `models/DICOM/dcm4che/javaNode/dcm4chee/lib/windows-x86-64` 找到此檔案 +- Linux,請複製 `libclib_jiio.so` 以及 `libopencv_java.so`,您可以在 `models/DICOM/dcm4che/javaNode/dcm4chee/lib/linux-x86-64` 找到這兩個檔案 + +## 安裝 Node.js 套件 +- ⚠️ 請先進到 Raccoon-DICOM 專案目錄 +```bash +npm install +``` + +## 設定 +### dotenv `.env` +- 您可以在專案根目錄找到 .env 檔案進行設定,並請您務必在實際環境使用較安全的設定 +- 您可以直接複製 .env.template 並命名為 .env 進行修改 + +```dotenv +# MongoDB +MONGODB_NAME="raccoon-dicom" +MONGODB_HOSTS=["mongodb"] +MONGODB_PORTS=[27017] +MONGODB_USER="root" +MONGODB_PASSWORD="root" +MONGODB_AUTH_SOURCE="admin" +MONGODB_IS_SHARDING_MODE=false + +# Server +SERVER_PORT=8081 +SERVER_SESSION_SECRET_KEY="secret-key" + +# DICOM Web +DICOM_STORE_ROOTPATH="/dicomFiles" +DICOMWEB_HOST="{host}" +DICOMWEB_PORT=8081 +DICOMWEB_API="dicom-web" + +# DICOM DIMSE +ENABLE_DIMSE=false +DIMSE_AE_TITLE="RACCOONQRSCP" # default: RACCOONQRSCP +DIMSE_HOSTNAME="0.0.0.0" # default: 127.0.0.1 +DIMSE_PORT=11112 # default: 11112 +DIMSE_MAX_PDULEN_RCV=16378 +DIMSE_MAX_PDULEN_SND=16378 +DIMSE_NOT_ASYNC=false +DIMSE_MAX_OPS_INVOKED=0 +DIMSE_MAX_OPS_PERFORMED=0 +DIMSE_NOT_PACK_PDV=false +DIMSE_CONNECT_TIMEOUT=0 +DIMSE_REQUEST_TIMEOUT=0 +DIMSE_ACCEPT_TIMEOUT=0 +DIMSE_RELEASE_TIMEOUT=0 +DIMSE_SEND_TIMEOUT=0 +DIMSE_STORE_TIMEOUT=0 +DIMSE_RESPONSE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT=0 +DIMSE_RETRIEVE_TIMEOUT_TOTAL=0 +DIMSE_IDLE_TIMEOUT=0 +DIMSE_SOCLOSE_DELAY=50 +DIMSE_SOSND_BUFFER=0 +DIMSE_SORCV_BUFFER=0 +DIMSE_TCP_DELAY=false + +# DIMSE TLS +DIMSE_TLS=false +DIMSE_TLS_NULL=false +DIMSE_TLS_3DES=false +DIMSE_TLS_AES=false +DIMSE_TLS_CIPHER="" + +DIMSE_TLS13=false +DIMSE_TLS12=false +DIMSE_TLS11=false +DIMSE_TLS1=false +DIMSE_SSL3=false +DIMSE_SSL2HELLO=false +DIMSE_TLS_PROTOCOL="" +DIMSE_TLS_EIA_HTTPS=false +DIMSE_TLS_EIA_LDAPS=false +DIMSE_TLS_NOAUTH=false +DIMSE_KEY_STORE="./config/certs/key.p12" +DIMSE_KEY_STORE_TYPE="PKCS12" +DIMSE_KEY_STORE_PASS="secret" +DIMSE_KEY_PASS="secret" +DIMSE_TRUST_STORE="./config/certs/cacerts.p12" +DIMSE_TRUST_STORE_TYPE="PKCS12" +DIMSE_TRUST_STORE_PASS="secret" + +# FHIR +SYCN_TO_FHIR_SERVER=false +FHIRSERVER_BASE_URL="http://localhost:8088/fhir" + +``` + +
+

環境變數資訊

+ + +| Field Name | Type of Value | Description | +| --- | --- | --- | +| #MongoDB | | +| MONGODB_NAME | string | MongoDB 資料庫名稱 | +| MONGODB_HOSTS | array of strings | MongoDB 伺服器運行的主機名稱或 IP 位址列表。 | +| MONGODB_PORTS | array of numbers | 對應於 MONGODB_HOSTS 中指定的 MongoDB 伺服器的連接埠號列表。 | +| MONGODB_USER | string | 連接到 MongoDB 伺服器時要使用的使用者名稱 | +| MONGODB_PASSWORD | string | 連接到 MongoDB 伺服器時要使用的密碼 | +| MONGODB_AUTH_SOURCE | string | 要進行身份驗證的 MongoDB 資料庫名稱 | +| MONGODB_IS_SHARDING_MODE | boolean | MongoDB 是否為 sharding 模式 | +|#Server | | +| SERVER_PORT | number | 伺服器運行的埠(port)號 +| SERVER_SESSION_SECRET_KEY | string | 用於 session 的保密金鑰 +| #DICOMweb | | +| DICOM_STORE_ROOTPATH | string | 存放 DICOM 檔案的根目錄 +| DICOMWEB_HOST | string | DICOM Web 伺服器的主機名稱。用於組合 00081190 (Retrieve URL)。

您可以在字串中使用 {host},它將替換為 request.headers.host +| DICOMWEB_PORT | number | DICOM Web 伺服器運行的埠(port)號。用於組合 00081190 (Retrieve URL)

e.g. 8088,將會產生 http://example.com:8088/dicom-web/studies +| DICOMWEB_AE | string | 設定要回傳的 Retrieve AE Title (0008,0054),若 DIMSE 服務為開啟狀態,將優先使用 DIMSE 的 AE Title +| #DIMSE | | +| ENABLE_DIMSE | boolean | 是否啟用 DICOM DIMSE 服務 +| DIMSE_AE_TITLE | string | DICOM DIMSE 的 Application Entity title (AETitle). | +| DIMSE_HOSTNAME | string | DICOM DIMSE 的 Hostname | +| DIMSE_PORT | number | DICOM DIMSE 的 port 號 | +| DIMSE_MAX_PDULEN_RCV | number | specifies maximal length of received P-DATA TF PDUs communicated during association establishment. 0 indicates that no maximum length is specified. 16378 by default | +| DIMSE_MAX_PDULEN_SND | number | specifies maximal length of sent P-DATA-TF PDUs by this AE. The actual maximum length of sent P-DATA-TF PDUs is also limited by the maximal length of received P-DATA-TF PDUs of the peer AE communicated during association establishment. 16378 by default | +| DIMSE_NOT_ASYNC | boolean | do not use asynchronous mode; equivalent to --max-ops-invoked=1 and --max-ops-performed=1 | +| DIMSE_MAX_OPS_INVOKED | number | maximum number of operations this AE may invoke asynchronously, unlimited by default | +| DIMSE_MAX_OPS_PERFORMED | number | maximum number of operations this AE may perform asynchronously, unlimited by default | +| DIMSE_NOT_PACK_PDV | boolean | send only one PDV in one P-Data-TF PDU; pack command and data PDV in one P-DATA-TF PDU by default | +| DIMSE_CONNECT_TIMEOUT | number | timeout in ms for TCP connect, no timeout by default | +| DIMSE_REQUEST_TIMEOUT | number | timeout in ms for receiving A-ASSOCIATE-RQ, no timeout by default | +| DIMSE_ACCEPT_TIMEOUT | number | timeout in ms for receiving A-ASSOCIATE-AC, no timeout by default | +| DIMSE_RELEASE_TIMEOUT | number | timeout in ms for receiving A-RELEASE-RP, no timeout by default | +| DIMSE_SEND_TIMEOUT | number | timeout in ms for sending other DIMSE RQs than C-STORE RQs, no timeout by default | +| DIMSE_STORE_TIMEOUT | number | timeout in ms for sending C-STOREsRQ, no timeout by default | +| DIMSE_RESPONSE_TIMEOUT | number | timeout in ms for receiving other outstanding DIMSE RSPs than C-MOVE or C-GET RSPs, no timeout by default | +| DIMSE_RETRIEVE_TIMEOUT | number | Timeout for retrieving DIMSE objects. | +| DIMSE_RETRIEVE_TIMEOUT_TOTAL | number | Total timeout for retrieving DIMSE objects. | +| DIMSE_IDLE_TIMEOUT | number | timeout in ms for aborting idle Associations, no timeout by default | +| DIMSE_SOCLOSE_DELAY | number | delay in ms after sending A-ASSOCATE-RJ, A-RELEASE-RQ or A-ABORT before the socket is closed; 50ms by default | +| DIMSE_SOSND_BUFFER | number | set SO_SNDBUF socket option to specified value | +| DIMSE_SORCV_BUFFER | number | set SO_RCVBUF socket option to specified value | +| DIMSE_TCP_DELAY | boolean | set TCP_NODELAY socket option to false, true by default | +| DIMSE_TLS | boolean | enable TLS connection without encryption or with AES or 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_NULL_SHA --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_NULL | boolean | enable TLS connection without encryption; equivalent to --tls-cipher SSL_RSA_WITH_NULL_SHA | +| DIMSE_TLS_3DES | boolean | enable TLS connection with 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_AES | boolean | enable TLS connection with AES or 3DES encryption; equivalent to --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA | +| DIMSE_TLS_CIPHER | string | enable TLS connection with specified Cipher Suite. Multiple Cipher Suites may be enabled by multiple --tls-cipher options | +| DIMSE_TLS13 | boolean | enable only TLS/SSL protocol TLSv1.3; equivalent to --tls-protocol TLSv1.3 | +| DIMSE_TLS12 | boolean | enable only TLS/SSL protocol TLSv1.2; equivalent to --tls-protocol TLSv1.2 | +| DIMSE_TLS11 | boolean | enable only TLS/SSL protocol TLSv1.1; equivalent to --tls-protocol TLSv1.1 | +| DIMSE_TLS1 | boolean | enable only TLS/SSL protocol TLSv1; equivalent to --tls-protocol TLSv1 | +| DIMSE_SSL3 | boolean | enable only TLS/SSL protocol SSLv3; equivalent to --tls-protocol SSLv3 | +| DIMSE_SSL2HELLO | boolean | send/accept SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet; equivalent to --tls-protocol SSLv2Hello --tls-protocol SSLv3 --tls-protocol TLSv1 --tls-protocol TLSv1.1 --tls-protocol TLSv1.2 | +| DIMSE_TLS_PROTOCOL | string | TLS/SSL protocol to use. Multiple TLS/SSL protocols may be enabled by multiple --tls-protocol options. Supported values by Java 11: TLSv1, TLSv1.1, TLSv1.2, TLSv1.3, SSLv3, SSLv2Hello. By default, only TLSv1.2 is enabled. | +| DIMSE_TLS_EIA_HTTPS | boolean | enable server endpoint identification according RFC 2818: HTTP Over TLS | +| DIMSE_TLS_EIA_LDAPS | boolean | enable server endpoint identification according RFC 2830: LDAP Extension for TLS | +| DIMSE_TLS_NOAUTH | boolean | disable client authentication for TLS | +| DIMSE_KEY_STORE | string | file path or URL of key store containing the private key, `config/certs/key.p12` by default | +| DIMSE_KEY_STORE_TYPE | string | type of key store containing the private key, PKCS12 by default | +| DIMSE_KEY_STORE_PASS | string | password for key store containing the private key, 'secret' by default | +| DIMSE_KEY_PASS | string | password for accessing the key in the key store, key store password by default | +| DIMSE_TRUST_STORE | string | file path of key store containing trusted certificates, `config/certs/cacerts.p12` by default | +| DIMSE_TRUST_STORE_TYPE | string | type of key store with trusted certificates, PKCS12 by default | +| DIMSE_TRUST_STORE_PASS | string | password for key store with trusted certificates, 'secret' by default | + + +
+ +### Plugins 設定 +- 您必須在 `plugins` 資料夾中創建以及設定 `config.js` 檔案 +- 您可以參考 `config.template.js` 進行修改 +- **如果您不需要使用 plugin,您可以直接複製 `config.template.js`並命名為 `config.js` 即可** + +#### `plugins/config.js` 屬性資訊 +👉 請參閱[此文件](https://github.com/Chinlinlee/raccoon-dicom/blob/main/plugins/README.md) + +#### For for `plugins/config.js` Properties Info +👉 See [this documentation](https://github.com/Chinlinlee/raccoon-dicom/blob/main/plugins/README.md) + +### DIMSE APP +- Raccoon-DICOM 使用 [DCM4CHE QRSCP Tool](https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmqrscp/README.md) 以提供 DIMSE 服務 +- 您可以設定 `ENABLE_DIMSE=true` 以啟動 DICOM DIMSE 服務 +- Raccoon-dicom 將會為 DIMSE 服務自動產生 `logback.xml` 設定檔以進行日誌記錄的動作 +- Raccoon-dicom 的 DIMSE 服務設定除了 `DIMSE_AE_TITLE`、`DIMSE_HOSTNAME` 和 `DIMSE_PORT` 之外,其餘大多與 DCM4CHE 相同,若有需要請參考 [dcm4che-tool-dcmqrscp / README.md](https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmqrscp/README.md) + +## 部屬 +### Local +- 運行以下指令部屬 Raccoon-DICOM + +```bash +node server.js +``` + +### Docker-compose +- 您也可以使用 Docker-compose 進行部屬 +- ⚠️ 建議您先進行[設定](#設定)再進行部屬 +- 運行以下指令部屬 Raccoon-DICOM + +```bash +sudo docker compose up +``` + +> **Note** +> 您可能會需要把 docker-compose.yaml 複製至另一個資料夾,並更改 raccoon.build.context 的路徑 +> 以防止在 volumes 當中映射過多資料 (i.e. mongodb, raccoon-storage) + +## Troubleshooting on linux +- `Unknown VR: Tag not found in data dictionary` when using `STOW-RS` + - 您必須設定 `DCMDICTPATH` 環境變數 + - `dicom.dic` 檔案可以在`/usr/share/libdcmtk{version}`或 `./models/DICOM/dcmtk/dicom.dic`找到 + > {version} 對應到dcmtk的版本, e.g. 3.6.5 => libdcmtk15 + + - 使用指令設定 `DCMDICTPATH` 或者您可以將指令加入到profile檔案中(`~/.bashrc`,`~/.profile` etc.), example **with dcmtk 3.6.5**: + ```sh + export DCMDICTPATH=/usr/share/libdcmtk15/dicom.dic + ``` + - 檢查環境變數 + ```sh + echo $DCMDICTPATH + ``` + +## Test +### 上傳影像 (STOW-RS) +- 以下將使用來自 `test/dicomFiles/jpeg2000/example-jpeg-2000.dcm` 的檔案做上傳測試 +- 使用 curl 進行上傳 +```powershell +curl --location --request POST "http://localhost:8081/dicom-web/studies" ^ +--header "Accept: application/dicom+json" ^ +--header "Content-Type: multipart/related; type=\"application/dicom\"" ^ +--form "file=@example-jpeg-2000.dcm; type=application/dicom" +``` +- 出現以下訊息則代表成功 +```json +{"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543"]},"00081198":{"vr":"SQ","Value":[]},"00081199":{"vr":"SQ","Value":[{"00081150":{"vr":"UI","Value":["1.2.840.10008.5.1.4.1.1.77.1.6"]},"00081155":{"vr":"UI","Value":["1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]},"00081190":{"vr":"UT","Value":["http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0"]}}]}} +``` + +### 獲取影像資訊 (QIDO-RS) +- 開啟瀏覽器 or Postman +- 造訪 http://localhost:8081/dicom-web/studies 以取得 DICOM Json + + +### 調閱影像-Frame (WADO-RS) +- 開啟瀏覽器 or Postman +- 造訪 http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered + +![image](https://user-images.githubusercontent.com/49154622/236471229-5ea2fad0-3781-4075-a755-66712d9ef44f.png) + +- 您也可以測試 imagemagick 是否正常:造訪 http://localhost:8081/dicom-web/studies/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543/series/1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3/instances/1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0/frames/1/rendered?iccprofile=rommrgb 確認顏色是否變更 + +![image](https://user-images.githubusercontent.com/49154622/236471143-9af313c4-e6ca-42c8-a5e7-6a5de66e2005.png) diff --git a/wiki/locale/zh-TW/_Sidebar.md b/wiki/locale/zh-TW/_Sidebar.md new file mode 100644 index 00000000..08af8797 --- /dev/null +++ b/wiki/locale/zh-TW/_Sidebar.md @@ -0,0 +1,16 @@ +| [![en-US](https://raw.githubusercontent.com/hjnilsson/country-flags/master/png100px/us.png)](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home) | [![zh-TW](https://raw.githubusercontent.com/hjnilsson/country-flags/master/png100px/tw.png)](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home.zh-TW) +| --- | --- | + +*** + +## 基礎 +- **[🏠 首頁](https://github.com/Chinlinlee/raccoon-dicom/wiki/Home.zh-TW)** +- **[🔧 安裝手冊](https://github.com/Chinlinlee/raccoon-dicom/wiki/Installation.zh-TW)** + - **[👨‍💻 從 0 開始部屬 Raccoon - Windows](https://github.com/Chinlinlee/raccoon-dicom/wiki/From-zero-to-deploy.zh-TW)** + + +## 開發人員 +- **[🧪 測試流程](https://github.com/Chinlinlee/raccoon-dicom/wiki/DICOM-Instance-Test-Info)** + +## 插件 (plugin) +- **[DCMTK DIMSE](https://github.com/Chinlinlee/raccoon-dicom/wiki/dcmtk-dimse.zh-TW)** diff --git a/wiki/locale/zh-TW/dcmtk-dimse.zh-TW.md b/wiki/locale/zh-TW/dcmtk-dimse.zh-TW.md new file mode 100644 index 00000000..5c463668 --- /dev/null +++ b/wiki/locale/zh-TW/dcmtk-dimse.zh-TW.md @@ -0,0 +1,47 @@ +# DCMTK DIMSE Plugin +Raccoon-DICOM 提供另一個使用 DIMSE 的選擇 (i.e. DCMTK DIMSE),以下將介紹如何開啟 DCMTK DIMSE Plugin + +Branch: dcmtk-dimse + +## 先前準備 +- 關閉 Raccoon 的 DCM4CHE DIMSE +- 將 `.env` 中的 `ENABLE_DIMSE` 環境變數設定為 `false` +```text +... +ENABLE_DIMSE=false +... +``` + +## 切換至 dcmtk-dimse branch +```bash +git checkout dcmtk-dimse +``` + +## DCMTK DIMSE 設定 +### dcmqrscp 設定檔 +- 路徑: `plugins/dcm4raccoon/dcmqrscp.cfg` +- 您可以複製 `plugins/dcm4raccoon/dcmqrscp.example.cfg` 並重新命名為 `dcmqrscp.cfg` + +## Plugin 設定檔 +- 路徑: `plugins/config.js` +```js +module.exports.pluginsConfig = { + "dcm4raccoon": { + // Please setup the dcmqrscp config in the plugin's dcmtk folder if needed. + // Please config the HostTable in dcmqrscp.cfg in order for people to connect. + enable: true, + before: false, + routers: [], + // this is temp folder for storing files from c-store. + storepath: "./plugins/dcm4raccoon/dicomFiles/", + port: 6066 + } +}; +``` +- 若有需要使用不同的 port,您可以自行修改監聽的 port + +## 啟動 +- 就如同啟動 Raccoon-DICOM 一樣 +```bash +node server.js +``` diff --git a/wiki/step-by-step-installation-ubuntu.md b/wiki/step-by-step-installation-ubuntu.md new file mode 100644 index 00000000..166f56d9 --- /dev/null +++ b/wiki/step-by-step-installation-ubuntu.md @@ -0,0 +1,4 @@ +# Step by Step to installing - Ubuntu +In the following, we will use ubuntu 20.04 to install. + +## \ No newline at end of file