Review after #74 (includes changes)
Adds meta logging file for preprocessing, for each run a separatelog file is created (either at specified path or by default in the current dir with timestamp)
log example (please disregard linebreaks added by github):
console:
[INFO] 2024-04-23T15:40:24+0200: ============================ Starting preprocessing ============================
[INFO] 2024-04-23T15:40:24+0200: Logs are saved to /home/ivan_marcel/preprocessing/brainles_preprocessing_2024-04-23T15:40:24.359481.log
[INFO] 2024-04-23T15:40:24+0200: Received center modality: t1c and moving modalities: t1, t2, flair
[INFO] 2024-04-23T15:40:24+0200: --------------------------- Starting Coregistration ----------------------------
[INFO] 2024-04-23T15:40:24+0200: Coregistering 3 moving modalities to center modality...
[INFO] 2024-04-23T15:40:24+0200: Registering modality t1 (file=cot1ct1) to center modality...
[INFO] 2024-04-23T15:40:26+0200: Registering modality t2 (file=cot1ct2) to center modality...
[INFO] 2024-04-23T15:40:28+0200: Registering modality flair (file=cot1cflair) to center modality...
[INFO] 2024-04-23T15:40:30+0200: Coregistration complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/co-registration
[INFO] 2024-04-23T15:40:30+0200: ------------------------- Starting atlas registration --------------------------
[INFO] 2024-04-23T15:40:30+0200: Registering center modality to atlas...
[INFO] 2024-04-23T15:40:36+0200: Atlas registration complete. Output saved to /home/ivan_marcel/preprocessing/temporary_directory/atlas-space
[INFO] 2024-04-23T15:40:36+0200: Transforming 3 moving modalities to atlas space...
[INFO] 2024-04-23T15:40:36+0200: Transforming modality t1 (file=atlast1) to atlas space...
[INFO] 2024-04-23T15:40:37+0200: Transforming modality t2 (file=atlast2) to atlas space...
[INFO] 2024-04-23T15:40:38+0200: Transforming modality flair (file=atlasflair) to atlas space...
[INFO] 2024-04-23T15:40:39+0200: Transformations complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-registration
[INFO] 2024-04-23T15:40:39+0200: ---------------------- Checking optional atlas correction ----------------------
[INFO] 2024-04-23T15:40:39+0200: Applying optional atlas correction for modality t1
[INFO] 2024-04-23T15:40:46+0200: Applying optional atlas correction for modality t2
[INFO] 2024-04-23T15:40:52+0200: Applying optional atlas correction for modality flair
[INFO] 2024-04-23T15:40:58+0200: Atlas correction complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/atlas-correction
[INFO] 2024-04-23T15:40:58+0200: Saving non skull-stripped images...
current image /home/ivan_marcel/preprocessing/temporary_directory/atlas-space/atlast1c.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/atlas-correction/atlas_correctedt1ct1.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/atlas-correction/atlas_correctedt1ct2.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/atlas-correction/atlas_correctedt1cflair.nii.gz
[INFO] 2024-04-23T15:41:03+0200: ---------------------- Checking optional brain extraction ----------------------
[INFO] 2024-04-23T15:41:03+0200: Starting brain extraction...
[INFO] 2024-04-23T15:41:03+0200: Extracting brain region for center modality...
File: /home/ivan_marcel/preprocessing/temporary_directory/atlas-space/atlas__t1c.nii.gz
preprocessing...
image shape after preprocessing: (103, 160, 160)
prediction (CNN id)...
0
1
2
3
4
exporting segmentation...
[INFO] 2024-04-23T15:41:21+0200: Applying brain mask to t1...
[INFO] 2024-04-23T15:41:22+0200: Applying brain mask to t2...
[INFO] 2024-04-23T15:41:22+0200: Applying brain mask to flair...
[INFO] 2024-04-23T15:41:23+0200: Brain extraction complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/OtherEXampleFromTCIA/OtherEXampleFromTCIA_brainles/brain-extraction
[INFO] 2024-04-23T15:41:23+0200: Saving skull-stripped images...
current image /home/ivan_marcel/preprocessing/temporary_directory/brain-extraction/atlas_bet_t1c.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/brain-extraction/brain_masked/brain_maskedt1.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/brain-extraction/brain_masked/brain_maskedt2.nii.gz
current image /home/ivan_marcel/preprocessing/temporary_directory/brain-extraction/brain_masked/brain_masked__flair.nii.gz
[INFO] 2024-04-23T15:41:25+0200: ============================ Preprocessing complete ============================
Review after #74 (includes changes) Adds meta logging file for preprocessing, for each run a separatelog file is created (either at specified path or by default in the current dir with timestamp) log example (please disregard linebreaks added by github):
console:
file: