Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgModel Class Reference
[Library]

#include <omgmodel.h>

Inheritance diagram for OmgModel:

Inheritance graph
[legend]
Collaboration diagram for OmgModel:

Collaboration graph
[legend]
List of all members.

Detailed Description

A representation of a model. Can be serialised to xml that openmodeller lib understands and can store rich model info returned by openModeller lib.

Definition at line 41 of file omgmodel.h.

Public Types

enum  LocalitiesFilterType { NO_FILTER, SPATIALLY_UNIQUE, ENVIRONMENTALLY_UNIQUE }

Public Slots

void appendToLog (QString theMessage)
void setLog (QString theLog)

Public Member Functions

 OmgModel ()
 ~OmgModel ()
bool isValid () const
QString toString () const
QString toHtml (bool theForceFlag=false) const
QString toPrintHtml (bool theForceFlag=false) const
void createRocGraph (bool theForceFlag=false) const
QString projectionLayersXml ()
void reset ()
bool parseModelResult (QString theModelXml)
void setCoordinateSystem (QString theCoordinateSystem)
void setCoordinateSystemName (QString theName)
void setOccurrencesFile (QString theSpeciesFile)
void setSpeciesFile (QString theFileName)
void setShapefileName (QString theFileName)
void setCsvFileName (QString theFileName)
void setTaxonName (QString theName)
void setLocalities (OmgLocalities theLocalities)
void setOutputFormatLayerName (QString theName)
void setModelRasterFormat (QString theFormat)
void setCreationLayerSet (OmgLayerSet theLayerSet)
void setProjectionLayerSet (OmgLayerSet theLayerSet)
void setCreationLayerNames (QStringList theNames)
void setcreationMaskLayerName (QString theName)
void setProjectionLayerNames (QStringList theNames)
void setProjectionMaskLayerName (QString theName)
void setAlgorithm (OmgAlgorithm theAlgorithm)
void setCompleted (bool theFlag)
void setError (bool theFlag)
void setStartDateTimeStamp (QDateTime theDateTimeStamp)
void setEndDateTimeStamp (QDateTime theDateTimeStamp)
void setThumbnailFileName (QString theFileName)
void setPreviewFileName (QString theFileName)
void setLegendFileName (QString theFileName)
void setRawImageFileName (QString theFileName)
void setColouredImageFileName (QString theFileName)
void setWorkDir (QString theDir)
void setModelDefinition (QString theDefinition)
void setNormalizationDefinition (QString theDefinition)
void setRocScore (double theRocScore)
void setAccuracy (double theAccuracy)
void setOmission (double theOmission)
void setCommission (double theCommission)
void setPercentCellsPresent (double thePercent)
void setTotalCells (double theTotal)
void setLocalitiesFilterType (LocalitiesFilterType theFilterType=NO_FILTER)
QString coordinateSystem () const
QString coordinateSystemName () const
QString speciesFile () const
QString shapefileName () const
QString csvFileName () const
QString taxonName () const
OmgLayerSet creationLayerSet () const
OmgLayerSet projectionLayerSet () const
QString creationMaskLayerName () const
QString projectionMaskLayerName () const
QString outputFormatLayerName () const
QStringList creationLayerNames () const
QStringList projectionLayerNames () const
OmgAlgorithm algorithm () const
bool isCompleted () const
bool hasError () const
QDateTime startDateTimeStamp () const
QDateTime endDateTimeStamp () const
QString thumbnailFileName () const
QString previewFileName () const
QString legendFileName () const
QString rawImageFileName () const
QString colouredImageFileName () const
QString modelRasterFormat () const
QString workDir () const
double rocScore () const
double accuracy () const
double omission () const
double commission () const
double percentCellsPresent () const
double totalCells () const
QString modelDefinition () const
QString normalizationDefinition () const
LocalitiesFilterType localitiesFilterType () const
OmgLocalities localities () const
QString modelLog () const
unsigned int loadLocalities ()
void createThumbnail ()
QString toXml () const
bool fromXml (const QString theXml)
QString toModelCreationXml () const
QString toModelProjectionXml () const
QString localitiesToCsv (QString theDelimiter="\t") const
bool toShapefile (QString theShapefileName) const
void addRocPoint (QPair< double, double > thePair)
void clearRocPoints ()
OmgDataSeries getRocPoints () const
bool postProcess ()

Private Attributes

QString mCoordinateSystem
 todo - make a class to represent a coordsys rather
QString mCoordinateSystemName
QString mSpeciesFile
QString mTaxonName
OmgLayer mOutputFormatLayer
OmgLayerSet mProjectionLayerSet
OmgLayerSet mCreationLayerSet
OmgAlgorithm mAlgorithm
bool mCompletedFlag
bool mErrorFlag
OmgLocalities mLocalities
QDateTime mStartDateTimeStamp
QDateTime mEndDateTimeStamp
QString mThumbnailFileName
QString mPreviewFileName
QString mLegendFileName
QString mRawImageFileName
QString mShapefileName
QString mCsvFileName
QString mColouredImageFileName
QString mWorkDir
QString mModelDefinition
QString mNormalizationDefinition
double mRocScore
double mAccuracy
double mOmission
double mCommission
double mPercentCellsPresent
double mTotalCells
QString mModelLog
QList< QPair< double, double > > mRocPoints
QString mModelRasterFormat
LocalitiesFilterType mLocalitiesFilterType


Member Enumeration Documentation

enum OmgModel::LocalitiesFilterType
 

An enumerated type defining possible types of localities filter

Enumeration values:
NO_FILTER 
SPATIALLY_UNIQUE 
ENVIRONMENTALLY_UNIQUE 

