poldracklab / pydeface

defacing utility for MRI images
MIT License
110 stars 42 forks source link

Make pydeface work with multivolume anatomicals #17

Closed Shotgunosine closed 6 years ago

Shotgunosine commented 6 years ago

I'm preparing a study that's got some despot sequences in it for release. The despot sequences are multivolume anatomicals that I'd like to deface, so I added a try except on the multiplication of the mask and input image.

chrisgorgo commented 6 years ago

Thanks.

Any reason why using try/except instead of an if?

Shotgunosine commented 6 years ago

Not a strong reason one way or the other. In this case I went with try/except instead of if because this case is likely to be rare and try/except avoids slowing down the code in the majority of cases in which its unnecessary.

chrisgorgo commented 6 years ago

Cool - thanks!