// Find a different area (a set of close to each other pixels which colors differ in both images).
// It filters alone pixels with different color.
- Standard_Size aRow1, aCol1, aRow2, aCol2;
+ Standard_Size aRow1 = 0, aCol1 = 0, aRow2, aCol2;
Standard_Integer aLen1 = (myDiffPixels.Length() > 0) ? (myDiffPixels.Length() - 1) : 0;
for (Standard_Integer aPixelId1 = 0; aPixelId1 < aLen1; ++aPixelId1)
{
if (myGroupsOfDiffPixels.IsEmpty())
{
TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
- aGroup->Add (aValue1);
- aGroup->Add (aValue2);
+ aGroup->Add ((Standard_Integer)aValue1);
+ aGroup->Add ((Standard_Integer)aValue2);
myGroupsOfDiffPixels.Append (aGroup);
}
else
for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next())
{
TColStd_MapOfInteger*& aGroup = aGrIter.ChangeValue();
- if (aGroup->Contains (aValue1))
+ if (aGroup->Contains ((Standard_Integer)aValue1))
{
- aGroup->Add (aValue2);
+ aGroup->Add ((Standard_Integer)aValue2);
isFound = Standard_True;
break;
}
{
// Create a new group
TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
- aGroup->Add (aValue1);
- aGroup->Add (aValue2);
+ aGroup->Add ((Standard_Integer)aValue1);
+ aGroup->Add ((Standard_Integer)aValue2);
myGroupsOfDiffPixels.Append (aGroup);
}
}
for (Standard_Size aNgbrIter = 0; aNgbrIter < NEIGHBOR_PIXELS_NB; ++aNgbrIter)
{
if (NEIGHBOR_PIXELS[aNgbrIter].isValid (aDataRef, aRow1, aCol1)
- && aGroup->Contains (NEIGHBOR_PIXELS[aNgbrIter].pixel2Int (aRow1, aCol1)))
+ && aGroup->Contains ((Standard_Integer)NEIGHBOR_PIXELS[aNgbrIter].pixel2Int (aRow1, aCol1)))
{
++aNeighboursNb;
}