Dear @Chinlinlee ,
I hope you are doing well. 😄 I am reaching out to inform you about a bug I came across while I was trying to Retrieve-DICOM-Frame (WADO-RS) on my Windows local deployment. It is crucial to bring this issue to your attention so that it can be addressed and resolved for the benefit of all users.👍
Description of the Bug:
I encountered a bug while I was trying to retrieve the DICOM frame via WADO-RS API on my Windows local deployment.
Ideally, when performing this section in your installation guide, I would expect to view the requested dicom image via the browser. However, due to the bug, the actual behavior deviates from these expectations and I also got some error messages❗
My Testing Environment & Configs:
Environment
- OS version: Windows10 22H2 (Win11 22H2 also encounter the same issue)
- JDK versions which having this issue:
- OpenJDK 17
- OpenJDK 20
- OracleJDK 17
- Node.js version: v18.12.1
Config files
.env
# MongoDB
MONGODB_NAME="raccoon-dicom"
MONGODB_HOSTS=["127.0.0.1"]
MONGODB_PORTS=[27017]
MONGODB_USER=""
MONGODB_PASSWORD=""
MONGODB_AUTH_SOURCE="admin"
MONGODB_IS_SHARDING_MODE=false
# Server
SERVER_PORT=8082
SERVER_SESSION_SECRET_KEY="secret-key"
# DICOM Web
DICOM_STORE_ROOTPATH="C:/Services/raccoon2-dicomFiles"
DICOMWEB_HOST="{host}"
DICOMWEB_PORT=8082
DICOMWEB_API="dicom-web"
# DICOM DIMSE
ENABLE_DIMSE=false
DCM4CHE_QRSCP_COMMAND=`[
"-b",
"DCMQRSCP:11112",
"--dicomdir",
"{project}/config/DICOMDIR",
"--ae-config",
"{project}/config/ae.properties",
"--all-storage",
"--filepath",
"DICOM/{0020000D,hash}/{0020000E,hash}/{00080018,hash}.dcm",
"--raccoon",
"{project}/config/raccoon2.json"
]`
# FHIR
SYCN_TO_FHIR_SERVER=false
FHIRSERVER_BASE_URL="http://localhost:8088/fhir"
config/raccoon2.json
{
"mongodb": {
"hosts": ["127.0.0.1"],
"ports": [27017],
"username": "",
"password": "",
"authSource": "admin",
"database": "raccoon-dicom",
"debug": false
},
"raccoon": {
"dicomStoreRoot": "C:/Services/raccoon2-dicomFiles",
"raccoonUploadScriptPath": "C:/git_repos/raccoon-dicom/local/dicom-uploader-stow.js",
"mode": "STOW",
"stowUrl": "http://127.0.0.1:8082/dicom-web/studies"
}
}
plugins/config.js
Just copied config.template.js
and rename it without modify
Browser Error Message:
{
"stack": "TypeError: Cannot read properties of undefined (reading '0')\n at RetrieveRenderedInstanceFramesController.mainProcess (C:\\git_repos\\raccoon-dicom\\api\\dicom-web\\controller\\WADO-RS\\rendered\\instanceFrames.js:84:148)\n at async RetrieveRenderedInstanceFramesController.doPipeline (C:\\git_repos\\raccoon-dicom\\api\\controller.class.js:52:9)\n at async module.exports (C:\\git_repos\\raccoon-dicom\\api\\dicom-web\\controller\\WADO-RS\\rendered\\instanceFrames.js:112:5)",
"message": "Cannot read properties of undefined (reading '0')"
}
NodeJS Console Message:
C:\git_repos\raccoon-dicom>node server.js
env-var (MONGODB_NAME): setting default value to "raccoon"
env-var (MONGODB_NAME): will be read from the environment using "asString" accessor
env-var (MONGODB_NAME): passing value "raccoon-dicom" to "asString" accessor
env-var (MONGODB_NAME): parsed successfully, returning raccoon-dicom
env-var (MONGODB_HOSTS): marked as required
env-var (MONGODB_HOSTS): will be read from the environment using "asJsonArray" accessor
env-var (MONGODB_HOSTS): verifying variable value is not an empty string
env-var (MONGODB_HOSTS): passing value "["127.0.0.1"]" to "asJsonArray" accessor
env-var (MONGODB_HOSTS): parsed successfully, returning 127.0.0.1
env-var (MONGODB_PORTS): marked as required
env-var (MONGODB_PORTS): will be read from the environment using "asJsonArray" accessor
env-var (MONGODB_PORTS): verifying variable value is not an empty string
env-var (MONGODB_PORTS): passing value "[27017]" to "asJsonArray" accessor
env-var (MONGODB_PORTS): parsed successfully, returning 27017
env-var (MONGODB_USER): setting default value to ""
env-var (MONGODB_USER): will be read from the environment using "asString" accessor
env-var (MONGODB_USER): passing value "" to "asString" accessor
env-var (MONGODB_USER): parsed successfully, returning
env-var (MONGODB_PASSWORD): setting default value to ""
env-var (MONGODB_PASSWORD): will be read from the environment using "asString" accessor
env-var (MONGODB_PASSWORD): passing value "" to "asString" accessor
env-var (MONGODB_PASSWORD): parsed successfully, returning
env-var (MONGODB_AUTH_SOURCE): setting default value to "admin"
env-var (MONGODB_AUTH_SOURCE): will be read from the environment using "asString" accessor
env-var (MONGODB_AUTH_SOURCE): passing value "admin" to "asString" accessor
env-var (MONGODB_AUTH_SOURCE): parsed successfully, returning admin
env-var (MONGODB_IS_SHARDING_MODE): setting default value to "false"
env-var (MONGODB_IS_SHARDING_MODE): will be read from the environment using "asBool" accessor
env-var (MONGODB_IS_SHARDING_MODE): passing value "false" to "asBool" accessor
env-var (MONGODB_IS_SHARDING_MODE): parsed successfully, returning false
env-var (SERVER_HOST): setting default value to "127.0.0.1"
env-var (SERVER_HOST): will be read from the environment using "asString" accessor
env-var (SERVER_HOST): was not found in the environment, parsing default value "127.0.0.1" instead
env-var (SERVER_HOST): passing value "127.0.0.1" to "asString" accessor
env-var (SERVER_HOST): parsed successfully, returning 127.0.0.1
env-var (SERVER_PORT): setting default value to "8081"
env-var (SERVER_PORT): will be read from the environment using "asInt" accessor
env-var (SERVER_PORT): passing value "8082" to "asInt" accessor
env-var (SERVER_PORT): parsed successfully, returning 8082
env-var (SERVER_SESSION_SECRET_KEY): will be read from the environment using "asString" accessor
env-var (SERVER_SESSION_SECRET_KEY): passing value "secret-key" to "asString" accessor
env-var (SERVER_SESSION_SECRET_KEY): parsed successfully, returning secret-key
env-var (DICOM_STORE_ROOTPATH): setting default value to "/dicomFiles"
env-var (DICOM_STORE_ROOTPATH): will be read from the environment using "asString" accessor
env-var (DICOM_STORE_ROOTPATH): passing value "C:/Services/raccoon2-dicomFiles" to "asString" accessor
env-var (DICOM_STORE_ROOTPATH): parsed successfully, returning C:/Services/raccoon2-dicomFiles
env-var (DICOMWEB_HOST): setting default value to "127.0.0.1"
env-var (DICOMWEB_HOST): will be read from the environment using "asString" accessor
env-var (DICOMWEB_HOST): passing value "{host}" to "asString" accessor
env-var (DICOMWEB_HOST): parsed successfully, returning {host}
env-var (DICOMWEB_PORT): setting default value to "8081"
env-var (DICOMWEB_PORT): will be read from the environment using "asInt" accessor
env-var (DICOMWEB_PORT): passing value "8082" to "asInt" accessor
env-var (DICOMWEB_PORT): parsed successfully, returning 8082
env-var (DICOMWEB_API): setting default value to "dicom-web"
env-var (DICOMWEB_API): will be read from the environment using "asString" accessor
env-var (DICOMWEB_API): passing value "dicom-web" to "asString" accessor
env-var (DICOMWEB_API): parsed successfully, returning dicom-web
env-var (ENABLE_DIMSE): setting default value to "true"
env-var (ENABLE_DIMSE): will be read from the environment using "asBool" accessor
env-var (ENABLE_DIMSE): passing value "false" to "asBool" accessor
env-var (ENABLE_DIMSE): parsed successfully, returning false
env-var (SYCN_TO_FHIR_SERVER): setting default value to "true"
env-var (SYCN_TO_FHIR_SERVER): will be read from the environment using "asBool" accessor
env-var (SYCN_TO_FHIR_SERVER): passing value "false" to "asBool" accessor
env-var (SYCN_TO_FHIR_SERVER): parsed successfully, returning false
env-var (FHIRSERVER_BASE_URL): setting default value to "http://127.0.0.1:8089/fhir"
env-var (FHIRSERVER_BASE_URL): will be read from the environment using "asString" accessor
env-var (FHIRSERVER_BASE_URL): passing value "http://localhost:8088/fhir" to "asString" accessor
env-var (FHIRSERVER_BASE_URL): parsed successfully, returning http://localhost:8088/fhir
mongodb://127.0.0.1:27017/raccoon-dicom
moduleName :: dicom
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: dicomBulkData
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: dicomSeries
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: dicomStudy
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: dicomToJpegTask
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: patient
path : C:\git_repos\raccoon-dicom\models\mongodb/models
moduleName :: syncFHIRLog
path : C:\git_repos\raccoon-dicom\models\mongodb/models
http server is listening on port:8082
we're connected!
[2023-05-22T21:36:03.576] [INFO] [file: C:\git_repos\raccoon-dicom\api\dicom-web\controller\QIDO-RS\queryAllStudies.js] [line: 16] api - [QIDO-RS] [path: /dicom-web/studies] [IP: ::1] [Query All Studies]
[2023-05-22T21:36:03.578] [INFO] [file: C:\git_repos\raccoon-dicom\api\dicom-web\controller\QIDO-RS\service\QIDO-RS.service.js] [line: 329] raccoon-polka - [QIDO-RS]
[Query Study Level]
[2023-05-22T21:36:03.578] [INFO] [file: C:\git_repos\raccoon-dicom\api\dicom-web\controller\QIDO-RS\service\QIDO-RS.service.js] [line: 333] raccoon-polka - [QIDO-RS]
[Query for MongoDB: {"$match":{}}]
[2023-05-22T21:36:11.710] [INFO] [file: C:\git_repos\raccoon-dicom\api\dicom-web\controller\WADO-RS\rendered\instanceFrames.js] [line: 24] api - [WADO-RS] [path: /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] [IP: ::1] [Get study's series' rendered instances' frames, study UID: 1.3.46.670589.45.1.1.4993912214784.1.5436.1538560373543, series UID: 1.3.46.670589.45.1.1.4993912214784.1.5436.1538560606509.3, instance UID: 1.3.6.1.4.1.5962.99.1.3002151337.1017604488.1540600476073.6.0, frame: 1]
[Error: java.lang.UnsatisfiedLinkError: no opencv_java in java.library.path: C:\Program Files\nodejs;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Python39\Scripts\;C:\Program Files\Python39\;C:\Program Files\Python310\Scripts\;C:\Program Files\Python310\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Program Files\Adaptec\maxView Storage Manager\pegasus\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\PowerShell\7\;C:\Program Files\OpenJDK\jdk-20.0.1\bin;C:\Users\LuckyPig\AppData\Local\Microsoft\WindowsApps;C:\Users\LuckyPig\.dotnet\tools;C:\Users\LuckyPig\AppData\Local\GitHubDesktop\bin;C:\Users\LuckyPig\AppData\Roaming\npm;C:\Users\LuckyPig\AppData\Local\Programs\Microsoft VS Code\bin;.
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2444)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:880)
at java.base/java.lang.System.loadLibrary(System.java:2051)
at org.opencv.osgi.OpenCVNativeLoader.init(OpenCVNativeLoader.java:17)
at org.dcm4che3.opencv.StreamSegment.<clinit>(StreamSegment.java:76)
at org.dcm4che3.opencv.NativeImageReader.getNativeImage(NativeImageReader.java:260)
at org.dcm4che3.opencv.NativeImageReader.read(NativeImageReader.java:251)
at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.read(DicomImageReader.java:458)
at org.github.chinlinlee.dcm2jpg.Dcm2Jpg.readImageFromDicomInputStream(Dcm2Jpg.java:452)
at org.github.chinlinlee.dcm2jpg.Dcm2Jpg.convert(Dcm2Jpg.java:439)
at org.github.chinlinlee.dcm2jpg.Dcm2JpgExecutor.convertDcmToJpgFromFilename(Dcm2JpgExecutor.java:41)
at C:\Users\runneradmin\.cargo\git\checkouts\java-rs-8df0abe5d5de942a\6fc9654\src\java\java_env_wrapper.rs:657
at C:\Users\runneradmin\.cargo\git\checkouts\java-rs-8df0abe5d5de942a\6fc9654\src\java\java_env_wrapper.rs:278] {
code: 'GenericFailure'
}
TypeError: Cannot read properties of undefined (reading '0')
at RetrieveRenderedInstanceFramesController.mainProcess (C:\git_repos\raccoon-dicom\api\dicom-web\controller\WADO-RS\rendered\instanceFrames.js:84:148)
at async RetrieveRenderedInstanceFramesController.doPipeline (C:\git_repos\raccoon-dicom\api\controller.class.js:52:9)
at async module.exports (C:\git_repos\raccoon-dicom\api\dicom-web\controller\WADO-RS\rendered\instanceFrames.js:112:5)
Impact and Importance:
I think this bug could have a significant impact on the overall functionality and user experience of the project. Resolving this issue would greatly enhance the stability and usability of this wonderful PACS project.
Please let me know if there is any additional information or testing I can provide to help diagnose and resolve the bug. I am willing to assist in any way I can, such as providing code snippets, conducting further testing, or collaborating with other contributors to find a solution.
Thank you for your attention to this matter. I appreciate your commitment to maintaining the quality and reliability of the raccoon-dicom. I look forward to your response and the opportunity to contribute to the improvement of this awesome project.
Best regards,
LuckyPig