mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
Add features to create polygons from visible contour map geometry
This commit is contained in:
1 parent
510a0f8b37
commit
a184af264b
16 files changed
+884
-27
No files matched your search
@@ -0,0 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QImage>
|
||||
#include <QString>
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigContourMapProjection;
|
||||
class RimPolygon;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
namespace RicCreateContourMapPolygonTools
|
||||
{
|
||||
QImage convertBinaryToImage( const std::vector<std::vector<int>>& data, QColor color, int transparency );
|
||||
QImage convertBinaryToGrayscaleImage( const std::vector<std::vector<int>>& data, int colorValue );
|
||||
|
||||
void exportVectorAsImage( const std::vector<std::vector<int>>& data, int transparency, const QString& filename );
|
||||
void exportVectorAsGrayscaleImage( const std::vector<std::vector<int>>& data, const QString& filename );
|
||||
|
||||
std::vector<std::vector<int>> convertImageToBinary( QImage image );
|
||||
std::vector<std::vector<int>> convertToBinaryImage( const RigContourMapProjection* contourMapProjection );
|
||||
|
||||
RimPolygon* createAndAddBoundaryPolygonFromImage( std::vector<std::vector<int>> image, const RigContourMapProjection* contourMapProjection );
|
||||
|
||||
const RigContourMapProjection* findCurrentContourMapProjection();
|
||||
|
||||
}; // namespace RicCreateContourMapPolygonTools
|
||||
Reference in new issue
Block a user