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
178 stars 64 forks source link

Feature Extraction produced same LBP feature values for different ROI #982

Closed vctorwei closed 4 years ago

vctorwei commented 4 years ago

Describe the bug Feature Extraction produced same LBP feature values for different ROI

For example: T1C_CE_LBP_LBP and T1C_NE_LBP_LBP are exactly the same. CE(white): contrasting enhancing ROI, NE(grey): non-enhancing ROI including edema. Screenshot from 2020-03-31 19-14-22

To Reproduce Here is my parameters setting for LBP LBP,Radius,Int,(1:9),1,Radius around the center voxel/pixel (if defined as float it is assumed to be in world coordinates and if as Integer it is assumed to be in image coordinates) LBP,Neighborhood,Int,0:27,27,The total number of neighbors to consider for computation LBP,Type,Int,0:03,2,0: original LBP | 1: uniform LBP | 2: rotation invariant LBP | 3: uniform + rotation invariant LBPhaving same value as center pixel and None disregards the patch

The parameter file is attached: params_ibsi_mr.txt

The ROI mask is attached, TC.nii.gz

The command line is: $captkdir/captk FeatureExtraction.cwl -o T1C_T1_T2_Flair.csv \ -p $codedir/params_ibsi_mr.csv \ -n $PatientID \ -i T1C_brain_Histmatched.nii.gz,\ T1Pre_brain_Histmatched.nii.gz,\ T2_brain_Histmatched.nii.gz,\ Flair_brain_Histmatched.nii.gz \ -t T1C,T1,T2,Flair -m TC.nii.gz -roi 1,2 -l NE,CE

Expected behavior Different ROI should produce different LBP features

Screenshots If applicable, add screenshots to help explain your problem.

CaPTk Version 1.7.6

Desktop (please complete the following information):

sarthakpati commented 4 years ago

This is happening because the image is not getting masked.

sarthakpati commented 4 years ago

@saimarathore Could you take a look at the fix I have written? I want to ensure that it makes algorithmic sense before initiating a PR.