A server implementing DICOMweb* for query and retrieval of DICOM data from a directory managed by pypx-listener.
*Specifically, this project targets the subset of DICOMweb necessary to get things working with OHIF.
First, download some example data:
../example_data/download.sh
Then run the server:
export PYPX_LOG_DIR=../example_data/samples/pypx/log
export PYPX_DATA_DIR=../example_data/samples/pypx/data
export PYPX_REPACK_DATA_MOUNTPOINT=/tmp/dicom/data
export RUST_LOG=pypx_dicomweb=DEBUG
env PORT=4006 cargo run
docker build -f ../pypx-DICOMweb.Dockerfile -t localhost/fnndsc/pypx-dicomweb:latest ..
docker run --name pypx-dicomweb \
--rm -u "$((RANDOM+1000))" -p 4006:4006 \
-v "$(realpath ../example_data/samples/pypx):/data:ro" \
-e PYPX_LOG_DIR=/data/log -e PYPX_DATA_DIR=/data/data \
-e PYPX_REPACK_DATA_MOUNTPOINT=/tmp/dicom/data \
-e RUST_LOG=pypx_dicomweb=DEBUG \
localhost/fnndsc/pypx-dicomweb:latest
main.rs
is the driver which load the configuration and runs the server.router.rs
interfaces betweenaxum
andpypx_reader.rs
pypx_reader.rs
provides an API for apypx
-organized directory of JSON and DICOM filesjson_files.rs
andtranslate.rs
define helper functions forpypx_reader.rs
dicom.rs
defines helper functions for reading DICOM files
window.config = {
// -- snip --
dataSources: [
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'pypx',
configuration: {
friendlyName: 'Existing pypx-organized DICOM files',
name: 'pypx',
wadoUriRoot: 'http://localhost:4006/dicomweb',
qidoRoot: 'http://localhost:4006/dicomweb',
wadoRoot: 'http://localhost:4006/dicomweb',
qidoSupportsIncludeField: false,
supportsReject: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: false,
supportsWildcard: false,
staticWado: false,
singlepart: 'bulkdata,video',
bulkDataURI: {
enabled: true,
relativeResolution: 'studies',
},
omitQuotationForMultipartRequest: true
},
},
]
}
pypx
itself is filesystem-based, hence queries (for studies and series) involve directory traversal.
Moreover, it is necessary to read and parse JSON files to extract information.
These operations are considered slow and can benefit from a caching proxy server (TBA).
- etag
- add PatientName to study query results