Skip to content

Conversation

jcohenadad
Copy link
Member

@jcohenadad jcohenadad commented Mar 16, 2020

The current script Outside.in_Erosion.Script.sh is performing a 3D kernel operation, which produces partial volume. Moreover, the code can be greatly clarified/improved. The following changes are listed afterwards:

DONE:

  • Changed erosion to a 2D slicewise. Fixes Change erosion to a 2D slicewise #1
  • Now using the file lesion_merged.nii.gz (corresponds to the merging of sub/mid/inf in the PAM50 space) instead of the individual files t2s_lesion.nii.gz.
  • Simplified the code to create the ring-based quantification.

@RAOuelletteIV
Copy link

We can use the lesion_merged.nii.gz that has already put the corresponding (sup/mid/inf) lesion masks in the PAM50 space, instead of the corresponding individual t2s_lesion.nii.gz files.

@jcohenadad
Copy link
Member Author

thanks for the quick feedback @RAOuelletteIV! i will continue in this direction

@jcohenadad
Copy link
Member Author

Done. Results with 399899d:

MS088_R01_20 $ more Whole.Lesion.Vol.txt 
869 108.625000 
1249 156.125000 
1258 157.250000 
594 74.250000 
342 42.750000 
33 4.125000 
0 0.000000 
0 0.000000 
0 0.000000 

@jcohenadad
Copy link
Member Author

jcohenadad commented Apr 1, 2020

@RAOuelletteIV I've finished the script. Can you test it and let me know if that works for you?
To try it on your end, go to your local git folder of this repository of and run:

git fetch origin
# This will update the script to this branch's version:
git checkout -b jca/2-erosion origin/jca/2-erosion

IMPORTANT: Please make sure to install the latest SCT version before running this code. Installation instructions here: https://github.com/sct-pipeline/cord-erosion/tree/jca/2-erosion#sct-dependencies

P.S. I've also edited the README with an intuitive anim:
https://github.com/sct-pipeline/cord-erosion/tree/jca/2-erosion

cd ../..

# Iterate across subjects and quantify in rings, WM and GM
subjects=(MS088_R01_20)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RAOuelletteIV you'll obviously need to update this variable to add all the subjects in your analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change erosion to a 2D slicewise

2 participants