![]() |
StrokeSegLab
|
Public Member Functions | |
| None | __init__ (self, str input_path, bool only_preprocessing, bool save_preprocessing, bool keep_MNI, bool save_pmap, bool skip_BET, float threshold, str model_name, str suffix, str viewer, str import_model) |
| None | import_model (self) |
| None | show_models (self) |
| None | run (self) |
Public Attributes | |
| only_preprocessing = only_preprocessing | |
| float | threshold = 0.5 if threshold is None else threshold |
| preprocessor = Preprocessor() | |
| viewer = viewer | |
| inference = Inference() | |
| postprocessor = Postprocessor() | |
| None | model_path = import_model |
| None | only_preprocessing = self.preprocessor.run(t1,flair,temp_dir) |
Protected Member Functions | |
| str | _check_device (self) |
Protected Attributes | |
| _logger = logging.getLogger() | |
| _option = Option() | |
| _config = Config() | |
Command line tool for the segmentation application
| None StrokeSegLab.entrypoints.cli.CLIMain.__init__ | ( | self, | |
| str | input_path, | ||
| bool | only_preprocessing, | ||
| bool | save_preprocessing, | ||
| bool | keep_MNI, | ||
| bool | save_pmap, | ||
| bool | skip_BET, | ||
| float | threshold, | ||
| str | model_name, | ||
| str | suffix, | ||
| str | viewer, | ||
| str | import_model ) |
Initialize the CLI. **Args:** - `input_path` (str): The input path. - `only_preprocessing` (bool): Perform brain extraction only. - `save_preprocessing` (bool): Save all preprocessing steps. - `keep_MNI` (bool): Save input and segmentation in MNI space. - `save_pmap` (bool): Save probability map in addition to binary mask. - `skip_BET` (bool): Skip brain extraction step. - `threshold` (float): Segmentation threshold (default 0.5 if None). - `model_name` (str): Path or name of the model. - `suffix` (str): Output segmentation suffix. - `viewer` (str): Viewer name for result visualization. - `import_model` (str): Model import mode or name.
|
protected |
@public
Check Cuda if available
Returns:
str: The selected execution provider ('CUDAExecutionProvider' or 'CPUExecutionProvider')
| None StrokeSegLab.entrypoints.cli.CLIMain.import_model | ( | self | ) |
Try to import the model file in the models directory
| None StrokeSegLab.entrypoints.cli.CLIMain.run | ( | self | ) |
Run the prediction or the brain extraction only with all the options specified
| None StrokeSegLab.entrypoints.cli.CLIMain.show_models | ( | self | ) |
Print all the models available in the models directory