Definition at line 50 of file omgmodel.h.


Constructor & Destructor Documentation

OmgModel::OmgModel  ) 
 

Definition at line 39 of file omgmodel.cpp.

OmgModel::~OmgModel  ) 
 

Definition at line 76 of file omgmodel.cpp.


Member Function Documentation

double OmgModel::accuracy  )  const
 

Get the accuracy for this model (from confusion matrix)

Definition at line 1500 of file omgmodel.cpp.

References mAccuracy.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

void OmgModel::addRocPoint QPair< double, double >  thePair  ) 
 

Add a point to the list of roc xy values for the roc graph.

Parameters:
QPair<double,double> a pair of doubles representing the x,y values that are added to the roc curve.

Definition at line 1039 of file omgmodel.cpp.

References mRocPoints.

Referenced by fromXml().

OmgAlgorithm OmgModel::algorithm  )  const
 

Definition at line 1442 of file omgmodel.cpp.

References mAlgorithm.

Referenced by OmgExperiment::getStatsHtml(), OmgExperiment::makeAlgorithmSummaryGraphs(), OmgRasterThreshold::populateTree(), OmgMainWindow::populateTree(), OmgExperiment::removeAlgorithm(), OmgExperimentPrinter::run(), OmgExperiment::run(), OmgExperiment::setWorkDir(), OmgMainWindow::showAlgorithmSummary(), OmgExperiment::toAlgorithmSummaryHtml(), and OmgExperiment::toTaxonSummaryHtml().

void OmgModel::appendToLog QString  theMessage  )  [slot]
 

Append a message to the model log

Definition at line 1367 of file omgmodel.cpp.

References mModelLog.

Referenced by postProcess(), and OmgExperiment::run().

void OmgModel::clearRocPoints  ) 
 

Clear the list of roc xy values for the roc graph

Definition at line 1044 of file omgmodel.cpp.

References mRocPoints.

QString OmgModel::colouredImageFileName  )  const
 

Definition at line 1487 of file omgmodel.cpp.

References mColouredImageFileName.

double OmgModel::commission  )  const
 

Get the commission score for this model (from confusion matrix)

Returns:
-1 if the commision is invalid ( in the case of models run with no absence data)

Definition at line 1508 of file omgmodel.cpp.

References mCommission.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

QString OmgModel::coordinateSystem  )  const
 

Retreive the globally unique identifier for this model

Definition at line 1382 of file omgmodel.cpp.

References mCoordinateSystem.

QString OmgModel::coordinateSystemName  )  const
 

Definition at line 1387 of file omgmodel.cpp.

References mCoordinateSystemName.

void OmgModel::createRocGraph bool  theForceFlag = false  )  const
 

Definition at line 1014 of file omgmodel.cpp.

References OmgGraph::addSeries(), getRocPoints(), mTaxonName, mWorkDir, OmgGraph::render(), OmgGraph::setAreaFillEnabled(), OmgGraph::setDiagonalEnabled(), OmgDataSeries::setFillColor(), OmgGraph::setGridLinesEnabled(), OmgDataSeries::setLineColor(), OmgGraph::setSpliningEnabled(), OmgGraph::setVertexLabelsEnabled(), and OmgGraph::setVerticesEnabled().

Referenced by toHtml(), and toPrintHtml().

Here is the call graph for this function:

void OmgModel::createThumbnail  ) 
 

Create the thumbnail preview of the model for the thumbnail browser.

Definition at line 1536 of file omgmodel.cpp.

References Omgui::createThumbnail(), hasError(), isCompleted(), mAlgorithm, mTaxonName, mWorkDir, OmgAlgorithm::name(), rawImageFileName(), and setThumbnailFileName().

Referenced by postProcess(), and OmgMainWindow::refreshReports().

Here is the call graph for this function:

QStringList OmgModel::creationLayerNames  )  const
 

Definition at line 1434 of file omgmodel.cpp.

References mCreationLayerSet, and OmgLayerSet::nameList().

Referenced by localitiesToCsv(), and OmgModelTest::run().

Here is the call graph for this function:

OmgLayerSet OmgModel::creationLayerSet  )  const
 

Definition at line 1414 of file omgmodel.cpp.

References mCreationLayerSet.

QString OmgModel::creationMaskLayerName  )  const
 

Definition at line 1422 of file omgmodel.cpp.

References OmgLayerSet::maskName(), and mCreationLayerSet.

Here is the call graph for this function:

QString OmgModel::csvFileName  )  const
 

Definition at line 1404 of file omgmodel.cpp.

References mCsvFileName.

QDateTime OmgModel::endDateTimeStamp  )  const
 

Definition at line 1458 of file omgmodel.cpp.

References mEndDateTimeStamp.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

bool OmgModel::fromXml const QString  theXml  )  [virtual]
 

Implments the serialisable interface method to reinstate a model. It will try to populate all members of this class and fail gracefully when they are not available (typically by leaving the member tagged as [Not Set]

Implements OmgSerialisable.

Definition at line 126 of file omgmodel.cpp.

References addRocPoint(), ENVIRONMENTALLY_UNIQUE, OmgLayerSet::fromXml(), OmgAlgorithm::fromXml(), mAccuracy, mCommission, mCompletedFlag, mCoordinateSystem, mCoordinateSystemName, mCreationLayerSet, mCsvFileName, mEndDateTimeStamp, mErrorFlag, mLocalities, mLocalitiesFilterType, mModelDefinition, mModelLog, mNormalizationDefinition, mOmission, mOutputFormatLayer, mPercentCellsPresent, mProjectionLayerSet, mRocPoints, mRocScore, mShapefileName, mSpeciesFile, mStartDateTimeStamp, mTaxonName, mTotalCells, mWorkDir, NO_FILTER, OmgLocality::setAbundance(), setAlgorithm(), OmgLayer::setCategorical(), setColouredImageFileName(), OmgGuid::setGuid(), OmgLocality::setId(), OmgLocality::setLatitude(), setLegendFileName(), OmgLocality::setLongitude(), setModelRasterFormat(), OmgLayer::setName(), setPreviewFileName(), setRawImageFileName(), OmgLocality::setSamples(), setThumbnailFileName(), and SPATIALLY_UNIQUE.

Referenced by OmgExperiment::fromXml(), OmgLocalitiesModelTest::rowsAndColumns(), and OmgModelTest::run().

Here is the call graph for this function:

OmgDataSeries OmgModel::getRocPoints  )  const
 

Get the roc graph as an omgdataseries

Definition at line 1049 of file omgmodel.cpp.

References mRocPoints, and OmgDataSeries::setLabel().

Referenced by createRocGraph().

Here is the call graph for this function:

bool OmgModel::hasError  )  const
 

Definition at line 1446 of file omgmodel.cpp.

References mErrorFlag.

Referenced by createThumbnail(), OmgExperiment::getStatsHtml(), OmgMainWindow::populateTree(), and OmgExperiment::run().

bool OmgModel::isCompleted  )  const
 

Definition at line 1450 of file omgmodel.cpp.

References mCompletedFlag.

Referenced by createThumbnail(), OmgExperiment::getStatsHtml(), OmgRasterThreshold::populateTree(), OmgMainWindow::populateTree(), OmgExperiment::removeCompleted(), and OmgExperiment::run().

bool OmgModel::isValid  )  const
 

Todo:
implement proper check here!

Definition at line 81 of file omgmodel.cpp.

QString OmgModel::legendFileName  )  const
 

Definition at line 1470 of file omgmodel.cpp.

References mLegendFileName.

unsigned int OmgModel::loadLocalities  ) 
 

Once the taxon name and species file properties have been set, you can call this method to populate the localities collection.

Definition at line 1149 of file omgmodel.cpp.

References OmgLocality::isValid(), mLocalities, mSpeciesFile, mTaxonName, OmgLocality::setAbundance(), OmgLocality::setId(), OmgLocality::setLabel(), OmgLocality::setLatitude(), and OmgLocality::setLongitude().

Referenced by OmgExperimentDesigner::getExperiment(), and OmgModelTest::loadLocalities().

Here is the call graph for this function:

OmgLocalities OmgModel::localities  )  const
 

Definition at line 1378 of file omgmodel.cpp.

References mLocalities.

Referenced by localitiesToCsv().

OmgModel::LocalitiesFilterType OmgModel::localitiesFilterType  )  const
 

Whether the model creation should use a filter on the samples to remove duplicates

Returns:
LocalitiesFilterType Indicating the state of this setting

Definition at line 1144 of file omgmodel.cpp.

References mLocalitiesFilterType.

QString OmgModel::localitiesToCsv QString  theDelimiter = "\t"  )  const
 

A helper function for getting a CSV representation of the samples (sites plug environmental values)

Parameters:
theDelimter - A QString containing the required delimiter
Returns:
A QString holding the CSV matrix

Definition at line 1081 of file omgmodel.cpp.

References creationLayerNames(), OmgLocality::id(), OmgLocality::latitude(), localities(), OmgLocality::longitude(), and OmgLocality::samples().

Referenced by postProcess(), and Localities2CsvTest::writeLocalities2Csv().

Here is the call graph for this function:

QString OmgModel::modelDefinition  )  const
 

Definition at line 1521 of file omgmodel.cpp.

References mModelDefinition.

QString OmgModel::modelLog  )  const
 

Definition at line 1531 of file omgmodel.cpp.

References mModelLog.

QString OmgModel::modelRasterFormat  )  const
 

The output raster format of the model as defined in the om lib

Definition at line 1076 of file omgmodel.cpp.

References mModelRasterFormat.

Referenced by OmgRasterThreshold::accept().

QString OmgModel::normalizationDefinition  )  const
 

Definition at line 1526 of file omgmodel.cpp.

References mNormalizationDefinition.

double OmgModel::omission  )  const
 

Get the omission score for this model (from confusion matrix)

Definition at line 1504 of file omgmodel.cpp.

References mOmission.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

QString OmgModel::outputFormatLayerName  )  const
 

Definition at line 1430 of file omgmodel.cpp.

References mOutputFormatLayer, and OmgLayer::name().

Here is the call graph for this function:

bool OmgModel::parseModelResult QString  theModelXml  ) 
 

Parse the model xml provided and get the samples and add them to the model. Also add the serialised model.

Parameters:
QString theModelXml a model as returned by the modeller plugin
Returns:
bool true on success.

Definition at line 1579 of file omgmodel.cpp.

References OmgLocality::setAbundance(), OmgLocality::setId(), OmgLocality::setLatitude(), setLocalities(), OmgLocality::setLongitude(), setModelDefinition(), setNormalizationDefinition(), and OmgLocality::setSamples().

Referenced by OmgModelTest::run(), and OmgExperiment::run().

Here is the call graph for this function:

double OmgModel::percentCellsPresent  )  const
 

Get the percent cells present for this model (from confusion matrix)

Definition at line 1512 of file omgmodel.cpp.

References mPercentCellsPresent.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

bool OmgModel::postProcess  ) 
 

Perform post processing tasks on the model. This will generate a pseudocolor preview image, csv localities file and other products from the model output.

Returns:
bool true on success

