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

App overwriting output from _left and _right .nii.gz #10

Open
soichih opened this issue Oct 5, 2018 · 2 comments
Open

App overwriting output from _left and _right .nii.gz #10

soichih opened this issue Oct 5, 2018 · 2 comments

Comments

@soichih
Copy link
Contributor

soichih commented Oct 5, 2018

I am trying to feed the output from TractSeg directly into to this App.

Previously, app-tractseg was generating output files named like the following.

R_Thalamo-precentral_Vol.nii.gz
R_Thalamo-prefrontal_Vol.nii.gz

Now, I am feeding file names like these - as generated by TractSeg

T_PREC_right.nii.gz
T_PREC_left.nii.gz
T_PREF_right.nii.gz
T_PREF_left.nii.gz

This app currently truncates the last part of the file name "_Vol or _right/_left" with the following code in main.py

    split_name = os.path.basename(file).split('_')
    split_name[-1] = 'surf.' + filetype
    surfname = '_'.join(split_name)

This means _right _left names are removed and ends up overwriting the output .vtk files - and generating about half as many output files as it should. To make this App more generic, can we update to leave the last token inside the output filename? (Or update it will only trim the last token if it's "_Vol"?)

soichih added a commit to soichih/app-generatetractsurfaces that referenced this issue Oct 5, 2018
added config.json.sample
updated README slightly
kitchell added a commit that referenced this issue Oct 6, 2018
updated so that input file names can be more generic. #10
@kitchell
Copy link
Owner

kitchell commented Oct 6, 2018

I accepted the pull request, but I think changes need to be done to deal with vol from the mask app

@soichih
Copy link
Contributor Author

soichih commented Oct 6, 2018

I just tested it with output from the Binary Tract Mask App. Apart from the surface names containing "_vol", it seems to work still. (I think "_Vol" should be removed on app-generatetractmasks).

The surface displayed upside down is a preexisting condition, I think.

screenshot from 2018-10-06 13-43-02

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

No branches or pull requests

2 participants