From dc3e271f9cab446dfb3185404eb48a8345fe5bf5 Mon Sep 17 00:00:00 2001 From: neuronflow Date: Thu, 15 Feb 2024 21:50:33 +0100 Subject: [PATCH 1/2] fix: bet Signed-off-by: neuronflow --- brainles_preprocessing/modality.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/brainles_preprocessing/modality.py b/brainles_preprocessing/modality.py index 81f6c07..476bfb8 100644 --- a/brainles_preprocessing/modality.py +++ b/brainles_preprocessing/modality.py @@ -98,11 +98,15 @@ def __init__( else: self.normalized_skull_output_path = normalized_skull_output_path + # print("self.raw_bet_output_path", self.raw_bet_output_path) + # print("self.normalized_skull_output_path", self.normalized_skull_output_path) + # print("self.bet:", self.bet) + @property def bet(self) -> bool: return any( path is not None - for path in [self.raw_bet_output_path, self.normalized_skull_output_path] + for path in [self.raw_bet_output_path, self.normalized_bet_output_path] ) def normalize( @@ -290,6 +294,7 @@ def save_current_image( ) elif normalization is True: image = read_nifti(self.current) + print("current image", self.current) normalized_image = self.normalizer.normalize(image=image) write_nifti( input_array=normalized_image, From 9f3e97abae526c44cd0e37062a0211ce0438d572 Mon Sep 17 00:00:00 2001 From: neuronflow Date: Thu, 15 Feb 2024 21:51:31 +0100 Subject: [PATCH 2/2] bet Signed-off-by: neuronflow --- brainles_preprocessing/preprocessor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/brainles_preprocessing/preprocessor.py b/brainles_preprocessing/preprocessor.py index e1376f6..d631004 100644 --- a/brainles_preprocessing/preprocessor.py +++ b/brainles_preprocessing/preprocessor.py @@ -216,6 +216,7 @@ def run( # Optional: Brain extraction brain_extraction = any(modality.bet for modality in self.all_modalities) + # print("brain extraction: ", brain_extraction) if brain_extraction: bet_dir = os.path.join(self.temp_folder, "brain-extraction")