Skip to content

Commit

Permalink
BUG: Update LabelOverlapMeasures internal class
Browse files Browse the repository at this point in the history
Use rule of zero, and change to SizeValue type for accumulant type.
  • Loading branch information
blowekamp authored and dzenanz committed Aug 2, 2022
1 parent 8d8a705 commit 9e90993
Showing 1 changed file with 8 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,14 @@ class ITK_TEMPLATE_EXPORT LabelOverlapMeasuresImageFilter : public ImageSink<TLa
class LabelSetMeasures
{
public:
// default constructor
LabelSetMeasures()
{
m_Source = 0;
m_Target = 0;
m_Union = 0;
m_Intersection = 0;
m_SourceComplement = 0;
m_TargetComplement = 0;
}

// added for completeness
LabelSetMeasures &
operator=(const LabelSetMeasures & l)
{
if (this != &l)
{
m_Source = l.m_Source;
m_Target = l.m_Target;
m_Union = l.m_Union;
m_Intersection = l.m_Intersection;
m_SourceComplement = l.m_SourceComplement;
m_TargetComplement = l.m_TargetComplement;
}
return *this;
}

unsigned long m_Source;
unsigned long m_Target;
unsigned long m_Union;
unsigned long m_Intersection;
unsigned long m_SourceComplement;
unsigned long m_TargetComplement;
// default constructor/copy/move etc...

SizeValueType m_Source{ 0 };
SizeValueType m_Target{ 0 };
SizeValueType m_Union{ 0 };
SizeValueType m_Intersection{ 0 };
SizeValueType m_SourceComplement{ 0 };
SizeValueType m_TargetComplement{ 0 };
};

/** Type of the map used to store data per label */
Expand Down

0 comments on commit 9e90993

Please sign in to comment.