Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate CNN brain masking #5

Open
tashrifbillah opened this issue Apr 1, 2020 · 2 comments
Open

Integrate CNN brain masking #5

tashrifbillah opened this issue Apr 1, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@tashrifbillah
Copy link
Contributor

Algorithm:

with TemporaryDirectory() as tmpdir, local.cwd(tmpdir):
    tmpdir= local.path(tmpdir)
    
    # dwi is a local.path object
    copy(dwi, tmpdir)
    with open('caselist.txt', 'w') as f:
        f.write(pjoin(tmpdir, dwi.basename))
    
    # subprocess call
    # obtain model_dir from config file
    dwi_masking.py -i caselist.txt -f model_dir
    
    prefix= dwi.basename.split('.nii')[0]
    mv dwib0_{prefix}-multi_BrainMask.nii.gz, dwi.dirname

The above can be inserted here checking mask_method.lower()=='cnn' condition.

@tashrifbillah tashrifbillah self-assigned this Apr 1, 2020
@tashrifbillah tashrifbillah added the enhancement New feature or request label Apr 1, 2020
@tashrifbillah
Copy link
Contributor Author

CnnMask task accepts dwi, on the other hand BseBetMask task accepts bse. This discrepancy is a challenge for integrating both methods.

A way around can be modifying CNN masking tool to accept bse.

@tashrifbillah
Copy link
Contributor Author

New flowcharts:

image

image

cc @sbouix

@tashrifbillah tashrifbillah added the wontfix This will not be worked on label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant