|
a |
|
b/0_preprocessing_batch.py |
|
|
1 |
from brats_toolkit.preprocessor import Preprocessor |
|
|
2 |
|
|
|
3 |
# instantiate |
|
|
4 |
prep = Preprocessor() |
|
|
5 |
|
|
|
6 |
# define inputs and outputs |
|
|
7 |
inputDir = "example_data/input_preprocessor_batch_processing/exams_to_preprocess" |
|
|
8 |
outputDir = "example_data/output_preprocessor_batch" |
|
|
9 |
|
|
|
10 |
|
|
|
11 |
# execute it |
|
|
12 |
prep.batch_preprocess( |
|
|
13 |
exam_import_folder=inputDir, |
|
|
14 |
exam_export_folder=outputDir, |
|
|
15 |
# this way the brain extraction will run on gpu |
|
|
16 |
mode="gpu", |
|
|
17 |
confirm=True, |
|
|
18 |
skipUpdate=False, |
|
|
19 |
gpuid="0", |
|
|
20 |
) |