Definition at line 1707 of file omgmodel.cpp.

References appendToLog(), Omgui::createTextFile(), createThumbnail(), localitiesToCsv(), OmgGdal::makeLegend(), rawImageFileName(), setCompleted(), setCsvFileName(), setEndDateTimeStamp(), setError(), setLegendFileName(), setPreviewFileName(), taxonName(), toHtml(), workDir(), and OmgGdal::writeImage().

Referenced by OmgExperiment::run().

Here is the call graph for this function:

QString OmgModel::previewFileName  )  const
 

Definition at line 1466 of file omgmodel.cpp.

References mPreviewFileName.

QStringList OmgModel::projectionLayerNames  )  const
 

Definition at line 1438 of file omgmodel.cpp.

References mProjectionLayerSet, and OmgLayerSet::nameList().

Referenced by OmgModelTest::run().

Here is the call graph for this function:

OmgLayerSet OmgModel::projectionLayerSet  )  const
 

Definition at line 1418 of file omgmodel.cpp.

References mProjectionLayerSet.

Referenced by OmgExperimentPrinter::run().

QString OmgModel::projectionLayersXml  ) 
 

Definition at line 590 of file omgmodel.cpp.

References mProjectionLayerSet, and OmgLayerSet::toXml().

Here is the call graph for this function:

QString OmgModel::projectionMaskLayerName  )  const
 

Definition at line 1426 of file omgmodel.cpp.

References OmgLayerSet::maskName(), and mProjectionLayerSet.

Here is the call graph for this function:

QString OmgModel::rawImageFileName  )  const
 

Definition at line 1474 of file omgmodel.cpp.

References mRawImageFileName.

Referenced by OmgRasterThreshold::accept(), createThumbnail(), postProcess(), and toHtml().

void OmgModel::reset  ) 
 

Reset the model marking it as not started, not errored etc.

Definition at line 87 of file omgmodel.cpp.

References mCompletedFlag, and mErrorFlag.

Referenced by OmgExperiment::reset().

double OmgModel::rocScore  )  const
 

Get the rocScore for this model (from roc analysis)

Definition at line 1496 of file omgmodel.cpp.

References mRocScore.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

void OmgModel::setAccuracy double  theAccuracy  ) 
 

set the accuracy for this model (from confusion matrix)

Definition at line 1338 of file omgmodel.cpp.

References mAccuracy.

void OmgModel::setAlgorithm OmgAlgorithm  theAlgorithm  ) 
 

Definition at line 1280 of file omgmodel.cpp.

References mAlgorithm.

Referenced by fromXml(), and OmgExperimentDesigner::getExperiment().

void OmgModel::setColouredImageFileName QString  theFileName  ) 
 

Definition at line 1321 of file omgmodel.cpp.

References mColouredImageFileName.

Referenced by fromXml().

void OmgModel::setCommission double  theCommission  ) 
 

set the commission score for this model (from confusion matrix)

Definition at line 1346 of file omgmodel.cpp.

References mCommission.

void OmgModel::setCompleted bool  theFlag  ) 
 

Definition at line 1289 of file omgmodel.cpp.

References mCompletedFlag.

Referenced by postProcess(), and OmgExperiment::run().

void OmgModel::setCoordinateSystem QString  theCoordinateSystem  ) 
 

Definition at line 1117 of file omgmodel.cpp.

References mCoordinateSystem.

Referenced by OmgExperimentDesigner::getExperiment().

void OmgModel::setCoordinateSystemName QString  theName  ) 
 

Definition at line 1121 of file omgmodel.cpp.

References mCoordinateSystemName.

Referenced by OmgExperimentDesigner::getExperiment().

void OmgModel::setCreationLayerNames QStringList  theNames  ) 
 

Definition at line 1254 of file omgmodel.cpp.

References OmgLayerSet::addLayer(), mCreationLayerSet, OmgLayer::setCategorical(), and OmgLayer::setName().

Referenced by Localities2CsvTest::writeLocalities2Csv().

Here is the call graph for this function:

void OmgModel::setCreationLayerSet OmgLayerSet  theLayerSet  ) 
 

Define the layerset that will be used for creationing this model.

Parameters:
theLayerSet An OmgLayerSet that contains layers and mask for model creationing.

Definition at line 1224 of file omgmodel.cpp.

References mCreationLayerSet.

Referenced by OmgExperimentDesigner::getExperiment().

void OmgModel::setcreationMaskLayerName QString  theName  ) 
 

Definition at line 1232 of file omgmodel.cpp.

References mCreationLayerSet, OmgLayer::setCategorical(), OmgLayerSet::setMask(), and OmgLayer::setName().

Here is the call graph for this function:

void OmgModel::setCsvFileName QString  theFileName  ) 
 

Definition at line 1135 of file omgmodel.cpp.

References mCsvFileName.

Referenced by postProcess().

void OmgModel::setEndDateTimeStamp QDateTime  theDateTimeStamp  ) 
 

Definition at line 1297 of file omgmodel.cpp.

References mEndDateTimeStamp.

Referenced by postProcess().

void OmgModel::setError bool  theFlag  ) 
 

Definition at line 1285 of file omgmodel.cpp.

References mErrorFlag.

Referenced by postProcess().

void OmgModel::setLegendFileName QString  theFileName  ) 
 

Definition at line 1311 of file omgmodel.cpp.

References mLegendFileName.

Referenced by fromXml(), and postProcess().

void OmgModel::setLocalities OmgLocalities  theLocalities  ) 
 

Definition at line 1112 of file omgmodel.cpp.

References mLocalities.

Referenced by parseModelResult(), and Localities2CsvTest::writeLocalities2Csv().

