Copyright (c) 2015 .decimal, Inc. All rights reserved.
Author: Daniel Patenaude
Date: 06/09/2015
Python Verion Required:
- Python 34
Packages required to run:
- requests
- colorama
- jsonpickle
- msgpack
- joblib
- functools
python -m pip install requests
python -m pip install colorama
python -m pip install jsonpickle
python -m pip install msgpack-python
python -m pip install joblib
python -m pip install functools
- pbs_dose_calc_from_dicom.py
- Posts a dicom patient (from a directory) and calls a pbs dose calculation from the dicom plan
- post_calc_request_generic.py
- Posts calculation request based on a prebuilt json request.
- The request example provided uses an already existing iss object referenced by ID (iss_files/aperture_creation_params.json).
- post_calc_request_sobp_dose.py
- Manually constructs an entire sobp dose calculation request and all required datatypes. No prior postings to ISS is required for this script to run. All data types are constructed inline with the calling calculation request.
- post_calc_request_sobp_dose_with_shifter.py
- Manually constructs an entire sobp dose calculation request and all required datatypes and using a constructed degrader. No prior postings to ISS is required for this script to run. All data types are constructed inline with the calling calculation request or posted with running the python script.
- post_dicom_patient.py
- Posts a dicom patient (from a directory) to thinknode ISS and returns the rt_study id
- post_iss_object_generic.py
- Posts any prebuilt json named_type dosimetry object to thinknode ISS.
- decimal_logging.py
- Prettified log output. Includes optional file logging, timestamps, message coloring (when run through command windows)
- rt_types.py
- Reconstruction of rt_types types in python class format. Includes interdependencies between types (e.g. aperture_creation_params.view requires class multiple_source_view)
- This types match the manifest for the version specified
- thinknode_worker.py
- Main worker to perform thinknode IAM, ISS, and calculation requests.
- Make sure to update thinknode.cfg prior to trying to authenticate with thinknode (see below)
- dosimetry_worker.py
- Provides functions to perform basic dosimetry calculation requests to make complex rt_types
- dicom_worker.py
- Provides functions to perform basic dicom parsing and translating into defined rt_types
- vtk_worker.py
- Provides functions to write common rt_types into .vtk files to be opened in visualizers (e.g. Paraview)
- Example Usage: res = thinknode.do_calculation(iam, make_water_phantom([-100, -100, -100], [200, 200, 200], [2, 2, 2]), True) img3 = rt_types.image_3d() img3.from_json(res) vtk.write_vtk_image3('testing_image3.vtk', img3.expand_data())
{
"user_token": "<API token generated from thinknode.com for your account>",
"api_url": "https://<thinknode_account>.thinknode.io/api/v1.0",
"apps":
{
"dosimetry":
{
"app_version": "1.0.0-beta1",
"branch_name": "master"
},
"dicom":
{
"app_version": "",
"branch_name": "master"
},
"rt_types":
{
"app_version": "",
"branch_name": "master"
}
},
"realm_name": "<thinknode realm>",
"account_name": "<thinknode account>"
}