Skip to content

Commit

Permalink
Merge pull request #252 from PauloCarvalhoRJ/NextRelease
Browse files Browse the repository at this point in the history
Next release
  • Loading branch information
PauloCarvalhoRJ authored Sep 4, 2020
2 parents 63d4ccb + 965d906 commit b874e4f
Show file tree
Hide file tree
Showing 59 changed files with 1,201 additions and 118 deletions.
5 changes: 4 additions & 1 deletion GammaRay.pro
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ SOURCES += main.cpp\
vertpropcurves/verticalproportioncurvescanvaspicker.cpp \
vertpropcurves/verticalproportioncurvesplot.cpp \
viewer3d/v3dmouseinteractor.cpp \
viewer3d/view3dtextconfigwidget.cpp \
widgets/linechartwidget.cpp \
widgets/qlistwidgetdnd.cpp \
widgets/variogrammodellist.cpp \
Expand Down Expand Up @@ -353,6 +354,7 @@ HEADERS += mainwindow.h \
vertpropcurves/verticalproportioncurvescanvaspicker.h \
vertpropcurves/verticalproportioncurvesplot.h \
viewer3d/v3dmouseinteractor.h \
viewer3d/view3dtextconfigwidget.h \
widgets/linechartwidget.h \
widgets/qlistwidgetdnd.h \
widgets/variogrammodellist.h \
Expand Down Expand Up @@ -569,6 +571,7 @@ FORMS += mainwindow.ui \
gslib/gslibparams/widgets/widgetgslibpargrid.ui \
gslib/gslibparams/widgets/widgetgslibparrepeat.ui \
gslib/gslibparams/widgets/widgetgslibparcolor.ui \
viewer3d/view3dtextconfigwidget.ui \
widgets/linechartwidget.ui \
vertpropcurves/verticalproportioncurvedialog.ui \
widgets/variogrammodellist.ui \
Expand Down Expand Up @@ -804,7 +807,7 @@ win32 {
# The application version
# Don't forget to update the Util::importSettingsFromPreviousVersion() method to
# enable the import of registry/user settings of previous versions.
VERSION = 6.5
VERSION = 6.6

# Define a preprocessor macro so we can get the application version in application code.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ If you enjoyed this project, you might also enjoy GeostatsPy: https://github.com
Python script to convert Eclipse grids to Paraview-compatible VTU format: https://github.com/BinWang0213/PyGRDECL

VERSION HISTORY:<br>
&nbsp;&nbsp;&nbsp;Version 6.6 - Mean, median and Gaussian filters, improvements and bug fixes.<br>
&nbsp;&nbsp;&nbsp;Version 6.5 - vertical proportion curves, improvements Automatic Variogram Fitting, enhancements and several fixes.<br>
&nbsp;&nbsp;&nbsp;Version 6.3 - improvements to data imputation with MCMC and parameter experiments for Automatic Variogram Fitting.<br>
&nbsp;&nbsp;&nbsp;Version 6.2 - data imputation with Markov Chains-Monte Carlo simulation and filtering of data sets.<br>
Expand Down
Binary file added art/iconsHD/v3Dfont32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dialogs/faciestransitionmatrixoptionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ FaciesTransitionMatrixOptionsDialog::~FaciesTransitionMatrixOptionsDialog()
{
delete ui;
}

bool FaciesTransitionMatrixOptionsDialog::isIgnoreGapsChecked()
{
return ui->chkIgnoreGaps->isChecked();
}
2 changes: 2 additions & 0 deletions dialogs/faciestransitionmatrixoptionsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class FaciesTransitionMatrixOptionsDialog : public QDialog
explicit FaciesTransitionMatrixOptionsDialog(QWidget *parent = nullptr);
~FaciesTransitionMatrixOptionsDialog();

bool isIgnoreGapsChecked();

private:
Ui::FaciesTransitionMatrixOptionsDialog *ui;
};
Expand Down
9 changes: 8 additions & 1 deletion dialogs/faciestransitionmatrixoptionsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Options to make a Facies Transition Matrix file (currently fixed):</string>
<string>Options to make a Facies Transition Matrix file (some are currently fixed):</string>
</property>
</widget>
</item>
Expand All @@ -35,6 +35,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkIgnoreGaps">
<property name="text">
<string>Ignore gaps (disconnected samples will be treated as connected in sequence)</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Expand Down
Binary file modified docs/GammaRayManual.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion domain/attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Attribute : public ProjectComponent, public IJAbstractVariable, public ICa
virtual QString getPresentationName();
virtual QString getObjectLocator();
virtual View3DViewData build3DViewObjects( View3DWidget * widget3D );
virtual QString getTypeName(){ return "Attribute"; }
virtual QString getTypeName() const { return "Attribute"; }
virtual View3DConfigWidget* build3DViewerConfigWidget(View3DViewData viewObjects);

//IJAbstractVariable interface
Expand Down
20 changes: 13 additions & 7 deletions domain/auxiliary/faciestransitionmatrixmaker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ namespace FTMMakerAdapters {
SegmentSet* segmentSet,
int dataColumnWithFaciesCodes,
DataSetOrderForFaciesString dataIndexOrder,
int groupByVariableIndex ){
int groupByVariableIndex,
bool ignoreGaps ){

std::vector< std::vector< int > > result;

Expand Down Expand Up @@ -167,10 +168,10 @@ namespace FTMMakerAdapters {
faciesSequence.push_back( faciesCode );
}else{ // for the other segments...
//if the current segment doesn't connect to the previous...
if( ! Util::areConnected( currentHeadX, currentHeadY, currentHeadZ,
currentTailX, currentTailY, currentTailZ,
previousHeadX, previousHeadY, previousHeadZ,
previousTailX, previousTailY, previousTailZ ) ){
if( ! ignoreGaps && ! Util::areConnected( currentHeadX, currentHeadY, currentHeadZ,
currentTailX, currentTailY, currentTailZ,
previousHeadX, previousHeadY, previousHeadZ,
previousTailX, previousTailY, previousTailZ ) ){
// ...append the previous string to the result to be returned.
if( ! faciesSequence.empty() )
result.push_back( faciesSequence );
Expand Down Expand Up @@ -261,10 +262,15 @@ namespace FTMMakerAdapters {
DataFile* dataFile,
int dataColumnWithFaciesCodes,
DataSetOrderForFaciesString dataIndexOrder,
int groupByVariableIndex ){
int groupByVariableIndex,
bool ignoreGaps ){
if( dataFile->getFileType() == "SEGMENTSET" ){
SegmentSet* segmentSet = dynamic_cast<SegmentSet*>( dataFile );
return getFaciesSequence<SegmentSet>( segmentSet, dataColumnWithFaciesCodes, dataIndexOrder, groupByVariableIndex );
return getFaciesSequence<SegmentSet>( segmentSet,
dataColumnWithFaciesCodes,
dataIndexOrder,
groupByVariableIndex,
ignoreGaps );
} else {
Application::instance()->logError("FTMMakerAdapters::getFaciesSequence<DataFile>(): Unsupported data file type: "
+ dataFile->getFileType() + ". Returned empty sequence." );
Expand Down
16 changes: 12 additions & 4 deletions domain/auxiliary/faciestransitionmatrixmaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ namespace FTMMakerAdapters {
* to be used to group the data. That is, to treat each group as a separate data set. This is
* mainly useful with single files that contains data from multiple sources (e.g. drill holes).
* The variable is normally some interger valued id (e.g. well number).
* @param ignoreGaps If true, samples not connected in space are treated as if they were connected
* in the sequence.
*/
template <typename Klass> std::vector< std::vector< int > > getFaciesSequence(
Klass* dataFile,
int dataColumnWithFaciesCodes,
DataSetOrderForFaciesString dataIndexOrder,
int groupByVariableIndex = -1 );
int groupByVariableIndex = -1,
bool ignoreGaps = false );
}

/** This is a template class used to make facies transition matrices for different
Expand Down Expand Up @@ -107,9 +110,10 @@ class FaciesTransitionMatrixMaker
/**
* Computes a facies transition matrix by simply counting facies changes between data elements
* along some sequence (e.g. from last to first) of the object passed in the constructor.
*
* @param ignoreGaps If true, samples not connected in space are treated as if they were connected
* in the sequence.
*/
FaciesTransitionMatrix makeSimple( DataSetOrderForFaciesString dataIndexOrder ){
FaciesTransitionMatrix makeSimple( DataSetOrderForFaciesString dataIndexOrder, bool ignoreGaps ){
//retrieve category definition
CategoryDefinition* cd = FTMMakerAdapters::getAssociatedCategoryDefinition( m_dataFileWithFacies, m_variableIndex );
assert( cd && "FaciesTransitionMatrixMaker::makeSimple(): null CategoryDefinition." );
Expand All @@ -119,7 +123,11 @@ class FaciesTransitionMatrixMaker
ftm.initialize();

std::vector< std::vector< int > > faciesStrings =
FTMMakerAdapters::getFaciesSequence( m_dataFileWithFacies, m_variableIndex, dataIndexOrder, m_groupByColumn );
FTMMakerAdapters::getFaciesSequence( m_dataFileWithFacies,
m_variableIndex,
dataIndexOrder,
m_groupByColumn,
ignoreGaps );

//each facies string is treated separately (e.g. traces of a seismic volume)
for( const std::vector< int >& faciesString : faciesStrings ){
Expand Down
2 changes: 1 addition & 1 deletion domain/bivariatedistribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BivariateDistribution : public Distribution

// File interface
public:
QString getFileType(){ return "BIDIST"; }
QString getFileType() const { return "BIDIST"; }
bool isDataFile(){ return false; }
bool isDistribution(){ return true; }

Expand Down
2 changes: 1 addition & 1 deletion domain/cartesiangrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ bool CartesianGrid::canHaveMetaData()
return true;
}

QString CartesianGrid::getFileType()
QString CartesianGrid::getFileType() const
{
return "CARTESIANGRID";
}
Expand Down
2 changes: 1 addition & 1 deletion domain/cartesiangrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CartesianGrid : public GridFile, public IJAbstractCartesianGrid
// File interface
public:
virtual bool canHaveMetaData();
virtual QString getFileType();
virtual QString getFileType() const;
virtual void updateMetaDataFile();
virtual bool isDataFile(){ return true; }
bool isDistribution(){ return false; }
Expand Down
2 changes: 1 addition & 1 deletion domain/categorydefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CategoryDefinition : public IntIntQStringQColorQStringQuintuplets
// File interface
public:
bool canHaveMetaData(){ return false; }
QString getFileType(){ return "CATEGORYDEFINITION"; }
QString getFileType() const { return "CATEGORYDEFINITION"; }
void updateMetaDataFile(){}
virtual bool isEditable(){ return true; }
virtual QWidget *createContentElementWidget();
Expand Down
2 changes: 1 addition & 1 deletion domain/categorypdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CategoryPDF : public IntDoublePairs
// File interface
public:
bool canHaveMetaData(){ return false; }
QString getFileType(){ return "CATEGORYPDF"; }
QString getFileType() const { return "CATEGORYPDF"; }
void updateMetaDataFile(){}
virtual bool isEditable(){ return true; }
bool isDataFile(){ return false; }
Expand Down
10 changes: 10 additions & 0 deletions domain/datafile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,16 @@ void DataFile::replaceDataFrame( const std::vector<std::vector<double> > &dataTa
_data = dataTable;
}

bool DataFile::getCenter(double &x, double &y, double &z) const
{
Q_UNUSED( x )
Q_UNUSED( y )
Q_UNUSED( z )
Application::instance()->logError( "DataFile::getCenter(): Default implementation called. Objects of type "
+ getTypeName() + " must implement one according to their particular geometry." );
return false;
}

void DataFile::replacePhysicalFile(const QString from_file_path)
{
// copies the source file over the current physical file in project.
Expand Down
5 changes: 5 additions & 0 deletions domain/datafile.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ class DataFile : public File, public ICalcPropertyCollection
*/
void replaceDataFrame( const std::vector< std::vector<double> >& dataTable );

/** Returns (via output parameters) the center/centroid of the object represented by this dataset.
* The returned boolean informs whether the computation of the center failed (false) for some reason.
*/
virtual bool getCenter( double& x, double& y, double& z ) const;

//File interface
virtual void deleteFromFS();
virtual void writeToFS();
Expand Down
2 changes: 1 addition & 1 deletion domain/experimentalvariogram.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ExperimentalVariogram : public File

// File interface
public:
QString getFileType(){ return "EXPVARIOGRAM"; }
QString getFileType() const { return "EXPVARIOGRAM"; }
virtual bool canHaveMetaData(){ return true; }
virtual void updateMetaDataFile();
bool isDataFile(){ return false; }
Expand Down
4 changes: 2 additions & 2 deletions domain/faciestransitionmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ QIcon FaciesTransitionMatrix::getIcon()
return QIcon(":icons32/transmat32");
}

QString FaciesTransitionMatrix::getTypeName()
QString FaciesTransitionMatrix::getTypeName() const
{
return "FACIESTRANSITIONMATRIX";
}
Expand All @@ -525,7 +525,7 @@ bool FaciesTransitionMatrix::canHaveMetaData()
return true;
}

QString FaciesTransitionMatrix::getFileType()
QString FaciesTransitionMatrix::getFileType() const
{
return getTypeName();
}
Expand Down
4 changes: 2 additions & 2 deletions domain/faciestransitionmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ class FaciesTransitionMatrix : public File
// ProjectComponent interface
public:
virtual QIcon getIcon();
virtual QString getTypeName();
virtual QString getTypeName() const;
virtual void save(QTextStream *txt_stream);

// File interface
public:
virtual bool canHaveMetaData();
virtual QString getFileType();
virtual QString getFileType() const;
virtual void updateMetaDataFile();
virtual void writeToFS();
virtual void readFromFS();
Expand Down
4 changes: 2 additions & 2 deletions domain/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class File : public ProjectComponent
QString getMetaDataFilePath();

/** Returns a string with the file type (e.g.: "POINTSET") */
virtual QString getFileType() = 0;
virtual QString getFileType() const = 0;

/** Updates the physical metadata file, if applicable.
* Subclasses without metadata can implement an empty method.*/
Expand Down Expand Up @@ -112,7 +112,7 @@ class File : public ProjectComponent
virtual bool isFile() const;
virtual bool isAttribute();
virtual QString getObjectLocator();
virtual QString getTypeName(){ return getFileType(); }
virtual QString getTypeName() const { return getFileType(); }
};

#endif // __VVVV___FILE_H
2 changes: 1 addition & 1 deletion domain/geogrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ bool GeoGrid::canHaveMetaData()
return true;
}

QString GeoGrid::getFileType()
QString GeoGrid::getFileType() const
{
return "GEOGRID";
}
Expand Down
2 changes: 1 addition & 1 deletion domain/geogrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class GeoGrid : public GridFile
// File interface
public:
virtual bool canHaveMetaData();
virtual QString getFileType();
virtual QString getFileType() const;
virtual void updateMetaDataFile();
virtual bool isDataFile(){ return true; }
virtual void writeToFS();
Expand Down
2 changes: 1 addition & 1 deletion domain/objectgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ObjectGroup : public ProjectComponent
bool isFile() const;
bool isAttribute();
virtual QString getObjectLocator();
virtual QString getTypeName(){ return "ObjectGroup"; }
virtual QString getTypeName() const { return "ObjectGroup"; }
};

#endif // OBJECTGROUP_H
2 changes: 1 addition & 1 deletion domain/plot.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Plot : public File

// File interface
public:
QString getFileType(){ return "PLOT"; }
QString getFileType() const { return "PLOT"; }
virtual bool canHaveMetaData(){ return false; }
virtual void updateMetaDataFile(){;}
bool isDataFile(){ return false; }
Expand Down
Loading

0 comments on commit b874e4f

Please sign in to comment.