Skip to content

Commit

Permalink
Fixes to FindSurfaceFeatures
Browse files Browse the repository at this point in the history
Fixes #988. Fixes #989. Closes #988. Closes #989

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson committed Mar 3, 2022
1 parent 2f6b5ae commit 2db175d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Plugins/Generic/GenericFilters/FindSurfaceFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void FindSurfaceFeatures::find_surfacefeatures2D()
for(int64_t k = 0; k < xPoints; k++)
{
int32_t gnum = m_FeatureIds[yStride + k];
if(!m_SurfaceFeatures[gnum])
if(!m_SurfaceFeatures[gnum] && gnum != 0)
{
if(k <= 0)
{
Expand Down Expand Up @@ -267,11 +267,11 @@ void FindSurfaceFeatures::find_surfacefeatures2D()
{
m_SurfaceFeatures[gnum] = true;
}
if(m_FeatureIds[yStride + k - static_cast<int64_t>(m->getGeometryAs<ImageGeom>()->getXPoints())] == 0)
if(m_FeatureIds[yStride + k - xPoints] == 0)
{
m_SurfaceFeatures[gnum] = true;
}
if(m_FeatureIds[yStride + k + static_cast<int64_t>(m->getGeometryAs<ImageGeom>()->getXPoints())] == 0)
if(m_FeatureIds[yStride + k + xPoints] == 0)
{
m_SurfaceFeatures[gnum] = true;
}
Expand Down

0 comments on commit 2db175d

Please sign in to comment.