brats_toolkit package
- class brats_toolkit.fusionator.Fusionator(**kwargs)
Bases:
object- fuse(segmentations, outputPath, method='mav', weights=None, labels=None)
- Parameters:
segmentations ([type]) – [description]
outputPath ([type]) – [description]
method (str, optional) – [description]. Defaults to ‘mav’.
weights ([type], optional) – [description]. Defaults to None.
- Raises:
IOError – [description]
- class brats_toolkit.preprocessor.Preprocessor(**kwargs)
Bases:
objectClass for preprocessing medical imaging data.
- batch_preprocess(exam_import_folder: str, exam_export_folder: str, dicom_import_folder: str | None = None, nifti_export_folder: str | None = None, mode: str = 'cpu', confirm: bool = True, skipUpdate: bool = False, gpuid: str = '0') None
Process multiple sets of input files, potentially using Docker.
Parameters: - exam_import_folder (str): Import folder path. - exam_export_folder (str): Export folder path. - dicom_import_folder (Optional[str]): DICOM import folder path. - nifti_export_folder (Optional[str]): NIfTI export folder path. - mode (str): Processing mode (e.g., “cpu”, “gpu”). - confirm (bool): Whether confirmation is required. - skipUpdate (bool): Whether to skip Docker update. - gpuid (str): GPU ID.
Returns: - None
- single_preprocess(t1File: str, t1cFile: str, t2File: str, flaFile: str, outputFolder: str, mode: str, confirm: bool = False, skipUpdate: bool = False, gpuid: str = '0') None
Process a single set of input files.
Parameters: - t1File (str): Path to T1 file. - t1cFile (str): Path to T1c file. - t2File (str): Path to T2 file. - flaFile (str): Path to FLAIR file. - outputFolder (str): Output folder path. - mode (str): Processing mode (e.g., “cpu”, “gpu”). - confirm (bool): Whether confirmation is required. - skipUpdate (bool): Whether to skip Docker update. - gpuid (str): GPU ID.
Returns: - None
- class brats_toolkit.segmentor.Segmentor(**kwargs)
Bases:
objectNow does it all!
- segment(t1=None, t1c=None, t2=None, fla=None, cid='mocker', outputPath=None)
- Parameters:
t1 ([type], optional) – [description]. Defaults to None.
t1c ([type], optional) – [description]. Defaults to None.
t2 ([type], optional) – [description]. Defaults to None.
fla ([type], optional) – [description]. Defaults to None.
cid (str, optional) – [description]. Defaults to ‘mocker’.
outputPath ([type], optional) – [description]. Defaults to None.