InsightSoftwareConsortium / ITKColorNormalization

Structure preserving color normalization on H&E images using a reference image
Apache License 2.0
18 stars 5 forks source link

BUG: Properly characterize size of VariableLengthVector #36

Closed Leengit closed 2 years ago

Leengit commented 2 years ago

The signal of -1 to indicate that the size was variable was stored as an unsigned int and thus evaded a check that it was negative. Now it is stored as a signed type, using { -1 } syntax for initialization so that the compiler will warn us if the type alias is later changed to a type that does not support -1.

Also move the constructor's initialization of member variables to the class definition and use { } syntax rather than = syntax for those initializations.

Closes Issue #34.