CBICA / CaPTk

Cancer Imaging Phenomics Toolkit (CaPTk) is a software platform to perform image analysis and predictive modeling tasks. Documentation: https://cbica.github.io/CaPTk
https://www.cbica.upenn.edu/captk
Other
173 stars 63 forks source link

Co-registered images with brain mask applied not generated unless --brainTumor is set to 1 #1492

Closed averdones closed 2 years ago

averdones commented 2 years ago

Describe the bug When running the BraTSPipeline preprocessing using the CLI, the final four co-registered images, with brain mask applied, namely:

are not generated unless the option --brainTumor is set to 1.

However, these four images should be generated even with the --brainTumor option set to 0, because they are related to the skull-stripping (aka brain segmentation), not to the tumor segmentation.

In fact, the co-registered brain mask brainMask_SRI.nii.gz is correctly generated when the option --brainTumor is set to 0. However, the four images where the mask is applied to the original images are not generated.

We shouldn't wait for the tumor segmentation to run, in order to have the brain masks applied to the original images.

Is there something I am missing? Perhaps, the images T1_to_SRI_brain.nii.gz, T1CE_to_SRI_brain.nii.gz, T2_to_SRI_brain.nii.gz and FL_to_SRI_brain.nii.gz are not what I am expecting? I visually inspected them and they only seem to be the coregistered segmented brain, not the tumor.

To Reproduce Steps to reproduce the behavior:

  1. In Ubuntu, open a terminal and run: ${CaPTk_InstallDir}/captk BraTSPipeline --brainTumor 0 -t1 C:/test/t1.nii.gz -t1c C:/test/t1ce.nii.gz -t2 C:/test/t2.nii.gz -fl C:/test/flair.nii.gz -o C:/test/outputDir

Expected behavior The co-registered images, with brain mask applied should be generated when running BraTSPipeline with option --brainTumor set to 0.

CaPTk Version 1.8.1

Desktop (please complete the following information):

sarthakpati commented 2 years ago

Thanks for the report! I am unsure if this is fixed in the latest PRs or not, but I am tagging @AlexanderGetka-cbica for further updates.

AlexanderGetka-cbica commented 2 years ago

@averdones You're absolutely correct. This step was being done at the very beginning of the brain tumor steps instead of at the end of skull stripping. A PR is going in that fixes this. Thanks again for the report!