Imaging Database Documentation
Overview
The Imaging Database are generic functions used to handle loading and parsing of neural image related files.
Please refer to Online 3D Renderer Documentation for more detail discussions.
Methods
- ImageDatabase.extractAvailableModels(patient_id, authority)
Extract available image models from patient directory
- Parameters
patient_id – UUID4 deidentified id for each unique Patient in SQL Database.
authority – User permission structure indicating the type of access the user has.
- Returns
Dictionary with
availableModels
array anddescriptor
object.
- ImageDatabase.stlReader(directory, filename, color='#FFFFFF')
Decode STL files.
The color parameter will encode color code to binary STL header. This will ensure the STL decoder associate the STL object with a specific color.
- Parameters
directory – UUID4 deidentified id for each unique Patient in SQL Database.
filename – String of model filename
color – Hex-encoded color string
- Returns
Raw byte array of binary STL file.
- ImageDatabase.pointsReader(directory, filename)
Decode SCIRun Points/Edges files.
- Parameters
directory – UUID4 deidentified id for each unique Patient in SQL Database.
filename – String of model filename
- Returns
Point arrays of tracts.
- ImageDatabase.tractReader(directory, filename)
Decode Tract files.
This is a wrapper for NiBabel library’s streamlines class. This function can be used to read MRTRIX3 tck file format.
- Parameters
directory – UUID4 deidentified id for each unique Patient in SQL Database.
filename – String of model filename
- Returns
Point arrays of tracts.
- ImageDatabase.niftiInfo(directory, filename)
Extract Header information from NifTi file
- Parameters
directory – UUID4 deidentified id for each unique Patient in SQL Database.
filename – String of model filename
- Returns
NifTi headers that describe dimension and size of the volume
- ImageDatabase.niftiLoader(directory, filename)
Extract raw byte values from NifTi file
- Parameters
directory – UUID4 deidentified id for each unique Patient in SQL Database.
filename – String of model filename
- Returns
Raw byte array of 3D NifTi matrix.
- ImageDatabase.electrodeReader(filename)
Extract electrode paginations
This function will read in all models within Electrode directory to create a multi-STL pagination for frontend to request multiple objects.
- Parameters
filename – String of model filename
- Returns
Array of dictionary for Pagination. Each dictionary defines “filename”, “electrode”, “directory”, and “type”