void OmgModel::setLocalitiesFilterType LocalitiesFilterType  theFilterType = NO_FILTER  ) 
 

Set whether the model creation should use only one sampler per distinct coordinate

Parameters:
LocalitiesFilterType Indicating the state of this setting (default to none)

Definition at line 1140 of file omgmodel.cpp.

References mLocalitiesFilterType.

Referenced by OmgExperimentDesigner::getExperiment().

void OmgModel::setLog QString  theLog  )  [slot]
 

Set the log to the provided message (overwriting any data that was previously there

Definition at line 1372 of file omgmodel.cpp.

References mModelLog.

void OmgModel::setModelDefinition QString  theDefinition  ) 
 

this is what is returned from om_create process. at the moment we just store this in a string member, but in the future we ill parse it out and store the individual constituents as properties of the model object

Definition at line 1358 of file omgmodel.cpp.

References mModelDefinition.

Referenced by parseModelResult().

void OmgModel::setModelRasterFormat QString  theFormat  ) 
 

Set the output model raster format - the name should be in line with the names used in the openModeller library

Definition at line 1062 of file omgmodel.cpp.

References mModelRasterFormat.

Referenced by fromXml(), and OmgExperimentDesigner::getExperiment().

void OmgModel::setNormalizationDefinition QString  theDefinition  ) 
 

Some algs will return a serialised normalization definition (since om lib supports different normalizer)

Definition at line 1363 of file omgmodel.cpp.

References mNormalizationDefinition.

Referenced by parseModelResult().

void OmgModel::setOccurrencesFile QString  theSpeciesFile  ) 
 

void OmgModel::setOmission double  theOmission  ) 
 

set the omission score for this model (from confusion matrix)

Definition at line 1342 of file omgmodel.cpp.

References mOmission.

void OmgModel::setOutputFormatLayerName QString  theName  ) 
 

Definition at line 1248 of file omgmodel.cpp.

References mOutputFormatLayer, OmgLayer::setCategorical(), and OmgLayer::setName().

Referenced by OmgExperimentDesigner::getExperiment().

Here is the call graph for this function:

void OmgModel::setPercentCellsPresent double  thePercent  ) 
 

set the percent cells present for this model (from confusion matrix)

Definition at line 1350 of file omgmodel.cpp.

References mPercentCellsPresent.

void OmgModel::setPreviewFileName QString  theFileName  ) 
 

Definition at line 1306 of file omgmodel.cpp.

References mPreviewFileName.

Referenced by fromXml(), and postProcess().

void OmgModel::setProjectionLayerNames QStringList  theNames  ) 
 

Definition at line 1267 of file omgmodel.cpp.

References OmgLayerSet::addLayer(), mProjectionLayerSet, OmgLayer::setCategorical(), and OmgLayer::setName().

Here is the call graph for this function:

void OmgModel::setProjectionLayerSet OmgLayerSet  theLayerSet  ) 
 

Define the layerset that will be used for projecting this model.

Parameters:
theLayerSet An OmgLayerSet that contains layers and mask for model projection.

Definition at line 1228 of file omgmodel.cpp.

References mProjectionLayerSet.

Referenced by OmgExperimentDesigner::getExperiment().

void OmgModel::setProjectionMaskLayerName QString  theName  ) 
 

Definition at line 1240 of file omgmodel.cpp.

References mProjectionLayerSet, OmgLayer::setCategorical(), OmgLayerSet::setMask(), and OmgLayer::setName().

Here is the call graph for this function:

void OmgModel::setRawImageFileName QString  theFileName  ) 
 

Definition at line 1316 of file omgmodel.cpp.

References mRawImageFileName.

Referenced by fromXml().

void OmgModel::setRocScore double  theRocScore  ) 
 

set the rocScore for this model (from roc analysis)

Definition at line 1334 of file omgmodel.cpp.

References mRocScore.

void OmgModel::setShapefileName QString  theFileName  ) 
 

Definition at line 1130 of file omgmodel.cpp.

References mShapefileName.

Referenced by OmgExperiment::run().

void OmgModel::setSpeciesFile QString  theFileName  ) 
 

Set the species file to be used for the model. I will change this later so that it is not file based but rather the points will be added directly to the model. For now, calling this method will also cause the points to be loaded into the OmgLocalities collection associated with this model.

Definition at line 1126 of file omgmodel.cpp.

References mSpeciesFile.

Referenced by OmgExperimentDesigner::getExperiment(), and OmgModelTest::loadLocalities().

void OmgModel::setStartDateTimeStamp QDateTime  theDateTimeStamp  ) 
 

Definition at line 1293 of file omgmodel.cpp.

References mStartDateTimeStamp.

Referenced by OmgExperiment::run().

void OmgModel::setTaxonName QString  theName  ) 
 

Definition at line 1219 of file omgmodel.cpp.

References mTaxonName.

Referenced by OmgExperimentDesigner::getExperiment(), and OmgModelTest::loadLocalities().

void OmgModel::setThumbnailFileName QString  theFileName  ) 
 

Definition at line 1301 of file omgmodel.cpp.

References mThumbnailFileName.

Referenced by createThumbnail(), and fromXml().

void OmgModel::setTotalCells double  theTotal  ) 
 

set the totalCells for this model (from confusion matrix)

Definition at line 1354 of file omgmodel.cpp.

References mTotalCells.

void OmgModel::setWorkDir QString  theDir  ) 
 

Definition at line 1327 of file omgmodel.cpp.

References mWorkDir.

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), OmgModelTest::run(), OmgExperiment::run(), and OmgExperiment::setWorkDir().

