(#436) Added methods that read depth and other log data

This commit is contained in:
Pål Hagen 2015-09-15 15:18:28 +02:00
parent 03e4b89508
commit 9cd4c1efb8
2 changed files with 31 additions and 2 deletions

View File

@ -147,3 +147,29 @@ QString RimWellLasFileInfo::wellName() const
{
return m_wellName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double> RimWellLasFileInfo::depthValues() const
{
return logValues("DEPT");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double> RimWellLasFileInfo::logValues(const QString& logName) const
{
std::vector<double> values;
int wellFormat = NRLib::Well::LAS;
NRLib::Well* well = NRLib::Well::ReadWell(m_fileName().toStdString(), wellFormat);
if (well)
{
values = well->GetContLog(logName.toStdString());
delete well;
}
return values;
}

View File

@ -42,13 +42,16 @@ public:
void setFileName(const QString& fileName);
bool readFile();
void close();
QString wellName() const;
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_name; }
std::vector<double> depthValues() const;
std::vector<double> logValues(const QString& logName) const;
private:
void close();
caf::PdmChildArrayField<RimWellLog*> m_lasFileLogs;
private: