Isis Developer Reference
CorrelationMatrix.h
Go to the documentation of this file.
1 #ifndef CorrelationMatrix_h
2 #define CorrelationMatrix_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include "FileName.h"
13 
14 #include <QDebug>
15 #include <QList>
16 #include <QMap>
17 #include <QString>
18 #include <QStringList>
19 
20 #include <boost/numeric/ublas/matrix_sparse.hpp>
21 
22 template <typename A, typename B> class QMap;
23 template <typename A> class QList;
24 
25 namespace Isis {
26  class FileName;
27  class MosaicSceneWidget;
28  class PvlObject;
29  class SparseBlockColumnMatrix;
30 
31 
62  public:
64  CorrelationMatrix(PvlObject storedMatrixData);
67 
69 
71  void retrieveVisibleElements(int x, int y);
72 
73  bool isValid();
74  bool hasCovMat();
75  //const bool hasCovMat() const;
76 
80 
82  //might need something called deleteLater(), called from MatrixTreeWidgetItem constructor.
83 
84  //if cov filename is null we need to ask the user to find it.
85 
89 
90  void retrieveWholeMatrix();
92 
93  // Need these for range used to pick colors....
95 
97 
98 
99  private:
101  QMap<QString, QStringList> *m_imagesAndParameters;
102 
104  FileName *m_covarianceFileName;
105 
107  FileName *m_correlationFileName;
108 
113  QList<double> *m_diagonals;
114 
119  QList<SparseBlockColumnMatrix> *m_visibleBlocks;
120  };
121 
122 };
123 
125 
126 #endif
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(Isis::CorrelationMatrix)
FileName.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::CorrelationMatrix::correlationFileName
FileName correlationFileName()
Public access for the correlation matrix file name.
Definition: CorrelationMatrix.cpp:396
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::SparseBlockColumnMatrix
SparseBlockColumnMatrix.
Definition: SparseBlockMatrix.h:58
Isis::CorrelationMatrix::~CorrelationMatrix
~CorrelationMatrix()
Destructor.
Definition: CorrelationMatrix.cpp:137
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::FileName::name
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
Isis::CorrelationMatrix::setImagesAndParameters
void setImagesAndParameters(QMap< QString, QStringList > imagesAndParameters)
Set the qmap of images and parameters.
Definition: CorrelationMatrix.cpp:381
Isis::CorrelationMatrix::CorrelationMatrix
CorrelationMatrix()
Default Constructor.
Definition: CorrelationMatrix.cpp:29
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::CorrelationMatrix::retrieveVisibleElements
void retrieveVisibleElements(int x, int y)
Extract requested area from correlation matrix This method will open the correlation matrix file and ...
Definition: CorrelationMatrix.cpp:289
CorrelationMatrix.h
Isis::CorrelationMatrix::correlationMatrixFromFile
SparseBlockColumnMatrix correlationMatrixFromFile(QDataStream inStream)
Isis::CorrelationMatrix::covarianceFileName
FileName covarianceFileName()
Public access for the covariance matrix file name.
Definition: CorrelationMatrix.cpp:406
Isis::CorrelationMatrix::computeCorrelationMatrix
void computeCorrelationMatrix()
Read covariance matrix and compute correlation values This method reads the covariance matrix in from...
Definition: CorrelationMatrix.cpp:203
SparseBlockMatrix.h
Isis::CorrelationMatrix::pvlObject
PvlObject pvlObject()
This method creates a Pvl group with the information necessary to recreate this correlation matrix.
Definition: CorrelationMatrix.cpp:476
QStringList
Isis::CorrelationMatrix
This is a container for the correlation matrix that comes from a bundle adjust.
Definition: CorrelationMatrix.h:61
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::CorrelationMatrix::retrieveThreeVisibleBlocks
void retrieveThreeVisibleBlocks()
Display only part of a matrix This method will be used when the matrix is too big to display the whol...
Definition: CorrelationMatrix.cpp:446
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CorrelationMatrix::operator=
CorrelationMatrix & operator=(const CorrelationMatrix &other)
Equal Operator.
Definition: CorrelationMatrix.cpp:163
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::CorrelationMatrix::setCovarianceFileName
void setCovarianceFileName(FileName covarianceFileName)
Set the qmap of images and parameters.
Definition: CorrelationMatrix.cpp:359
Isis::CorrelationMatrix::hasCovMat
bool hasCovMat()
Check if the correlation matrix has a covariance matrix This is used to make sure the covariance matr...
Definition: CorrelationMatrix.cpp:335
LinearAlgebra.h
PvlObject.h
Isis::PvlContainer::PvlKeywordIterator
QList< PvlKeyword >::iterator PvlKeywordIterator
The keyword iterator.
Definition: PvlContainer.h:157
QMap< QString, QStringList >
Isis::PvlObject::findKeyword
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
Definition: PvlObject.cpp:177
Isis::CorrelationMatrix::isValid
bool isValid()
This is the public accessor for the list of elements that should be displayed in the current view.
Definition: CorrelationMatrix.cpp:321
Isis::CorrelationMatrix::visibleBlocks
QList< SparseBlockColumnMatrix > * visibleBlocks()
Get the visible part of the matrix.
Definition: CorrelationMatrix.cpp:454
Isis::CorrelationMatrix::imagesAndParameters
QMap< QString, QStringList > * imagesAndParameters()
Public access for the qmap of images and parameters.
Definition: CorrelationMatrix.cpp:417
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CorrelationMatrix::setCorrelationFileName
void setCorrelationFileName(FileName correlationFileName)
Set the qmap of images and parameters.
Definition: CorrelationMatrix.cpp:345
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::CorrelationMatrix::retrieveWholeMatrix
void retrieveWholeMatrix()
This method will read the matrix in from the file and hold on to the whole thing.
Definition: CorrelationMatrix.cpp:427