Conversation
By default, windows.h adds macros "min" and "max", which interfere with other "max" symbols (e.g., in numeric_limits::max, max in vnl_sse.h). If "NOMINMAX" is defined before including windows.h then the min and max macros do not get defined. ITK headers include NOMINMAX before including windows.h, therefore we include an ITK header before using DCMTK to ensure that min and max macros are not added, avoiding any name clash.
|
The CI error seems a false alarm to me. mkdir should get |
|
|
|
||
| namespace dcmqi | ||
| { | ||
| class DCMTK_DCMSEG_EXPORT DcmBinToLabelConverter |
There was a problem hiding this comment.
@lassoan I am curious - why did you remove this decorator?
There was a problem hiding this comment.
The export directive is only needed if the target is built as a shared library. This is built as a static library, so export directive is not necessary. Moreover, this export directive is just copied from somewhere, probably from a DCMTK example, so having it here would have made the build fail.
There was a problem hiding this comment.
Thank you Andras! Yes, likely this was just copied from DCMTK when @michaelonken wrote this class.
There was a problem hiding this comment.
The export directive is only needed if the target is built as a shared library. This is built as a static library, so export directive is not necessary. Moreover, this export directive is just copied from somewhere, probably from a DCMTK example, so having it here would have made the build fail.
Yes exactly, it was accidentally copied from DCMTK. Its not required within dcmqi code.
Thanks for support Andras!



By default, windows.h adds macros "min" and "max", which interfere with other "max" symbols (e.g., in numeric_limits::max, max in vnl_sse.h). If "NOMINMAX" is defined before including windows.h then the min and max macros do not get defined.
ITK headers include NOMINMAX before including windows.h, therefore we include an ITK header before using DCMTK to ensure that min and max macros are not added, avoiding any name clash.