Skip to content

Commit 6748381

Browse files
committed
fix: NMSumZonesFilterWrapper - handling of wrongly named inputs
- if input layer's UserID doen't contain 'zone' or 'value', fall back on using its input position idx; this is required to be backwards compatible modellingframework/wrapper/NMSumZonesFilterWrapper.cpp
1 parent bd1d261 commit 6748381

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

modellingframework/wrapper/NMSumZonesFilterWrapper.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,24 @@ class NMSumZonesFilterWrapper_Internal
8686
filter->SetInput(name.toLower().toStdString(), dataObj);
8787
}
8888
}
89+
else if (idx == 0)
90+
{
91+
OutImgType* img = dynamic_cast<OutImgType*>(dataObj);
92+
if (img != nullptr)
93+
{
94+
filter->SetZoneImage(img);
95+
filter->SetInput(name.toLower().toStdString(), dataObj);
96+
}
97+
}
98+
else if (idx == 1)
99+
{
100+
InImgType* img = dynamic_cast<InImgType*>(dataObj);
101+
if (img != nullptr)
102+
{
103+
filter->SetValueImage(img);
104+
filter->SetInput(name.toLower().toStdString(), dataObj);
105+
}
106+
}
89107
}
90108
else
91109
{

0 commit comments

Comments
 (0)