QString OmgModel::shapefileName  )  const
 

Definition at line 1397 of file omgmodel.cpp.

References mShapefileName.

QString OmgModel::speciesFile  )  const
 

Definition at line 1392 of file omgmodel.cpp.

References mSpeciesFile.

QDateTime OmgModel::startDateTimeStamp  )  const
 

Definition at line 1454 of file omgmodel.cpp.

References mStartDateTimeStamp.

Referenced by OmgExperiment::getStatsHtml(), and OmgExperiment::makeAlgorithmSummaryGraphs().

QString OmgModel::taxonName  )  const
 

Definition at line 1409 of file omgmodel.cpp.

References mTaxonName.

Referenced by OmgRasterThreshold::populateTree(), OmgMainWindow::populateTree(), postProcess(), OmgExperiment::removeTaxon(), OmgExperimentPrinter::run(), OmgExperiment::run(), OmgPublishToCatalogue::setModel(), OmgMainWindow::showTaxonSummary(), and OmgExperiment::toTaxonSummaryHtml().

QString OmgModel::thumbnailFileName  )  const
 

Definition at line 1462 of file omgmodel.cpp.

References mThumbnailFileName.

Referenced by OmgRasterThreshold::populateTree(), OmgPublishToCatalogue::setModel(), OmgMainWindow::showAlgorithmSummary(), OmgMainWindow::showTaxonSummary(), OmgExperiment::toAlgorithmSummaryHtml(), and OmgExperiment::toTaxonSummaryHtml().

QString OmgModel::toHtml bool  theForceFlag = false  )  const
 

Get the report file name for this model.

Parameters:
theForceFlag - force recreation of the report and its graphs etc.
Returns:
QString with the filename of the html report

Definition at line 595 of file omgmodel.cpp.

References OmgGraph::addSeries(), createRocGraph(), Omgui::createTextFile(), Omgui::getHtmlFooter(), Omgui::getHtmlHeader(), OmgGuid::guid(), mAccuracy, mAlgorithm, mCommission, mCreationLayerSet, mEndDateTimeStamp, mLegendFileName, mLocalitiesFilterType, mModelLog, mModelRasterFormat, mOmission, mOutputFormatLayer, mPercentCellsPresent, mPreviewFileName, mProjectionLayerSet, mRocPoints, mRocScore, mStartDateTimeStamp, mTaxonName, mThumbnailFileName, mTotalCells, mWorkDir, OmgLayer::name(), OmgAlgorithm::name(), NO_FILTER, rawImageFileName(), OmgGraph::render(), OmgGraph::setAreaFillEnabled(), OmgDataSeries::setFillColor(), OmgGraph::setGridLinesEnabled(), OmgDataSeries::setLabel(), OmgDataSeries::setLineColor(), OmgGraph::setSpliningEnabled(), OmgGraph::setVertexLabelsEnabled(), OmgGraph::setVerticesEnabled(), SPATIALLY_UNIQUE, OmgLayerSet::toHtml(), OmgAlgorithm::toHtml(), and workDir().

Referenced by postProcess(), OmgMainWindow::printExperimentReport(), and OmgMainWindow::refreshReports().

Here is the call graph for this function:

QString OmgModel::toModelCreationXml  )  const
 

This is a special case serialiser needed for when preparing an xml representation of an model to send to the openmodeller library (or openmodeller web service interface). The xml produced will include no ancilliary meta information - only the essentials needed for the model.

Returns:
a string containing the model creation request xml representation or if something went wrong an empty string.

Definition at line 469 of file omgmodel.cpp.

References OmgLocality::abundance(), mAlgorithm, mCoordinateSystem, mCreationLayerSet, mLocalities, mLocalitiesFilterType, mTaxonName, NO_FILTER, SPATIALLY_UNIQUE, OmgAlgorithm::toModelCreationXml(), OmgLocality::toXml(), and OmgLayerSet::toXml().

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), and OmgModelTest::run().

Here is the call graph for this function:

QString OmgModel::toModelProjectionXml  )  const
 

This is a special case serialiser needed for when preparing an xml representation of an model to send to the openmodeller library (or openmodeller web service interface). The xml produced will include no ancilliary meta information - only the essentials needed for the model.

Returns:
a string containing the model projection xml representation, or if something went wrong an empty string.

Definition at line 553 of file omgmodel.cpp.

References mAlgorithm, mModelDefinition, mModelRasterFormat, mNormalizationDefinition, mOutputFormatLayer, mProjectionLayerSet, OmgLayer::name(), OmgAlgorithm::toModelProjectionXml(), and OmgLayerSet::toXml().

Here is the call graph for this function:

QString OmgModel::toPrintHtml bool  theForceFlag = false  )  const
 

Get the print ready reoport for this model. It excludes some portions of the on screen report such as model log. It also uses absolute paths for images so they are properly include into the printout.

Parameters:
theForceFlag - force recreation of the report and its graphs etc.
Returns:
QString with the html report contents

Definition at line 871 of file omgmodel.cpp.

References createRocGraph(), mAccuracy, mAlgorithm, mCommission, mCreationLayerSet, mEndDateTimeStamp, mLegendFileName, mModelRasterFormat, mOmission, mOutputFormatLayer, mPercentCellsPresent, mPreviewFileName, mProjectionLayerSet, mRocPoints, mRocScore, mStartDateTimeStamp, mTaxonName, mTotalCells, mWorkDir, OmgLayer::name(), OmgLayerSet::name(), OmgAlgorithm::name(), and OmgAlgorithm::toHtml().

Referenced by OmgExperimentPrinter::run().

Here is the call graph for this function:

bool OmgModel::toShapefile QString  theShapefileName  )  const
 

