Sync seismic section with well path changes. (#10090)

* Sync seismic section with well path changes.
* Make sure we pick seismic textures/coordinates that fits the z steps of the seismic data.
This commit is contained in:
jonjenssen
2023-04-14 10:49:05 +02:00
committed by GitHub
parent 7427e7b6e9
commit dc4d4022d2
4 changed files with 50 additions and 25 deletions

View File

@@ -426,6 +426,7 @@ void RimSeismicSection::deleteTarget( RimPolylineTarget* targetToDelete )
void RimSeismicSection::updateVisualization()
{
if ( texturedSection().notNull() ) texturedSection()->setWhatToUpdate( RigTexturedSection::WhatToUpdateEnum::UPDATE_GEOMETRY );
m_wellPathPoints.clear();
scheduleViewUpdate();
}
@@ -953,22 +954,44 @@ void RimSeismicSection::setDepthFilter( RimIntersectionFilterEnum filterType, in
m_zLowerThreshold = lowerValue;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimSeismicSection::alignZValue( int z ) const
{
if ( m_seismicData == nullptr ) return z;
const int zMin = (int)m_seismicData->zMin();
const int zStep = (int)m_seismicData->zStep();
int alignedZ = ( ( z - zMin ) / zStep );
alignedZ *= zStep;
alignedZ += zMin;
return alignedZ;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimSeismicSection::upperFilterZ( int upperGridLimit ) const
{
int retVal;
switch ( zFilterType() )
{
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
return m_zUpperThreshold;
retVal = m_zUpperThreshold;
break;
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
default:
return upperGridLimit;
retVal = upperGridLimit;
break;
}
return alignZValue( retVal );
}
//--------------------------------------------------------------------------------------------------
@@ -976,17 +999,22 @@ int RimSeismicSection::upperFilterZ( int upperGridLimit ) const
//--------------------------------------------------------------------------------------------------
int RimSeismicSection::lowerFilterZ( int lowerGridLimit ) const
{
int retVal;
switch ( zFilterType() )
{
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
return m_zLowerThreshold;
retVal = m_zLowerThreshold;
break;
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
default:
return lowerGridLimit;
retVal = lowerGridLimit;
break;
}
return alignZValue( retVal );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -117,9 +117,10 @@ protected:
private:
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
int alignZValue( int z ) const;
void initSliceRanges();
void scheduleViewUpdate();