Isis Developer Reference
|
This is a container for the correlation matrix that comes from a bundle adjust. More...
#include <CorrelationMatrix.h>
Public Member Functions | |
CorrelationMatrix () | |
Default Constructor. | |
CorrelationMatrix (PvlObject storedMatrixData) | |
This constructor will create a CorrelationMatrix object given a pvl. | |
CorrelationMatrix (const CorrelationMatrix &other) | |
Copy Constructor. | |
~CorrelationMatrix () | |
Destructor. | |
CorrelationMatrix & | operator= (const CorrelationMatrix &other) |
Equal Operator. | |
void | computeCorrelationMatrix () |
Read covariance matrix and compute correlation values This method reads the covariance matrix in from a file, one SparseBlockColumnMatrix at a time. | |
void | retrieveVisibleElements (int x, int y) |
Extract requested area from correlation matrix This method will open the correlation matrix file and read in the blocks that apply to the requested area. | |
bool | isValid () |
This is the public accessor for the list of elements that should be displayed in the current view. | |
bool | hasCovMat () |
Check if the correlation matrix has a covariance matrix This is used to make sure the covariance matrix exists. | |
void | setCorrelationFileName (FileName correlationFileName) |
Set the qmap of images and parameters. | |
void | setCovarianceFileName (FileName covarianceFileName) |
Set the qmap of images and parameters. | |
void | setImagesAndParameters (QMap< QString, QStringList > imagesAndParameters) |
Set the qmap of images and parameters. | |
SparseBlockColumnMatrix | correlationMatrixFromFile (QDataStream inStream) |
FileName | correlationFileName () |
Public access for the correlation matrix file name. | |
FileName | covarianceFileName () |
Public access for the covariance matrix file name. | |
QMap< QString, QStringList > * | imagesAndParameters () |
Public access for the qmap of images and parameters. | |
void | retrieveWholeMatrix () |
This method will read the matrix in from the file and hold on to the whole thing. | |
void | retrieveThreeVisibleBlocks () |
Display only part of a matrix This method will be used when the matrix is too big to display the whole thing. | |
QList< SparseBlockColumnMatrix > * | visibleBlocks () |
Get the visible part of the matrix. | |
PvlObject | pvlObject () |
This method creates a Pvl group with the information necessary to recreate this correlation matrix. | |
This is a container for the correlation matrix that comes from a bundle adjust.
The bundle adjust will output the covariance matrix to a file. This class will read that file in and compute the correlation matrix. The entire correlation matrix will be written to a file and values will be read/displayed on an as-needed basis.
Isis::CorrelationMatrix::CorrelationMatrix | ( | ) |
Default Constructor.
Isis::CorrelationMatrix::CorrelationMatrix | ( | PvlObject | storedMatrixData | ) |
This constructor will create a CorrelationMatrix object given a pvl.
Object = CorrelationMatrix
CovarianceFileName = fileName.dat CorrelationFileName = fileName.dat
Group = ImagesAndParameters Image1 = "Parameter1", "Parameter2", "..." Image2 = "Parameter1", "Parameter2", "..." Image3 = "Parameter1", "Parameter2", "..." End_Group
End_Object
storedMatrixData | A PvlObject containing data about the covariance/correlation matrix. |
IException::User | "This Pvl Object does not have the correct correlation information. The Object you are looking for is called CorrelationMatrixData" |
IException::User | "Could not find the Covariance Matrix .dat file name." |
IException::User | "Could not find the Correlation Matrix .dat file name." |
IException::User | "Could not get Images and Parameters from ImagesAndParameters group." |
References _FILEINFO_, and Isis::IException::User.
Isis::CorrelationMatrix::CorrelationMatrix | ( | const CorrelationMatrix & | other | ) |
Copy Constructor.
other | The CorrelationMatrix to copy. |
Isis::CorrelationMatrix::~CorrelationMatrix | ( | ) |
Destructor.
void Isis::CorrelationMatrix::computeCorrelationMatrix | ( | ) |
Read covariance matrix and compute correlation values This method reads the covariance matrix in from a file, one SparseBlockColumnMatrix at a time.
It then stores the diagonal values from that column and computes the correlation values. The resulting SparseBlockMatrix is written to a new file, one SparseBlockColumnMatrix at a time.
IException::Progammer | "Cannot compute correlation matrix without a specified file name. Use setCorrelationFileName(FileName) before calling computeCorrelationMatrix()." |
References _FILEINFO_, Isis::FileName::expanded(), isValid(), and Isis::IException::Programmer.
FileName Isis::CorrelationMatrix::correlationFileName | ( | ) |
Public access for the correlation matrix file name.
Referenced by setCorrelationFileName().
SparseBlockColumnMatrix Isis::CorrelationMatrix::correlationMatrixFromFile | ( | QDataStream | inStream | ) |
FileName Isis::CorrelationMatrix::covarianceFileName | ( | ) |
Public access for the covariance matrix file name.
Referenced by setCovarianceFileName().
bool Isis::CorrelationMatrix::hasCovMat | ( | ) |
Check if the correlation matrix has a covariance matrix This is used to make sure the covariance matrix exists.
If it doesn't this class is not valid. If this file exists, we can compute the correlation matrix.
References Isis::FileName::name().
QMap< QString, QStringList > * Isis::CorrelationMatrix::imagesAndParameters | ( | ) |
Public access for the qmap of images and parameters.
Referenced by Isis::MatrixOptions::matrixImgsAndParams(), and setImagesAndParameters().
bool Isis::CorrelationMatrix::isValid | ( | ) |
This is the public accessor for the list of elements that should be displayed in the current view.
See if the correlation matrix has already been calculated by checking to see if the correlation matrix file has been created.
References Isis::FileName::name().
Referenced by computeCorrelationMatrix(), Isis::MatrixViewWorkOrder::isExecutable(), and setCovarianceFileName().
CorrelationMatrix & Isis::CorrelationMatrix::operator= | ( | const CorrelationMatrix & | other | ) |
Equal Operator.
Should this call the copy constructor???
other | The matrix to assign to this matrix. |
PvlObject Isis::CorrelationMatrix::pvlObject | ( | ) |
This method creates a Pvl group with the information necessary to recreate this correlation matrix.
Object = CorrelationMatrixData CovarianceMatrixFileName = /location/covarianceTmpFileName.dat CorrelationMatrixFileName = /location/correlationTmpFileName.dat
Group = ImagesAndParameters Image1Name = "Param1, Param2, ..., ParamN" ... ImageNName = "..." End_Group End_Object
References Isis::FileName::expanded().
void Isis::CorrelationMatrix::retrieveThreeVisibleBlocks | ( | ) |
Display only part of a matrix This method will be used when the matrix is too big to display the whole thing.
It will read in the block we want to see and the two blocks for the diagonals that belong to the right images.
void Isis::CorrelationMatrix::retrieveVisibleElements | ( | int | x, |
int | y ) |
Extract requested area from correlation matrix This method will open the correlation matrix file and read in the blocks that apply to the requested area.
It will populate m_visibleElements.
x | first coordinate of the location in the matrix that the user wants to see. |
y | second coordinate of the location in the matrix that the user wants to see. |
void Isis::CorrelationMatrix::retrieveWholeMatrix | ( | ) |
This method will read the matrix in from the file and hold on to the whole thing.
This will only be used when the matrix is small enough that this will be useful.
void Isis::CorrelationMatrix::setCorrelationFileName | ( | FileName | correlationFileName | ) |
Set the qmap of images and parameters.
correlationFileName | The FileName of the stored correlation matrix data. |
References correlationFileName().
Referenced by setCovarianceFileName().
void Isis::CorrelationMatrix::setCovarianceFileName | ( | FileName | covarianceFileName | ) |
Set the qmap of images and parameters.
covarianceFileName | The FileName of the stored covariance matrix data. |
References covarianceFileName(), Isis::FileName::expanded(), isValid(), and setCorrelationFileName().
Referenced by Isis::BundleResults::setCorrMatCovFileName().
void Isis::CorrelationMatrix::setImagesAndParameters | ( | QMap< QString, QStringList > | imagesAndParameters | ) |
Set the qmap of images and parameters.
imagesAndParameters | a QMap structure indexed by image keys, with an arbitrary set of parameters for each image. |
References imagesAndParameters().
Referenced by Isis::BundleResults::setCorrMatImgsAndParams().
QList< SparseBlockColumnMatrix > * Isis::CorrelationMatrix::visibleBlocks | ( | ) |
Get the visible part of the matrix.