Skip to content

#14797 Add support for detection of N local maximum locations in a contour map - #14798

Merged
magnesj merged 6 commits into
OPM:devfrom
magnesj:contour-map-top-finder-1077
Sep 30, 2026
Merged

magnesj merged 6 commits into
OPM:devfrom
magnesj:contour-map-top-finder-1077

Conversation

@magnesj

@magnesj magnesj commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Closes #14797

Find the N most significant local maxima ("peaks") in a contour map and show them as markers.

  • RigContourMapPeakFinder: ranks peaks by prominence, enforces a minimum distance, skips edge/undefined cells. Unit tested.
  • Peaks honor the contour map value filter.
  • New "Computed Peaks" collection under the map projection, with maximum number of peaks, minimum distance and a Compute button. Also available from the contour map context menu.
  • Each peak is a single-point, open polygon shown as a sphere, usable as a Line polygon filter.
  • Polygon filter: hide "Cells to include" for line filters.

@magnesj
magnesj force-pushed the contour-map-top-finder-1077 branch from c61e9d7 to b629313 Compare September 28, 2026 09:11
@magnesj
magnesj marked this pull request as ready for review September 28, 2026 09:14
@magnesj
magnesj requested a review from kriben September 28, 2026 09:14
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.cpp Outdated
Comment thread ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTopFinder.h Outdated

@kriben kriben left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments on the contour map top finder: 3 High, 3 Medium and 4 Low.

Comment thread ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTopFinder.cpp Outdated
Comment thread ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTopFinder.cpp Outdated
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapTop.cpp Outdated
Comment thread ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTopFinder.cpp Outdated
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapPeak.h
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapTopsCollection.h Outdated
Comment thread ApplicationLibCode/Commands/RicComputeContourMapTopsFeature.cpp Outdated
Comment thread ApplicationLibCode/UnitTests/RigContourMapTopFinder-Test.cpp Outdated
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapTopsCollection.cpp Outdated
Comment thread ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapTopsCollection.cpp Outdated
… maps

Union-find sweep from highest to lowest value computes the prominence of each peak. Peaks are filtered on prominence and edge contact, ranked by prominence or value, and thinned by minimum distance. Flat shoulders and plateaus are rejected, and prominence is measured against the minimum of each connected data region.
Add setters for line and sphere appearance on RimPolygon. Add RimPolygonCollection::updateViewsAfterPolygonsChanged(), shared with the contour map polygon tools, and a deferred variant that is safe to call from destructors.
Each contour map projection owns a peaks collection. Computed peaks are shown in the project tree and visualized as single-point marker polygons in the global polygon collection. Markers are deleted with their peak, copied views drop peaks sharing markers with the original, and peaks are flagged as outdated when the result, time step or value filter changes.
Available from the contour map context menu for Eclipse, GeoMech and ensemble statistics contour maps.
@magnesj
magnesj force-pushed the contour-map-top-finder-1077 branch from 0b9d6a1 to 25de6c8 Compare September 29, 2026 07:14
@magnesj
magnesj requested a review from kriben September 29, 2026 08:31
- RimContourMapPeaksCollection: clamp m_peakCount to [1,20] and m_minDistance to >= 0.0

- RigContourMapPeakFinder: assert z.size() matches nx*ny before indexing in computeProminenceAndRegionSize
@magnesj
magnesj merged commit 61db518 into OPM:dev Sep 30, 2026
14 of 20 checks passed
@magnesj
magnesj deleted the contour-map-top-finder-1077 branch September 30, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for detection of N local maximum locations in a contour map

2 participants