Closed fedorov closed 1 month ago
It is not possible to set default value for a Boolean flag. If you don't specify it then it will be always false (how else would you be able to set it to false?).
Default value is just a hint for GUI generation. I agree that the help text is confusing, it should be removed or expressed differently. For example, it could be (setting the flag is recommended)
.
I guess it may make sense, but it for sure confused me. I think ideally there should be some built-time check or validation that would alert the developer that <default>
parameter for boolean
is not allowed.
I think ideally there should be some built-time check or validation that would alert the developer that
parameter for boolean is not allowed.
I see what you mean. This is super confusing. This essentially means that this specific parameter is only meaningful for GUI use of SEM, while the developer may not even be aware about GUI and only care about CLI use of the module. I understand it is not possible/difficult to fix.
The misleading help text is a bug, but that should be fixed (a simple change).
The other thing that causes confusion is that Boolean values are specified by just adding the parameter name (--myflag
) instead of specifying parameter name+value (--myflag true
or --myflag false
). We could change the behavior but it would make the command-line interface a bit less convenient. Would it be sufficient to improve the documentation somewhere?
Despite "skip" flag assigned default value "true" in XML
https://github.com/QIICR/dcmqi/blame/master/apps/seg/itkimage2segimage.xml#L58-L65
the actual default value is set to 0