<jupyter_start><jupyter_text>Test PARIETALTest the usability of the Brain Extraction utility PARIETAL.<jupyter_code>import sys
sys.path.append('..')
import ants
import time
from brain_extraction import BrainExtraction<jupyter_output><empty_output><jupyter_text>Object creationCreate a new `BrainExtraction` object with no options. By default, the method is configured using the `config.cfg` file at `config/config.cfg`:```python[data]normalize = Trueout_threshold = 0.5workers = 10[model]model_name = campinas_baseline_s2_multiressampling_step = 16patch_shape = 32use_gpu = Truegpu_number = 0```<jupyter_code>b = BrainExtraction()
b = BrainExtraction(normalize=True,
                   threshold=0.5,
                   gpu_number=1)<jupyter_output><empty_output><jupyter_text>Load case exampleWe load a test example from the Calgary-Campinas dataset.<jupyter_code>input_scan = 'example/T1.nii.gz'
ground_truth = 'example/gt.nii.gz'
output_scan = 'example/parietal_output.nii.gz'input_scan = 'example/T1.nii.gz'
ground_truth = 'example/gt.nii.gz'
t = time.time()
brainmask = b.run(input_scan, output_scan)
print('expected time ', time.time() - t)
t1_scan = ants.image_read(input_scan)
brainmask_scan = ants.image_read(output_scan)
gt_scan = ants.image_read(ground_truth)

ants.plot(t1_scan, 
          axis=2,
          slices=(0.4, 0.5, 0.6, 0.7),
          figsize=10, 
          overlay=brainmask_scan,
          overlay_alpha=0.3)

ants.plot(gt_scan, 
          axis=2,
          slices=(0.4, 0.5, 0.6, 0.7),
          figsize=10, 
          overlay=brainmask_scan,
          overlay_alpha=0.3)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11425061425061425, 'fraction_numerical': 0.026412776412776413, 'mean_word_length': 4.138801261829653, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '115800', 'license': 'Apache-2.0', 'n_tokens_mistral': 624, 'n_tokens_neox': 568, 'n_words': 104, 'path': 'tests/test_parietal.ipynb', 'repo_name': 'sergivalverde/PARIIETAL', 'size': '1628'}