This module implements the visualization of DICOM datasets with Brayns
- Build Brayns and install it into ${BRAYNS_INSTALLATION_FOLDER}
- Install dcmtk
sudo apt install libdcmtk-dev
git clone https://github.com/favreau/Brayns-UC-DICOM
cd Brayns-UC-DICOM
mkdir build
cd build
CMAKE_PREFIX_PATH=${BRAYNS_INSTALLATION_FOLDER} cmake .. -DCMAKE_PREFIX_PATH=${BRAYNS_INSTALLATION_FOLDER} -DCMAKE_BUILD_TYPE=Release
This will build and install libdicom.so
- Set PATH and LD_LIBRARY_PATH
export PATH=${BRAYNS_INSTALLATION_FOLDER}/bin:${PATH}
export LD_LIBRARY_PATH=${BRAYNS_INSTALLATION_FOLDER}/lib:${LD_LIBRARY_PATH}
- Run Brayns application either with command line '--plugin dicom'
braynsService --http-server :5000 --plugin dicom
A user interface is currently available as a docker container
docker run -ti --rm -p 8080:8080 bluebrain/brayns-ui
Once the container is running, access the web UI at http://localhost:8080?host=localhost:5000
Install the brayns package in your favourite Python 3 virtual environment:
virtualenv -p python3 venv
. ./env/bin/activate
pip install brayns
Connect to Brayns and load DICOM data:
from brayns import Client
brayns = Client('localhost:5000')
# Set renderer that supports volumes
brayns.set_renderer(current='scivis', head_light=True, samples_per_pixel=1)
# Load data
brayns.add_model(path='...') # Path to the DICOM folder
# Set rendering parameters
p = brayns.ScivisRendererParams()
p.shadows_enabled = False
p.ao_weight = 1
brayns.set_renderer_params(p)
brayns.set_volume_parameters(
specular=(0,0,0),gradient_shading=False, single_shade=False,
adaptive_sampling=True,adaptive_max_sampling_rate=1, sampling_rate=1)
For more information about the Brayns Python interface, see the documentation.