A helper method to easily write a shapefile to disk.

Parameters:
theFileName - the filename to be created or overwritten
Returns:
bool - false if the file could not be written

Definition at line 1106 of file omgmodel.cpp.

References Omgui::localitiesToShapefile(), and mLocalities.

Referenced by OmgExperiment::run().

Here is the call graph for this function:

QString OmgModel::toString  )  const
 

Create an html formatted sumary of the model and save it to disk.

Parameters:
bool flag indicating whether to force recreating the report or whether to just return the existing one if it was made previously. If the file does not exist the flag is ignored and the report is created anyway. By default this flag is false.
Returns:
QString containing the full file name and path to the summary report.

Definition at line 93 of file omgmodel.cpp.

References mAlgorithm, OmgLayerSet::maskName(), mCoordinateSystem, mCoordinateSystemName, mCreationLayerSet, mLegendFileName, mLocalities, mOutputFormatLayer, mPreviewFileName, mProjectionLayerSet, mSpeciesFile, mTaxonName, OmgLayer::name(), OmgAlgorithm::toString(), and OmgLayerSet::toString().

Referenced by OmgExperiment::toString().

Here is the call graph for this function:

double OmgModel::totalCells  )  const
 

Get the totalCells for this model (from confusion matrix)

Definition at line 1516 of file omgmodel.cpp.

References mTotalCells.

QString OmgModel::toXml  )  const [virtual]
 

This method is required for the serialiseable interface. It will encapsulate *all* model properties so that its complete state can be serialised and later deserialised.

See also:
toModelCreationXml()

Implements OmgSerialisable.

Definition at line 347 of file omgmodel.cpp.

References OmgGuid::guid(), mAccuracy, mAlgorithm, mColouredImageFileName, mCommission, mCompletedFlag, mCoordinateSystem, mCoordinateSystemName, mCreationLayerSet, mCsvFileName, mEndDateTimeStamp, mErrorFlag, mLegendFileName, mLocalities, mLocalitiesFilterType, mModelDefinition, mModelLog, mModelRasterFormat, mNormalizationDefinition, mOmission, mOutputFormatLayer, mPercentCellsPresent, mPreviewFileName, mProjectionLayerSet, mRawImageFileName, mRocPoints, mRocScore, mShapefileName, mSpeciesFile, mStartDateTimeStamp, mTaxonName, mThumbnailFileName, mTotalCells, mWorkDir, NO_FILTER, SPATIALLY_UNIQUE, OmgLocality::toXml(), OmgAlgorithm::toXml(), OmgLayerSet::toXml(), and OmgLayer::toXml().

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), OmgModelTest::run(), OmgModelTest::saveAndLoadModel(), and OmgExperiment::toXml().

Here is the call graph for this function:

QString OmgModel::workDir  )  const
 

The directory where the working files were stored for this model

Definition at line 1492 of file omgmodel.cpp.

References mWorkDir.

Referenced by OmgRasterThreshold::accept(), OmgRasterThreshold::populateTree(), postProcess(), OmgExperiment::run(), OmgPublishToCatalogue::setModel(), OmgMainWindow::showAlgorithmSummary(), OmgMainWindow::showTaxonSummary(), and toHtml().


Member Data Documentation

double OmgModel::mAccuracy [private]
 

Definition at line 335 of file omgmodel.h.

Referenced by accuracy(), fromXml(), setAccuracy(), toHtml(), toPrintHtml(), and toXml().

OmgAlgorithm OmgModel::mAlgorithm [private]
 

Definition at line 317 of file omgmodel.h.

Referenced by algorithm(), createThumbnail(), setAlgorithm(), toHtml(), toModelCreationXml(), toModelProjectionXml(), toPrintHtml(), toString(), and toXml().

QString OmgModel::mColouredImageFileName [private]
 

Definition at line 330 of file omgmodel.h.

Referenced by colouredImageFileName(), setColouredImageFileName(), and toXml().

double OmgModel::mCommission [private]
 

-1 indicates invalid since commission only applies to presence/absence models

Definition at line 339 of file omgmodel.h.

Referenced by commission(), fromXml(), setCommission(), toHtml(), toPrintHtml(), and toXml().

bool OmgModel::mCompletedFlag [private]
 

Definition at line 318 of file omgmodel.h.

Referenced by fromXml(), isCompleted(), reset(), setCompleted(), and toXml().

QString OmgModel::mCoordinateSystem [private]
 

todo - make a class to represent a coordsys rather

Definition at line 310 of file omgmodel.h.

Referenced by coordinateSystem(), fromXml(), setCoordinateSystem(), toModelCreationXml(), toString(), and toXml().

QString OmgModel::mCoordinateSystemName [private]
 

Definition at line 311 of file omgmodel.h.

Referenced by coordinateSystemName(), fromXml(), setCoordinateSystemName(), toString(), and toXml().

OmgLayerSet OmgModel::mCreationLayerSet [private]
 

Definition at line 316 of file omgmodel.h.

Referenced by creationLayerNames(), creationLayerSet(), creationMaskLayerName(), fromXml(), setCreationLayerNames(), setCreationLayerSet(), setcreationMaskLayerName(), toHtml(), toModelCreationXml(), toPrintHtml(), toString(), and toXml().

QString OmgModel::mCsvFileName [private]
 

Definition at line 329 of file omgmodel.h.

Referenced by csvFileName(), fromXml(), setCsvFileName(), and toXml().

QDateTime OmgModel::mEndDateTimeStamp [private]
 

Definition at line 323 of file omgmodel.h.

