///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2023 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RiaSeismicDefines.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cvfVector3.h" #include #include #include #include class RimSeismicAlphaMapper; class RimRegularLegendConfig; class RigPolyLinesData; namespace cvf { class BoundingBox; } // namespace cvf namespace ZGYAccess { class SeismicSliceData; } class RimSeismicDataInterface : public caf::PdmObject { CAF_PDM_HEADER_INIT; protected: RimSeismicDataInterface(); ~RimSeismicDataInterface() override; // common functionality public: virtual bool gridIsEqual( RimSeismicDataInterface* other ); virtual RimRegularLegendConfig* legendConfig() const; virtual RimSeismicAlphaMapper* alphaValueMapper() const; virtual double inlineSpacing(); void addSeismicOutline( RigPolyLinesData* pld ); // interface to be implemented by subclasses public: virtual double zMin() const = 0; virtual double zMax() const = 0; virtual double zStep() const = 0; virtual int inlineMin() const = 0; virtual int inlineMax() const = 0; virtual int inlineStep() const = 0; virtual int xlineMin() const = 0; virtual int xlineMax() const = 0; virtual int xlineStep() const = 0; virtual std::vector worldOutline() const = 0; virtual cvf::Vec3d convertToWorldCoords( int iLine, int xLine, double depth ) = 0; virtual std::pair convertToInlineXline( cvf::Vec3d worldCoords ) = 0; virtual std::shared_ptr sliceData( RiaDefines::SeismicSliceDirection direction, int sliceNumber, double zMin, double zMax ) = 0; virtual std::shared_ptr sliceData( double worldX1, double worldY1, double worldX2, double worldY2, double zMin, double zMax ) = 0; virtual float valueAt( cvf::Vec3d worldCoord ) = 0; virtual std::pair dataRangeMinMax() const = 0; virtual std::string userDescription() const = 0; // optional subclass overrides virtual bool hasValidData() const; virtual cvf::BoundingBox* boundingBox() const; virtual std::vector histogramXvalues() const; virtual std::vector histogramYvalues() const; virtual std::vector alphaValues() const; protected: void initColorLegend(); protected: caf::PdmChildField m_legendConfig; std::shared_ptr m_alphaValueMapper; std::shared_ptr m_boundingBox; std::vector m_histogramXvalues; std::vector m_histogramYvalues; std::vector m_clippedHistogramXvalues; std::vector m_clippedHistogramYvalues; std::vector m_clippedAlphaValues; caf::PdmField> m_userClipValue; caf::PdmField> m_userMuteThreshold; };