Commit 3298aba7 authored by Gabriel Couture's avatar Gabriel Couture

Adding README.md

parent 6b6889cb
# Brachy dose calculation client
Ce client permet d'intéragir avec l'API du microservice
_brachy-dose-calculation-microservice_.
## Installation
`pip install git+https://gitlab.physmed.chudequebec.ca/gacou54/brachy-dose-calculation-client.git`
## Usage
#### Ping le service (pour vérifier s'il est accessible et démarré)
```python
from brachy_dose_calculation_client import BrachyDoseCalculationClient
# Trouver l'URL du microservice. Si vous ne la connaissez pas, demandez.
client = BrachyDoseCalculationClient('http://brachy-dose-calculation-microservice-url')
ping_success, response = client.ping()
```
#### Récuppérer un RTDose avec les fichiers RTStruct et RTPlan
```python
from brachy_dose_calculation_client import BrachyDoseCalculationClient
client = BrachyDoseCalculationClient('http://brachy-dose-calculation-microservice-url')
rtdose, response = client.calculate_dose('rtstruct-file-path.dcm', 'rtplan-file-path.dcm')
rtdose.Modality
# RTDose
```
#### Récuppérer un RTDose avec les pydicom.Dataset RTStruct et RTPlan
```python
import pydicom
from brachy_dose_calculation_client import BrachyDoseCalculationClient
rtstruct = pydicom.dcmread('rtstruct-file-path.dcm')
rtplan = pydicom.dcmread('rtplan-file-path.dcm')
client = BrachyDoseCalculationClient('http://brachy-dose-calculation-microservice-url')
rtdose, response = client.calculate_dose(rtstruct, rtplan)
rtdose.Modality
# RTDose
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment