Skip to content

Commit

Permalink
Merge pull request #166 from PauloCarvalhoRJ/SVD
Browse files Browse the repository at this point in the history
Svd
  • Loading branch information
PauloCarvalhoRJ authored Feb 14, 2018
2 parents 295fd0c + 643dd35 commit 8dc90e7
Show file tree
Hide file tree
Showing 83 changed files with 4,661 additions and 445 deletions.
117 changes: 84 additions & 33 deletions GammaRay.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@
#
#-------------------------------------------------

QT += core gui
QT += core gui charts

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = GammaRay
TEMPLATE = app

release:DESTDIR = ../GammaRay_release/dist
release:OBJECTS_DIR = ../GammaRay_release/obj
release:MOC_DIR = ../GammaRay_release/moc
release:RCC_DIR = ../GammaRay_release/rcc
release:UI_DIR = ../GammaRay_release/ui

debug:DESTDIR = ../GammaRay_debug/dist
debug:OBJECTS_DIR = ../GammaRay_debug/obj
debug:MOC_DIR = ../GammaRay_debug/moc
debug:RCC_DIR = ../GammaRay_debug/rcc
debug:UI_DIR = ../GammaRay_debug/ui

CONFIG( release, debug|release ) {
DESTDIR = ../GammaRay_release/dist
OBJECTS_DIR = ../GammaRay_release/obj
MOC_DIR = ../GammaRay_release/moc
RCC_DIR = ../GammaRay_release/rcc
UI_DIR = ../GammaRay_release/ui
} else {
DESTDIR = ../GammaRay_debug/dist
OBJECTS_DIR = ../GammaRay_debug/obj
MOC_DIR = ../GammaRay_debug/moc
RCC_DIR = ../GammaRay_debug/rcc
UI_DIR = ../GammaRay_debug/ui
}
CONFIG += c++11

#QMAKE_CXXFLAGS += -m64
Expand Down Expand Up @@ -162,8 +163,6 @@ SOURCES += main.cpp\
dialogs/multivariogramdialog.cpp \
imagejockey/imagejockeydialog.cpp \
imagejockey/imagejockeygridplot.cpp \
widgets/grcompass.cpp \
geostats/experimentalvariogramparameters.cpp \
imagejockey/spectrogram1dparameters.cpp \
imagejockey/spectrogram1dplot.cpp \
imagejockey/spectrogram1dplotpicker.cpp \
Expand All @@ -177,7 +176,6 @@ SOURCES += main.cpp\
spectral/pca.cpp \
spectral/spectral.cpp \
imagejockey/imagejockeysvdutils.cpp \
imagejockey/svdparametersdialog.cpp \
algorithms/ialgorithmdatasource.cpp \
algorithms/bootstrap.cpp \
dialogs/machinelearningdialog.cpp \
Expand All @@ -189,7 +187,25 @@ SOURCES += main.cpp\
algorithms/randomforest.cpp \
algorithms/decisiontree.cpp \
domain/auxiliary/variableremover.cpp \
domain/auxiliary/datasaver.cpp
domain/auxiliary/datasaver.cpp \
imagejockey/svd/svdparametersdialog.cpp \
imagejockey/svd/svdfactor.cpp \
imagejockey/svd/svdfactortree.cpp \
imagejockey/svd/svdanalysisdialog.cpp \
imagejockey/svd/svdfactortreeview.cpp \
imagejockey/svd/svdfactorsel/svdfactorsselectiondialog.cpp \
imagejockey/svd/svdfactorsel/svdfactorsselectionchartview.cpp \
imagejockey/svd/svdfactorsel/svdfactorsselectionchartcallout.cpp \
imagejockey/ijabstractcartesiangrid.cpp \
imagejockey/ijabstractvariable.cpp \
imagejockey/imagejockeyutils.cpp \
imagejockey/ijexperimentalvariogramparameters.cpp \
imagejockey/ijmatrix3x3.cpp \
imagejockey/ijspatiallocation.cpp \
imagejockey/widgets/ijcartesiangridselector.cpp \
imagejockey/widgets/ijvariableselector.cpp \
imagejockey/widgets/grcompass.cpp \
imagejockey/widgets/ijgridviewerwidget.cpp

HEADERS += mainwindow.h \
domain/project.h \
Expand Down Expand Up @@ -268,7 +284,6 @@ HEADERS += mainwindow.h \
widgets/valuepairvertical.h \
widgets/fileselectorwidget.h \
scripting.h \
exprtk.hpp \
gslib/gslibparams/gslibparvmodel.h \
gslib/gslibparams/widgets/widgetgslibparvmodel.h \
domain/triads.h \
Expand Down Expand Up @@ -331,8 +346,6 @@ HEADERS += mainwindow.h \
dialogs/multivariogramdialog.h \
imagejockey/imagejockeydialog.h \
imagejockey/imagejockeygridplot.h \
widgets/grcompass.h \
geostats/experimentalvariogramparameters.h \
imagejockey/spectrogram1dparameters.h \
imagejockey/spectrogram1dplot.h \
imagejockey/spectrogram1dplotpicker.h \
Expand All @@ -346,7 +359,6 @@ HEADERS += mainwindow.h \
spectral/pca.h \
spectral/spectral.h \
imagejockey/imagejockeysvdutils.h \
imagejockey/svdparametersdialog.h \
algorithms/ialgorithmdatasource.h \
algorithms/bootstrap.h \
dialogs/machinelearningdialog.h \
Expand All @@ -358,7 +370,26 @@ HEADERS += mainwindow.h \
algorithms/randomforest.h \
algorithms/decisiontree.h \
domain/auxiliary/variableremover.h \
domain/auxiliary/datasaver.h
domain/auxiliary/datasaver.h \
imagejockey/svd/svdparametersdialog.h \
imagejockey/svd/svdfactor.h \
imagejockey/svd/svdfactortree.h \
imagejockey/svd/svdanalysisdialog.h \
imagejockey/svd/svdfactortreeview.h \
imagejockey/svd/svdfactorsel/svdfactorsselectiondialog.h \
imagejockey/svd/svdfactorsel/svdfactorsselectionchartview.h \
imagejockey/svd/svdfactorsel/svdfactorsselectionchartcallout.h \
imagejockey/ijabstractcartesiangrid.h \
imagejockey/ijabstractvariable.h \
imagejockey/imagejockeyutils.h \
imagejockey/ijexperimentalvariogramparameters.h \
imagejockey/ijmatrix3x3.h \
imagejockey/ijspatiallocation.h \
imagejockey/widgets/ijcartesiangridselector.h \
imagejockey/widgets/ijvariableselector.h \
imagejockey/widgets/grcompass.h \
imagejockey/widgets/ijgridviewerwidget.h


FORMS += mainwindow.ui \
gslib/gslibparams/widgets/widgetgslibpardouble.ui \
Expand Down Expand Up @@ -423,8 +454,13 @@ FORMS += mainwindow.ui \
dialogs/sgsimdialog.ui \
widgets/distributionfieldselector.ui \
viewer3d/view3dverticalexaggerationwidget.ui \
imagejockey/svdparametersdialog.ui \
dialogs/machinelearningdialog.ui
dialogs/machinelearningdialog.ui \
imagejockey/svd/svdparametersdialog.ui \
imagejockey/svd/svdanalysisdialog.ui \
imagejockey/svd/svdfactorsel/svdfactorsselectiondialog.ui \
imagejockey/widgets/ijcartesiangridselector.ui \
imagejockey/widgets/ijvariableselector.ui \
imagejockey/widgets/ijgridviewerwidget.ui

#==================== The Boost include path.==================
_BOOST_INCLUDE = $$(BOOST_INCLUDE)
Expand Down Expand Up @@ -478,22 +514,36 @@ LIBS += -lvtkGUISupportQt$$_VTK_VERSION_SUFFIX \
-lvtkCommonTransforms$$_VTK_VERSION_SUFFIX \
-lvtkImagingSources$$_VTK_VERSION_SUFFIX \
-lvtkImagingCore$$_VTK_VERSION_SUFFIX \
-lvtkFiltersCore$$_VTK_VERSION_SUFFIX \
-lvtkFiltersExtraction$$_VTK_VERSION_SUFFIX \
-lvtkImagingFourier$$_VTK_VERSION_SUFFIX \
-lvtkImagingMath$$_VTK_VERSION_SUFFIX
#-lvtkGUISupportQtOpenGL2$$_VTK_VERSION_SUFFIX
-lvtkFiltersCore$$_VTK_VERSION_SUFFIX \
-lvtkFiltersExtraction$$_VTK_VERSION_SUFFIX \
-lvtkImagingFourier$$_VTK_VERSION_SUFFIX \
-lvtkCommonMisc$$_VTK_VERSION_SUFFIX \
-lvtkCommonComputationalGeometry$$_VTK_VERSION_SUFFIX \
-lvtkCommonMath$$_VTK_VERSION_SUFFIX \
-lvtksys$$_VTK_VERSION_SUFFIX \
-lvtkFiltersGeometry$$_VTK_VERSION_SUFFIX \
-lvtkCommonColor$$_VTK_VERSION_SUFFIX \
-lvtkCommonSystem$$_VTK_VERSION_SUFFIX \
-lvtkglew$$_VTK_VERSION_SUFFIX \
-lvtkfreetype$$_VTK_VERSION_SUFFIX \
-lvtkzlib$$_VTK_VERSION_SUFFIX \
-lvtkFiltersHybrid$$_VTK_VERSION_SUFFIX \
-lvtkFiltersModeling$$_VTK_VERSION_SUFFIX \
-lvtkImagingGeneral$$_VTK_VERSION_SUFFIX \
-lvtkRenderingVolume$$_VTK_VERSION_SUFFIX \
-lvtkFiltersStatistics$$_VTK_VERSION_SUFFIX \
-lvtkalglib$$_VTK_VERSION_SUFFIX

#=============================================================================

#========= The FFTW3 include and lib path and libraries.=========
_FFTW3_INCLUDE = $$(FFTW3_INCLUDE)
isEmpty(_FFTW3_INCLUDE){
error(FFTW3_INCLUDE environment variable not defined.)
error(FFTW3_INCLUDE environment variable not defined.)
}
_FFTW3_LIB = $$(FFTW3_LIB)
isEmpty(_FFTW3_LIB){
error(FFTW3_LIB environment variable not defined.)
error(FFTW3_LIB environment variable not defined.)
}
INCLUDEPATH += $$_FFTW3_INCLUDE
LIBPATH += $$_FFTW3_LIB
Expand All @@ -513,7 +563,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 = 3.6.1
VERSION = 3.8

# Define a preprocessor macro so we can get the application version in application code.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
Expand All @@ -527,7 +577,8 @@ DEFINES += APP_NAME=\\\"$$TARGET\\\"
DEFINES += APP_NAME_VER=\\\"$$TARGET\\\040$$VERSION\\\"

RESOURCES += \
resources.qrc
resources.qrc \
imagejockey/ijresources.qrc

#set the Windows executable icon
win32:RC_ICONS += art/exeicon.ico
11 changes: 9 additions & 2 deletions algorithms/ialgorithmdatasource.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ class DataValue{
default: return false;
}
}
bool operator<( const DataValue& other ){
bool operator<( const DataValue& other ) {
switch( usedMember ){
case 1: return value.continuous < other.value.continuous;
case 2: return value.categorical < other.value.categorical;
default: return false;
}
}
DataValue& operator=( double pValue ){
bool operator<( const DataValue& other ) const {
switch( usedMember ){
case 1: return value.continuous < other.value.continuous;
case 2: return value.categorical < other.value.categorical;
default: return false;
}
}
DataValue& operator=( double pValue ){
usedMember = 1;
value.continuous = pValue;
return *this;
Expand Down
Binary file added art/iconsHD/svd32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/logo.odp
Binary file not shown.
Binary file modified docs/GammaRayManual.docx
100644 → 100755
Binary file not shown.
33 changes: 30 additions & 3 deletions domain/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
#include "pointset.h"
#include "util.h"
#include "viewer3d/view3dconfigwidgetsbuilder.h"
#include "cartesiangrid.h"

Attribute::Attribute(QString name, int index_in_file, bool categorical)
Attribute::Attribute(QString name, int index_in_file, bool categorical) :
IJAbstractVariable()
{
this->_name = name;
this->_index = index_in_file;
Expand Down Expand Up @@ -40,7 +42,7 @@ QString Attribute::getName()

QIcon Attribute::getIcon()
{
if( this->getParent()->isFile() ){ //most attributes have a File as parent, but not always
if( this->getParent()->isFile() ){ //most attributes have a File as parent, but not always
File* parent_file = (File*)this->getParent();
if( parent_file){
if( parent_file->getFileType() == "POINTSET" ){
Expand Down Expand Up @@ -106,5 +108,30 @@ View3DViewData Attribute::build3DViewObjects(View3DWidget *widget3D)

View3DConfigWidget *Attribute::build3DViewerConfigWidget( View3DViewData viewObjects )
{
return View3DConfigWidgetsBuilder::build( this, viewObjects );
return View3DConfigWidgetsBuilder::build( this, viewObjects );
}

IJAbstractCartesianGrid *Attribute::getParentGrid()
{
File* file = getContainingFile();
if( file->getFileType() == "CARTESIANGRID" )
return dynamic_cast<CartesianGrid*>(file);
else
return nullptr;
return nullptr;
}

int Attribute::getIndexInParentGrid()
{
return getAttributeGEOEASgivenIndex() - 1;
}

QIcon Attribute::getVariableIcon()
{
return getIcon();
}

QString Attribute::getVariableName()
{
return getName();
}
21 changes: 15 additions & 6 deletions domain/attribute.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#ifndef ATTRIBUTE_H
#define ATTRIBUTE_H
#include "projectcomponent.h"
#include "imagejockey/ijabstractvariable.h"
#include <QString>

class File;

class Attribute : public ProjectComponent
class Attribute : public ProjectComponent, public IJAbstractVariable
{
public:
/** Constructor. Index in GEO-EAS format begins with 1, not zero. */
Expand All @@ -31,16 +32,24 @@ class Attribute : public ProjectComponent

// ProjectComponent interface
public:
QString getName();
QIcon getIcon();
bool isFile();
bool isAttribute();
QString getPresentationName();
virtual QString getName();
virtual QIcon getIcon();
virtual bool isFile();
virtual bool isAttribute();
virtual QString getPresentationName();
virtual QString getObjectLocator();
virtual View3DViewData build3DViewObjects( View3DWidget * widget3D );
virtual QString getTypeName(){ return "Attribute"; }
virtual View3DConfigWidget* build3DViewerConfigWidget(View3DViewData viewObjects);

//IJAbstractVariable interface
public:
/** Returns null pointer if parent object is not a Cartesian grid. */
virtual IJAbstractCartesianGrid* getParentGrid();
virtual int getIndexInParentGrid();
virtual QString getVariableName();
virtual QIcon getVariableIcon();

private:
QString _name;
int _index; //index in GEO-EAS format begins with 1, not zero.
Expand Down
Loading

0 comments on commit 8dc90e7

Please sign in to comment.