CoBrALab / antsRegistration-MAGeT

A reimplementation of MAGeTbrain using only ANTs tools.
Other
16 stars 6 forks source link

mutiatlas labels #73

Closed johndlewis closed 7 years ago

johndlewis commented 7 years ago

I think there's a bug when providing multiple atlases. The info from mb.sh -- check shows the correct number of atlases, but one label file. I believe that the fix is:

labels=$(ls $(echo ${atlases} | cut -d " " -f 1 | sed -r 's/_(t1|T1w|t2|T2w)./_label\/g') | sed 's/input.*label/label/g' || true)

labels=$(ls input/atlas/$(ls $(echo ${atlases} | cut -d " " -f 1 | sed -r 's/(t1|T1w|t2|T2w)./_label*/g') | sed 's/input.*label/label/g' || true))

gdevenyi commented 7 years ago

Can you please provide a link to the exact code line.

gdevenyi commented 7 years ago

As you can see from the comment directly above, this code is correct as intended: https://github.com/CobraLab/antsRegistration-MAGeT/blob/master/bin/mb.sh#L115-L116

You are mis-interpreting the status output as being the total number of labels. I am counting and using the labels defined for the first atlas, as it is required that each atlas have the same number of label files.

I will push a clarification to the status line.

Closing, NOTABUG

gdevenyi commented 7 years ago

Fixed by 1988612dabcd72ed873cebc95039f7047e8ede29