diff --git a/brainles_preprocessing/modality.py b/brainles_preprocessing/modality.py index 918bc2e..fca3219 100644 --- a/brainles_preprocessing/modality.py +++ b/brainles_preprocessing/modality.py @@ -42,19 +42,49 @@ def __init__( self, modality_name: str, input_path: str, - output_path: str, - bet: bool, - atlas_correction: bool = True, + raw_bet_output_path: str = None, + raw_skull_output_path: str = None, + normalized_bet_output_path: str = None, + normalized_skull_output_path: str = None, normalizer: Optional[Normalizer] = None, + atlas_correction: bool = True, ) -> None: self.modality_name = modality_name self.input_path = turbopath(input_path) - self.output_path = turbopath(output_path) - self.bet = bet - self.atlas_correction = atlas_correction + if ( + raw_bet_output_path is None + and normalized_bet_output_path is None + and raw_skull_output_path is None + and normalized_skull_output_path is None + ): + raise ValueError( + "All output paths are None. At least one output path must be provided." + ) + self.raw_bet_output_path = turbopath(raw_bet_output_path) + self.raw_skull_output_path = turbopath(raw_skull_output_path) + if normalized_bet_output_path is not None: + if normalizer is None: + raise ValueError( + "A normalizer must be provided if normalized_bet_output_path is not None." + ) + self.normalized_bet_output_path = turbopath(normalized_bet_output_path) + + if normalized_skull_output_path is not None: + if normalizer is None: + raise ValueError( + "A normalizer must be provided if normalized_skull_output_path is not None." + ) + self.normalized_skull_output_path = turbopath(normalized_skull_output_path) + self.normalizer = normalizer + self.atlas_correction = atlas_correction + self.current = self.input_path + @property + def bet(self) -> bool: + return any([self.raw_bet_output_path, self.normalized_bet_output_path]) + def normalize( self, temporary_directory: str, @@ -225,3 +255,24 @@ def extract_brain_region( if self.bet is True: self.current = atlas_bet_cm return atlas_mask_path + + def save_current_image( + self, + output_path: str, + normalization=False, + ) -> None: + os.makedirs(output_path.parent, exist_ok=True) + + if normalization is False: + shutil.copyfile( + self.current, + output_path, + ) + elif normalization is True: + image = read_nifti(self.current) + normalized_image = self.normalizer.normalize(image=image) + write_nifti( + input_array=normalized_image, + output_nifti_path=output_path, + reference_nifti_path=self.current, + ) diff --git a/brainles_preprocessing/preprocessor.py b/brainles_preprocessing/preprocessor.py index 17f7a46..e03d588 100644 --- a/brainles_preprocessing/preprocessor.py +++ b/brainles_preprocessing/preprocessor.py @@ -103,17 +103,25 @@ def run( save_dir_atlas_registration: Optional[str] = None, save_dir_atlas_correction: Optional[str] = None, save_dir_brain_extraction: Optional[str] = None, - save_dir_unnormalized: Optional[str] = None, ): """ - Execute the preprocessing pipeline. + Execute the preprocessing pipeline, encompassing coregistration, atlas-based registration, + atlas correction, and optional brain extraction. Args: save_dir_coregistration (str, optional): Directory path to save coregistration results. save_dir_atlas_registration (str, optional): Directory path to save atlas registration results. save_dir_atlas_correction (str, optional): Directory path to save atlas correction results. save_dir_brain_extraction (str, optional): Directory path to save brain extraction results. - save_dir_unnormalized (str, optional): Directory path to save unnormalized images. + + This method orchestrates the entire preprocessing workflow by sequentially performing: + + 1. Coregistration: Aligning moving modalities to the central modality. + 2. Atlas Registration: Aligning the central modality to a predefined atlas. + 3. Atlas Correction: Applying additional correction in atlas space if specified. + 4. Brain Extraction: Optionally extracting brain regions using specified masks. + + Results are saved in the specified directories, allowing for modular and configurable output storage. """ # Coregister moving modalities to center modality coregistration_dir = os.path.join(self.temp_folder, "coregistration") @@ -142,22 +150,22 @@ def run( ) # Register center modality to atlas - file_name = f"atlas__{self.center_modality.modality_name}" + center_file_name = f"atlas__{self.center_modality.modality_name}" transformation_matrix = self.center_modality.register( registrator=self.registrator, fixed_image_path=self.atlas_image_path, registration_dir=self.atlas_dir, - moving_image_name=file_name, + moving_image_name=center_file_name, ) # Transform moving modalities to atlas for moving_modality in self.moving_modalities: - file_name = f"atlas__{moving_modality.modality_name}" + moving_file_name = f"atlas__{moving_modality.modality_name}" moving_modality.transform( registrator=self.registrator, fixed_image_path=self.atlas_image_path, registration_dir_path=self.atlas_dir, - moving_image_name=file_name, + moving_image_name=moving_file_name, transformation_matrix_path=transformation_matrix, ) self._save_output( @@ -171,12 +179,12 @@ def run( for moving_modality in self.moving_modalities: if moving_modality.atlas_correction is True: - file_name = f"atlas_corrected__{self.center_modality.modality_name}__{moving_modality.modality_name}" + moving_file_name = f"atlas_corrected__{self.center_modality.modality_name}__{moving_modality.modality_name}" moving_modality.register( registrator=self.registrator, fixed_image_path=self.center_modality.current, registration_dir=atlas_correction_dir, - moving_image_name=file_name, + moving_image_name=moving_file_name, ) if self.center_modality.atlas_correction is True: @@ -193,8 +201,22 @@ def run( save_dir=save_dir_atlas_correction, ) + # now we save images that are not skullstripped + for modality in self.all_modalities: + if modality.raw_skull_output_path: + modality.save_current_image( + modality.raw_skull_output_path, + normalization=False, + ) + if modality.normalized_skull_output_path: + modality.save_current_image( + modality.normalized_skull_output_path, + normalization=True, + ) + # Optional: Brain extraction brain_extraction = any(modality.bet for modality in self.all_modalities) + if brain_extraction: bet_dir = os.path.join(self.temp_folder, "brain-extraction") os.makedirs(bet_dir, exist_ok=True) @@ -216,21 +238,18 @@ def run( save_dir=save_dir_brain_extraction, ) - # Optional: Normalization - normalization = any(modality.normalizer for modality in self.all_modalities) - if normalization: - for modality in [self.center_modality] + self.moving_modalities: - modality.normalize( - temporary_directory=self.temp_folder, - store_unnormalized=save_dir_unnormalized, - ) - + # now we save images that are skullstripped for modality in self.all_modalities: - os.makedirs(modality.output_path.parent, exist_ok=True) - shutil.copyfile( - modality.current, - modality.output_path, - ) + if modality.raw_bet_output_path: + modality.save_current_image( + modality.raw_bet_output_path, + normalization=False, + ) + if modality.normalized_bet_output_path: + modality.save_current_image( + modality.normalized_bet_output_path, + normalization=True, + ) def _save_output( self, diff --git a/example_data/OtherEXampleFromTCIA/MRHR_FLAIR_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_FLAIR_AX_SE_IR_5_tir2d1_21_fla.nii.gz b/example/example_data/OtherEXampleFromTCIA/MRHR_FLAIR_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_FLAIR_AX_SE_IR_5_tir2d1_21_fla.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/MRHR_FLAIR_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_FLAIR_AX_SE_IR_5_tir2d1_21_fla.nii.gz rename to example/example_data/OtherEXampleFromTCIA/MRHR_FLAIR_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_FLAIR_AX_SE_IR_5_tir2d1_21_fla.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/MRHR_T1_AX_POST_GAD_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T1_AX_POST_GAD_SE_13_se2d1r_t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/MRHR_T1_AX_POST_GAD_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T1_AX_POST_GAD_SE_13_se2d1r_t1c.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/MRHR_T1_AX_POST_GAD_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T1_AX_POST_GAD_SE_13_se2d1r_t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/MRHR_T1_AX_POST_GAD_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T1_AX_POST_GAD_SE_13_se2d1r_t1c.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/MRHR_T2_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T2_AX_SE_2_tse2d1_11_t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/MRHR_T2_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T2_AX_SE_2_tse2d1_11_t2.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/MRHR_T2_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T2_AX_SE_2_tse2d1_11_t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/MRHR_T2_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_MRHR_T2_AX_SE_2_tse2d1_11_t2.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__flair.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t1.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction/atlas_corrected__t1c__t2.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__flair.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__flair.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t1c.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t2.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__t2.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz index 03ee21c..2ee940d 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz index c5fc126..0e9568c 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz index 8fd1224..ae0aaa6 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__flair.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t1.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.txt b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.txt similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.txt rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__t2.txt diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/native__t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/native__t1c.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/native__t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/native__t1c.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_fla.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_fla_bet_normalized.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_fla.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_fla_bet_normalized.nii.gz index a8a68c1..070a948 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_fla.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_fla_bet_normalized.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1_bet_normalized.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1_bet_normalized.nii.gz index 91441de..81536e6 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1_bet_normalized.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1c_bet_normalized.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1c_bet_normalized.nii.gz index 02c9708..597382c 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t1c.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t1c_bet_normalized.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t2_bet_normalized.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t2_bet_normalized.nii.gz index d55e19c..e04e323 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/preprocessed/OtherEXampleFromTCIA_t2.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_bet/OtherEXampleFromTCIA_t2_bet_normalized.nii.gz differ diff --git a/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_fla_skull_normalized.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_fla_skull_normalized.nii.gz new file mode 100644 index 0000000..463bab7 Binary files /dev/null and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_fla_skull_normalized.nii.gz differ diff --git a/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1_skull_normalized.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1_skull_normalized.nii.gz new file mode 100644 index 0000000..6a4fe1f Binary files /dev/null and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1_skull_normalized.nii.gz differ diff --git a/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1c_skull_normalized.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1c_skull_normalized.nii.gz new file mode 100644 index 0000000..c02e089 Binary files /dev/null and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t1c_skull_normalized.nii.gz differ diff --git a/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t2_skull_normalized.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t2_skull_normalized.nii.gz new file mode 100644 index 0000000..718095b Binary files /dev/null and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/normalized_skull/OtherEXampleFromTCIA_t2_skull_normalized.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_fla_bet_raw.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_fla_bet_raw.nii.gz index 03ee21c..2ee940d 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__flair.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_fla_bet_raw.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t1_bet_raw.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t1_bet_raw.nii.gz index c5fc126..0e9568c 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t1.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t1_bet_raw.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t1c_bet_raw.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t1c_bet_raw.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t2_bet_raw.nii.gz similarity index 99% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t2_bet_raw.nii.gz index 8fd1224..ae0aaa6 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__t2.nii.gz and b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_bet/OtherEXampleFromTCIA_t2_bet_raw.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__flair.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_fla_skull_raw.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__flair.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_fla_skull_raw.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t1_skull_raw.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t1_skull_raw.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t1c_skull_raw.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t1c_skull_raw.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t2.nii.gz b/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t2_skull_raw.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t2.nii.gz rename to example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/raw_skull/OtherEXampleFromTCIA_t2_skull_raw.nii.gz diff --git a/example_data/OtherEXampleFromTCIA/T1_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_T1_AX_SE_10_se2d1_t1.nii.gz b/example/example_data/OtherEXampleFromTCIA/T1_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_T1_AX_SE_10_se2d1_t1.nii.gz similarity index 100% rename from example_data/OtherEXampleFromTCIA/T1_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_T1_AX_SE_10_se2d1_t1.nii.gz rename to example/example_data/OtherEXampleFromTCIA/T1_AX_OtherEXampleTCIA_TCGA-FG-6692_Si_TCGA-FG-6692_T1_AX_SE_10_se2d1_t1.nii.gz diff --git a/example_data/TCGA-DU-7294/AXIAL_FLAIR_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AXIAL_FLAIR_RF2_150_IR_7_fla.nii.gz b/example/example_data/TCGA-DU-7294/AXIAL_FLAIR_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AXIAL_FLAIR_RF2_150_IR_7_fla.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/AXIAL_FLAIR_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AXIAL_FLAIR_RF2_150_IR_7_fla.nii.gz rename to example/example_data/TCGA-DU-7294/AXIAL_FLAIR_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AXIAL_FLAIR_RF2_150_IR_7_fla.nii.gz diff --git a/example_data/TCGA-DU-7294/AX_T1_POST_GD_FLAIR_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_POST_GD_FLAIR_RM_13_t1c.nii.gz b/example/example_data/TCGA-DU-7294/AX_T1_POST_GD_FLAIR_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_POST_GD_FLAIR_RM_13_t1c.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/AX_T1_POST_GD_FLAIR_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_POST_GD_FLAIR_RM_13_t1c.nii.gz rename to example/example_data/TCGA-DU-7294/AX_T1_POST_GD_FLAIR_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_POST_GD_FLAIR_RM_13_t1c.nii.gz diff --git a/example_data/TCGA-DU-7294/AX_T1_pre_gd_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_pre_gd_RM_8_t1.nii.gz b/example/example_data/TCGA-DU-7294/AX_T1_pre_gd_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_pre_gd_RM_8_t1.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/AX_T1_pre_gd_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_pre_gd_RM_8_t1.nii.gz rename to example/example_data/TCGA-DU-7294/AX_T1_pre_gd_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T1_pre_gd_RM_8_t1.nii.gz diff --git a/example_data/TCGA-DU-7294/AX_T2_FR-FSE_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T2_FR-FSE_RF2_150_RM_4_t2.nii.gz b/example/example_data/TCGA-DU-7294/AX_T2_FR-FSE_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T2_FR-FSE_RF2_150_RM_4_t2.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/AX_T2_FR-FSE_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T2_FR-FSE_RF2_150_RM_4_t2.nii.gz rename to example/example_data/TCGA-DU-7294/AX_T2_FR-FSE_RF2_150_TCGA-DU-7294_TCGA-DU-7294_GE_TCGA-DU-7294_AX_T2_FR-FSE_RF2_150_RM_4_t2.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__flair.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t1.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction/atlas_corrected__t1c__t2.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__flair.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__flair.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t1c.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t2.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__t2.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_bet_t1c_mask.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz index d43b4e5..1e770bd 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__flair.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz index 487540b..f9f9e8c 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t1.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz index fa05522..da97651 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__t2.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__flair.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t1.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.txt b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.txt similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.txt rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__t2.txt diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/native__t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/native__t1c.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/native__t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/native__t1c.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_fla.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_fla_bet_normalized.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_fla.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_fla_bet_normalized.nii.gz index 5830887..a787891 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_fla.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_fla_bet_normalized.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1_bet_normalized.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1_bet_normalized.nii.gz index fd43b96..c27916c 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1_bet_normalized.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1c_bet_normalized.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1c_bet_normalized.nii.gz index 5b308d5..304de8d 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t1c.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t1c_bet_normalized.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t2_bet_normalized.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t2_bet_normalized.nii.gz index 4bf2c43..76db799 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/preprocessed/TCGA-DU-7294_t2.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_bet/TCGA-DU-7294_t2_bet_normalized.nii.gz differ diff --git a/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_fla_skull_normalized.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_fla_skull_normalized.nii.gz new file mode 100644 index 0000000..f55b6bb Binary files /dev/null and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_fla_skull_normalized.nii.gz differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__fla.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1_skull_normalized.nii.gz similarity index 51% rename from example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__fla.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1_skull_normalized.nii.gz index 4b16270..2abefa1 100644 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration/atlas__fla.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1_skull_normalized.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__fla.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1c_skull_normalized.nii.gz similarity index 50% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__fla.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1c_skull_normalized.nii.gz index 4b16270..2dbb4cd 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration/atlas__fla.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t1c_skull_normalized.nii.gz differ diff --git a/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t2_skull_normalized.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t2_skull_normalized.nii.gz new file mode 100644 index 0000000..752d9be Binary files /dev/null and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/normalized_skull/TCGA-DU-7294_t2_skull_normalized.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_fla_bet_raw.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_fla_bet_raw.nii.gz index d43b4e5..1e770bd 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__flair.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_fla_bet_raw.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t1_bet_raw.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t1_bet_raw.nii.gz index 487540b..f9f9e8c 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t1.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t1_bet_raw.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t1c_bet_raw.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t1c_bet_raw.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t2_bet_raw.nii.gz similarity index 99% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t2_bet_raw.nii.gz index fa05522..da97651 100644 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__t2.nii.gz and b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_bet/TCGA-DU-7294_t2_bet_raw.nii.gz differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__flair.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_fla_skull_raw.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__flair.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_fla_skull_raw.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t1.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t1_skull_raw.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t1.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t1_skull_raw.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t1c_skull_raw.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t1c_skull_raw.nii.gz diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t2.nii.gz b/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t2_skull_raw.nii.gz similarity index 100% rename from example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t2.nii.gz rename to example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/raw_skull/TCGA-DU-7294_t2_skull_raw.nii.gz diff --git a/example_modality_centric_preprocessor.py b/example/example_modality_centric_preprocessor.py similarity index 62% rename from example_modality_centric_preprocessor.py rename to example/example_modality_centric_preprocessor.py index 9fca4bc..de75c36 100644 --- a/example_modality_centric_preprocessor.py +++ b/example/example_modality_centric_preprocessor.py @@ -22,7 +22,10 @@ def preprocess(inputDir): # is the exam already processed? brainles_dir = turbopath(inputDir) + "/" + inputDir.name + "_brainles" - prep_dir = brainles_dir + "/preprocessed" + raw_bet_dir = brainles_dir / "raw_bet" + norm_bet_dir = brainles_dir / "normalized_bet" + raw_skull_dir = brainles_dir / "raw_skull" + norm_skull_dir = brainles_dir / "normalized_skull" # if not os.path.exists(prep_dir): # if os.path.exists(prep_dir): @@ -54,8 +57,13 @@ def preprocess(inputDir): center = Modality( modality_name="t1c", input_path=t1cFile, - output_path=prep_dir + "/" + inputDir.name + "_t1c.nii.gz", - bet=False, + raw_bet_output_path=raw_bet_dir / inputDir.name + "_t1c_bet_raw.nii.gz", + raw_skull_output_path=raw_skull_dir / inputDir.name + + "_t1c_skull_raw.nii.gz", + normalized_bet_output_path=norm_bet_dir / inputDir.name + + "_t1c_bet_normalized.nii.gz", + normalized_skull_output_path=norm_skull_dir / inputDir.name + + "_t1c_skull_normalized.nii.gz", atlas_correction=True, normalizer=percentile_normalizer, ) @@ -64,27 +72,42 @@ def preprocess(inputDir): Modality( modality_name="t1", input_path=t1File, - output_path=prep_dir + "/" + inputDir.name + "_t1.nii.gz", - # raw_brainextracted_output_path, - # normalized_brainextracted_output_path, - # raw_withskull_output_path, - # normalized_withskull_output_path, + raw_bet_output_path=raw_bet_dir / inputDir.name + + "_t1_bet_raw.nii.gz", + raw_skull_output_path=raw_skull_dir / inputDir.name + + "_t1_skull_raw.nii.gz", + normalized_bet_output_path=norm_bet_dir / inputDir.name + + "_t1_bet_normalized.nii.gz", + normalized_skull_output_path=norm_skull_dir / inputDir.name + + "_t1_skull_normalized.nii.gz", atlas_correction=True, normalizer=percentile_normalizer, ), Modality( modality_name="t2", input_path=t2File, - output_path=prep_dir + "/" + inputDir.name + "_t2.nii.gz", - bet=True, + raw_bet_output_path=raw_bet_dir / inputDir.name + + "_t2_bet_raw.nii.gz", + raw_skull_output_path=raw_skull_dir / inputDir.name + + "_t2_skull_raw.nii.gz", + normalized_bet_output_path=norm_bet_dir / inputDir.name + + "_t2_bet_normalized.nii.gz", + normalized_skull_output_path=norm_skull_dir / inputDir.name + + "_t2_skull_normalized.nii.gz", atlas_correction=True, normalizer=percentile_normalizer, ), Modality( modality_name="flair", input_path=flaFile, - output_path=prep_dir + "/" + inputDir.name + "_fla.nii.gz", - bet=True, + raw_bet_output_path=raw_bet_dir / inputDir.name + + "_fla_bet_raw.nii.gz", + raw_skull_output_path=raw_skull_dir / inputDir.name + + "_fla_skull_raw.nii.gz", + normalized_bet_output_path=norm_bet_dir / inputDir.name + + "_fla_bet_normalized.nii.gz", + normalized_skull_output_path=norm_skull_dir / inputDir.name + + "_fla_skull_normalized.nii.gz", atlas_correction=True, normalizer=percentile_normalizer, ), @@ -104,7 +127,6 @@ def preprocess(inputDir): save_dir_atlas_registration=brainles_dir + "/atlas-registration", save_dir_atlas_correction=brainles_dir + "/atlas-correction", save_dir_brain_extraction=brainles_dir + "/brain-extraction", - save_dir_unnormalized=brainles_dir + "/unnormalized", ) except Exception as e: @@ -118,7 +140,7 @@ def preprocess(inputDir): ### *** GOGOGO *** ### if __name__ == "__main__": - EXAMPLE_DATA_DIR = turbopath("example_data") + EXAMPLE_DATA_DIR = turbopath("example/example_data") exams = EXAMPLE_DATA_DIR.dirs() diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__flair.txt b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__flair.txt deleted file mode 100644 index b045cb2..0000000 --- a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__flair.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999986 0.0004745152 0.001594621 -0.2643708 --0.0004719235 0.9999986 -0.001640065 -0.2377842 --0.001595397 0.001639307 0.9999974 -0.3903068 -0 0 0 1 diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t1.txt b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t1.txt deleted file mode 100644 index d17faa9..0000000 --- a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t1.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999967 -0.002466233 -0.0006566526 0.2820461 -0.002466184 0.999997 -3.481855e-05 0.3856321 -0.0006567395 3.319529e-05 0.9999998 0.2829154 -0 0 0 1 diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t2.txt b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t2.txt deleted file mode 100644 index 1a4fb67..0000000 --- a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/atlas_corrected__t1c__t2.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999985 -0.0004714925 0.001716384 -0.1140093 -0.0004710982 0.9999999 0.0002239809 0.02963747 --0.001716489 -0.0002231678 0.9999985 -0.2469956 -0 0 0 1 diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz deleted file mode 100644 index 2e2bf28..0000000 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz and /dev/null differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.nii.gz b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.nii.gz deleted file mode 100644 index 1f34d44..0000000 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.nii.gz and /dev/null differ diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.txt b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.txt deleted file mode 100644 index d312371..0000000 --- a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration/co__t1c__fla.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9996052 0.008290411 -0.02684693 0.4557816 --0.008523657 0.9999268 -0.008585239 1.334237 -0.02677379 0.008810687 0.9996027 -1.209411 -0 0 0 1 diff --git a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__fla.nii.gz b/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__fla.nii.gz deleted file mode 100644 index e1715e9..0000000 Binary files a/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/unnormalized/unnormalized__fla.nii.gz and /dev/null differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__flair.txt b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__flair.txt deleted file mode 100644 index c42602c..0000000 --- a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__flair.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999974 0.000648056 -0.002159797 0.04889112 --0.000650483 0.9999992 -0.00112357 -0.003959787 -0.002159069 0.001124969 0.999997 0.04360351 -0 0 0 1 diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t1.txt b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t1.txt deleted file mode 100644 index 190fa04..0000000 --- a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t1.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999996 -0.0008996009 0.0001597377 0.1239718 -0.0008998092 0.9999989 -0.001229477 0.25916 --0.0001586301 0.001229625 0.9999993 -0.1732138 -0 0 0 1 diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t2.txt b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t2.txt deleted file mode 100644 index fd01b1d..0000000 --- a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/atlas_corrected__t1c__t2.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9999991 0.000149987 0.001336964 -0.03884844 --0.0001501937 1 0.0001575474 0.0593403 --0.001336942 -0.0001577501 0.9999991 -0.04306287 -0 0 0 1 diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz deleted file mode 100644 index 2e2bf28..0000000 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction/brain_masked/brain_masked__fla.nii.gz and /dev/null differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.nii.gz b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.nii.gz deleted file mode 100644 index 1f34d44..0000000 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.nii.gz and /dev/null differ diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.txt b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.txt deleted file mode 100644 index d312371..0000000 --- a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration/co__t1c__fla.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.9996052 0.008290411 -0.02684693 0.4557816 --0.008523657 0.9999268 -0.008585239 1.334237 -0.02677379 0.008810687 0.9996027 -1.209411 -0 0 0 1 diff --git a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__fla.nii.gz b/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__fla.nii.gz deleted file mode 100644 index 554eb16..0000000 Binary files a/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/unnormalized/unnormalized__fla.nii.gz and /dev/null differ