Referenced by endDateTimeStamp(), fromXml(), setEndDateTimeStamp(), toHtml(), toPrintHtml(), and toXml().

bool OmgModel::mErrorFlag [private]
 

Definition at line 319 of file omgmodel.h.

Referenced by fromXml(), hasError(), reset(), setError(), and toXml().

QString OmgModel::mLegendFileName [private]
 

Definition at line 326 of file omgmodel.h.

Referenced by legendFileName(), setLegendFileName(), toHtml(), toPrintHtml(), toString(), and toXml().

OmgLocalities OmgModel::mLocalities [private]
 

Definition at line 321 of file omgmodel.h.

Referenced by fromXml(), loadLocalities(), localities(), setLocalities(), toModelCreationXml(), toShapefile(), toString(), and toXml().

LocalitiesFilterType OmgModel::mLocalitiesFilterType [private]
 

Definition at line 345 of file omgmodel.h.

Referenced by fromXml(), localitiesFilterType(), setLocalitiesFilterType(), toHtml(), toModelCreationXml(), and toXml().

QString OmgModel::mModelDefinition [private]
 

Definition at line 332 of file omgmodel.h.

Referenced by fromXml(), modelDefinition(), setModelDefinition(), toModelProjectionXml(), and toXml().

QString OmgModel::mModelLog [private]
 

Definition at line 342 of file omgmodel.h.

Referenced by appendToLog(), fromXml(), modelLog(), setLog(), toHtml(), and toXml().

QString OmgModel::mModelRasterFormat [private]
 

Definition at line 344 of file omgmodel.h.

Referenced by modelRasterFormat(), setModelRasterFormat(), toHtml(), toModelProjectionXml(), toPrintHtml(), and toXml().

QString OmgModel::mNormalizationDefinition [private]
 

Definition at line 333 of file omgmodel.h.

Referenced by fromXml(), normalizationDefinition(), setNormalizationDefinition(), toModelProjectionXml(), and toXml().

double OmgModel::mOmission [private]
 

Definition at line 336 of file omgmodel.h.

Referenced by fromXml(), omission(), setOmission(), toHtml(), toPrintHtml(), and toXml().

OmgLayer OmgModel::mOutputFormatLayer [private]
 

Definition at line 314 of file omgmodel.h.

Referenced by fromXml(), outputFormatLayerName(), setOutputFormatLayerName(), toHtml(), toModelProjectionXml(), toPrintHtml(), toString(), and toXml().

double OmgModel::mPercentCellsPresent [private]
 

Definition at line 340 of file omgmodel.h.

Referenced by fromXml(), percentCellsPresent(), setPercentCellsPresent(), toHtml(), toPrintHtml(), and toXml().

QString OmgModel::mPreviewFileName [private]
 

Definition at line 325 of file omgmodel.h.

Referenced by previewFileName(), setPreviewFileName(), toHtml(), toPrintHtml(), toString(), and toXml().

OmgLayerSet OmgModel::mProjectionLayerSet [private]
 

Definition at line 315 of file omgmodel.h.

Referenced by fromXml(), projectionLayerNames(), projectionLayerSet(), projectionLayersXml(), projectionMaskLayerName(), setProjectionLayerNames(), setProjectionLayerSet(), setProjectionMaskLayerName(), toHtml(), toModelProjectionXml(), toPrintHtml(), toString(), and toXml().

QString OmgModel::mRawImageFileName [private]
 

Definition at line 327 of file omgmodel.h.

Referenced by rawImageFileName(), setRawImageFileName(), and toXml().

QList< QPair <double,double> > OmgModel::mRocPoints [private]
 

Definition at line 343 of file omgmodel.h.

Referenced by addRocPoint(), clearRocPoints(), fromXml(), getRocPoints(), toHtml(), toPrintHtml(), and toXml().

double OmgModel::mRocScore [private]
 

Definition at line 334 of file omgmodel.h.

Referenced by fromXml(), rocScore(), setRocScore(), toHtml(), toPrintHtml(), and toXml().

QString OmgModel::mShapefileName [private]
 

Definition at line 328 of file omgmodel.h.

Referenced by fromXml(), setShapefileName(), shapefileName(), and toXml().

QString OmgModel::mSpeciesFile [private]
 

Definition at line 312 of file omgmodel.h.

Referenced by fromXml(), loadLocalities(), setSpeciesFile(), speciesFile(), toString(), and toXml().

QDateTime OmgModel::mStartDateTimeStamp [private]
 

Definition at line 322 of file omgmodel.h.

Referenced by fromXml(), setStartDateTimeStamp(), startDateTimeStamp(), toHtml(), toPrintHtml(), and toXml().

QString OmgModel::mTaxonName [private]
 

Definition at line 313 of file omgmodel.h.

Referenced by createRocGraph(), createThumbnail(), fromXml(), loadLocalities(), setTaxonName(), taxonName(), toHtml(), toModelCreationXml(), toPrintHtml(), toString(), and toXml().

QString OmgModel::mThumbnailFileName [private]
 

Definition at line 324 of file omgmodel.h.

Referenced by setThumbnailFileName(), thumbnailFileName(), toHtml(), and toXml().

double OmgModel::mTotalCells [private]
 

Definition at line 341 of file omgmodel.h.

Referenced by fromXml(), setTotalCells(), toHtml(), toPrintHtml(), totalCells(), and toXml().

QString OmgModel::mWorkDir [private]
 

Definition at line 331 of file omgmodel.h.

Referenced by createRocGraph(), createThumbnail(), fromXml(), setWorkDir(), toHtml(), toPrintHtml(), toXml(), and workDir().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:45 2008 for openModellerDesktop by  doxygen 1.4.1-20050210