BrainLesion / preprocessing

preprocessing tools for multi-modal 3D brain MRI
GNU Affero General Public License v3.0
11 stars 3 forks source link

30 feature request we want logging #75

Closed MarcelRosier closed 3 months ago

MarcelRosier commented 4 months ago

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):

[INFO | preprocessor | L217 ] 2024-04-23T15:38:38+0200: ============================ Starting preprocessing ============================ [INFO | preprocessor | L218 ] 2024-04-23T15:38:38+0200: Logs are saved to /home/ivan_marcel/preprocessing/brainles_preprocessing_2024-04-23T15:38:38.564688.log [INFO | preprocessor | L219 ] 2024-04-23T15:38:38+0200: Received center modality: t1c and moving modalities: t1, t2, flair [INFO | preprocessor | L223 ] 2024-04-23T15:38:38+0200: --------------------------- Starting Coregistration ---------------------------- [INFO | preprocessor | L228 ] 2024-04-23T15:38:38+0200: Coregistering 3 moving modalities to center modality... [INFO | preprocessor | L233 ] 2024-04-23T15:38:38+0200: Registering modality t1 (file=cot1ct1) to center modality... [INFO | preprocessor | L233 ] 2024-04-23T15:38:52+0200: Registering modality t2 (file=cot1ct2) to center modality... [INFO | preprocessor | L233 ] 2024-04-23T15:39:05+0200: Registering modality flair (file=cot1cflair) to center modality... [INFO | preprocessor | L255 ] 2024-04-23T15:39:19+0200: Coregistration complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/co-registration [INFO | preprocessor | L260 ] 2024-04-23T15:39:19+0200: ------------------------- Starting atlas registration -------------------------- [INFO | preprocessor | L261 ] 2024-04-23T15:39:19+0200: Registering center modality to atlas... [INFO | preprocessor | L269 ] 2024-04-23T15:39:27+0200: Atlas registration complete. Output saved to /home/ivan_marcel/preprocessing/temporary_directory/atlas-space [INFO | preprocessor | L272 ] 2024-04-23T15:39:27+0200: Transforming 3 moving modalities to atlas space... [INFO | preprocessor | L277 ] 2024-04-23T15:39:27+0200: Transforming modality t1 (file=atlast1) to atlas space... [INFO | preprocessor | L277 ] 2024-04-23T15:39:29+0200: Transforming modality t2 (file=atlast2) to atlas space... [INFO | preprocessor | L277 ] 2024-04-23T15:39:31+0200: Transforming modality flair (file=atlas__flair) to atlas space... [INFO | preprocessor | L291 ] 2024-04-23T15:39:34+0200: Transformations complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-registration [INFO | preprocessor | L296 ] 2024-04-23T15:39:34+0200: ---------------------- Checking optional atlas correction ---------------------- [INFO | preprocessor | L302 ] 2024-04-23T15:39:34+0200: Applying optional atlas correction for modality t1 [INFO | preprocessor | L302 ] 2024-04-23T15:39:40+0200: Applying optional atlas correction for modality t2 [INFO | preprocessor | L302 ] 2024-04-23T15:39:47+0200: Applying optional atlas correction for modality flair [INFO | preprocessor | L323 ] 2024-04-23T15:39:54+0200: Atlas correction complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/atlas-correction [INFO | preprocessor | L333 ] 2024-04-23T15:39:54+0200: Saving non skull-stripped images... [INFO | preprocessor | L346 ] 2024-04-23T15:40:01+0200: ---------------------- Checking optional brain extraction ---------------------- [INFO | preprocessor | L351 ] 2024-04-23T15:40:01+0200: Starting brain extraction... [INFO | preprocessor | L356 ] 2024-04-23T15:40:01+0200: Extracting brain region for center modality... [INFO | preprocessor | L361 ] 2024-04-23T15:40:19+0200: Applying brain mask to t1... [INFO | preprocessor | L361 ] 2024-04-23T15:40:20+0200: Applying brain mask to t2... [INFO | preprocessor | L361 ] 2024-04-23T15:40:21+0200: Applying brain mask to flair... [INFO | preprocessor | L374 ] 2024-04-23T15:40:21+0200: Brain extraction complete. Output saved to /home/ivan_marcel/preprocessing/example/example_data/TCGA-DU-7294/TCGA-DU-7294_brainles/brain-extraction [INFO | preprocessor | L381 ] 2024-04-23T15:40:21+0200: Saving skull-stripped images... [INFO | preprocessor | L393 ] 2024-04-23T15:40:23+0200: ============================ Preprocessing complete ============================