Page MenuHomePhabricator

[MultiLabel Segmentation] Default parameter (unsigned int layer = 0) is unnecessary and causes problems
Open, NormalPublic

Description

Several functions inside mitkLabelSetImage.h use unsigned int layer = 0 as default parameter / value. I remember that this led to a lot of problems:
Developers did not get a compile-error when using no argument (e.g. calling GetActiveLabel()) but the wrong active label is returned, if the user is working on a different layer (e.g. layer 2).
I don't see any necessity to provide a default parameter so I would like to remove it and replace all calls to functions with default parameters to function calls with a specific layer argument.