Isis Developer Reference
|
#include <ControlNetVitals.h>
Public Slots | |
void | validate () |
This method is designed to evaluate the current vitals of the network to determine if any weaknesses are present and update the status of the network. | |
void | validateNetwork (ControlNet::ModType) |
This SLOT is designed to intercept the networkModified() signal emitted by a Control Network whenever a modification is made to the network. | |
void | addPoint (ControlPoint *) |
This SLOT is designed to intercept the newPoint() signal emitted from a ControlNetwork whenever a new point has been added. | |
void | pointModified (ControlPoint *, ControlPoint::ModType, QVariant, QVariant) |
This SLOT is designed to receive a signal emitted from the Control Network whenever a modification is made to a Control Point. | |
void | deletePoint (ControlPoint *) |
This SLOT is designed to intercept the removePoint() signal emitted by a Control Network whenever a point is deleted. | |
void | addMeasure (ControlMeasure *) |
This SLOT is designed to intercept the newMeasure() signal emitted by a Control Network whenever a measure is added to one of it's Control Points. | |
void | measureModified (ControlMeasure *, ControlMeasure::ModType, QVariant, QVariant) |
This SLOT is designed to intercept the measureModified() signal emitted by a Control Network whenever a measure is modified in one of it's Control Points. | |
void | deleteMeasure (ControlMeasure *) |
This SLOT is designed to intercept the measureRemoved() signal emitted by a Control Network whenever a Control Measure is deleted. | |
Signals | |
void | networkChanged () |
void | historyEntry (QString, QString, QVariant, QVariant, QString) |
Public Member Functions | |
ControlNetVitals (ControlNet *net) | |
Constructs a ControlNetVitals object from a ControlNet. | |
virtual | ~ControlNetVitals () |
De-constructor. | |
void | initializeVitals () |
This will initialize all necessary values and set up the point measure and image measure QMaps appropriately. | |
bool | hasIslands () |
This method is designed to return true if islands exist in the ControlNet Graph and False otherwise. | |
int | numIslands () |
This method is designed to return the number of islands that exist in the ControlNet Graph. | |
const QList< QList< QString > > & | getIslands () |
This method is designed to return a QList containing each island present in the ControlNet. | |
ControlPoint * | getPoint (QString id) |
This method is designed to return the Control Point with the associated point id from the Control Network. | |
int | numPoints () |
This method is designed to return the number of points in the Control Network. | |
int | numIgnoredPoints () |
This method is designed to return the number of ignored points in the Control Network. | |
int | numLockedPoints () |
This method is designed to return the number of edit locked points in the Control Network. | |
int | numFixedPoints () |
This method is designed to return the number of fixed points in the Control Network. | |
int | numConstrainedPoints () |
This method is designed to return the number of constrained points in the Control Network. | |
int | numFreePoints () |
This method is designed to return the number of free points in the Control Network. | |
int | numPointsBelowMeasureThreshold (int num=3) |
This method is designed to return the number of points that fall below a measure threshold. | |
int | numImages () |
This method is designed to return the number of images in the Control Network. | |
int | numMeasures () |
This method is designed to return the number of measures in the Control Network. | |
int | numImagesBelowMeasureThreshold (int num=3) |
This method is designed to return the number of images that fall below a measure threshold. | |
int | numImagesBelowHullTolerance (int tolerance=75) |
This method is designed to return the number of images that fall below a hull tolerance. | |
QList< QString > | getCubeSerials () |
This method is designed to return all cube serials present in the Control Network. | |
QList< ControlPoint * > | getAllPoints () |
This method is designed to return all points in the Control Network. | |
QList< ControlPoint * > | getIgnoredPoints () |
This method is designed to return all ignored points in the Control Network. | |
QList< ControlPoint * > | getLockedPoints () |
This method is designed to return all edit locked points in the Control Network. | |
QList< ControlPoint * > | getFixedPoints () |
This method is designed to return all fixed points in the Control Network. | |
QList< ControlPoint * > | getConstrainedPoints () |
This method is designed to return all constrained points in the Control Network. | |
QList< ControlPoint * > | getFreePoints () |
This method is designed to return all free points in the Control Network. | |
QList< ControlPoint * > | getPointsBelowMeasureThreshold (int num=3) |
This method is designed to return all points that fall below a measure threshold. | |
QList< QString > | getImagesBelowMeasureThreshold (int num=3) |
This method is designed to return a QList containing cube serials for all images that fall below a measure threshold. | |
QList< QString > | getImagesBelowHullTolerance (int num=75) |
This method is designed to return a QList containing cube serials for all images that fall below a convex hull tolerance threshold. | |
QString | getNetworkId () |
This method is designed to return networkId of the observed Control Network. | |
QString | getStatus () |
This method is designed to return the current status of the network. | |
QString | getStatusDetails () |
This method is designed to return details for the status of the network. | |
void | emitHistoryEntry (QString entry, QString id, QVariant oldValue, QVariant newValue) |
This method is designed to be called whenever a modification is made to the network, or any of it's control points or measures. | |
This class is designed to represent the health of a control network. It utilizes signals and slots to listen for changes in an observed Control Network and re-evaluates the health of a network whenever a change is made. It tracks several statistics, and is intended to be the back-end for the ControlHealthMonitorWidget that is located in IPCE.
The ControlNetVitals class keeps track of several member variables that are a running counter for network statistics in regard to the health of the observed network. It creates these variables upon intialization and references these internal variables when returning certain statistics about a Control Network that can't be accessed by wrapper methods for the network itself. It then listens for specific signals to be emitted whenever a change is made to the network to update it's internal counters with respect to that change.
Isis::ControlNetVitals::ControlNetVitals | ( | ControlNet * | cnet | ) |
Constructs a ControlNetVitals object from a ControlNet.
once complete, it calls the validate() method to evaluate the current status of the newly ingested Control Network.
cnet | The Control Network that we will be tracking vitals for. |
References addMeasure(), addPoint(), deleteMeasure(), deletePoint(), initializeVitals(), measureModified(), pointModified(), validate(), and validateNetwork().
|
virtual |
De-constructor.
|
slot |
This SLOT is designed to intercept the newMeasure() signal emitted by a Control Network whenever a measure is added to one of it's Control Points.
It grabs the parent Control Point of the Measure and decrements the pointMeasureCount QMap at the old measure count for the Control Point and increments the pointMeasureCount at the new measure count for the Control Point to reflect the addition of this measure.
This does not modify any counters based on the measures in the point because separate measureDeleted signals will be emitted by the ControlNet. addPoint does add modify counters based on measures because ControlNet does not emit separate measureAdded signals for efficiency reasons.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
References emitHistoryEntry(), and validate().
Referenced by ControlNetVitals().
|
slot |
This SLOT is designed to intercept the newPoint() signal emitted from a ControlNetwork whenever a new point has been added.
It observes the Control Point and increments the appropriate internal counters to reflect the addition of this new point.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
Unlike deletePoint(), this method does modify counters based on measures because the ControlNet does not emit separate measureAdded signals for efficiency reasons.
point | The ControlPoint being added to the network. |
References emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlNet::GetNumMeasures(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), Isis::ControlPoint::IsEditLocked(), Isis::ControlPoint::IsIgnored(), and validate().
Referenced by ControlNetVitals(), and initializeVitals().
|
slot |
This SLOT is designed to intercept the measureRemoved() signal emitted by a Control Network whenever a Control Measure is deleted.
It observes the to-be deleted point and decrements the appropriate internal counters to reflect the removal of this Control Measure.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
References emitHistoryEntry(), and validate().
Referenced by ControlNetVitals().
|
slot |
This SLOT is designed to intercept the removePoint() signal emitted by a Control Network whenever a point is deleted.
It observes the to-be deleted point and decrements the appropriate internal counters to reflect the removal of this point.
This does not modify any counters based on the measures in the point because separate measureDeleted signals will be emitted by the ControlNet. addPoint does add modify counters based on measures because ControlNet does not emit separate measureAdded signals for efficiency reasons.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
References emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), Isis::ControlPoint::IsEditLocked(), Isis::ControlPoint::IsIgnored(), and validate().
Referenced by ControlNetVitals().
void Isis::ControlNetVitals::emitHistoryEntry | ( | QString | entry, |
QString | id, | ||
QVariant | oldValue, | ||
QVariant | newValue ) |
This method is designed to be called whenever a modification is made to the network, or any of it's control points or measures.
It receives all of the components that make up the history entry (the comment, the ID of what was modified, oldValue, newValue) and emits them along with a timestamp of when the modification was made.
The historyEntry() will pass these values on to the listening SLOT in the health monitor widget so that it can be displayed in the history table.
entry | The history comment that includes what modification was made. |
id | The ID of the object modified. This can be a point id, measure serial, or net id. |
oldValue | The oldValue the object had before the modification. |
newValue | The newValue the object had after its modification. |
References historyEntry(), and Isis::toString().
Referenced by addMeasure(), addPoint(), deleteMeasure(), deletePoint(), measureModified(), pointModified(), and validateNetwork().
QList< ControlPoint * > Isis::ControlNetVitals::getAllPoints | ( | ) |
This method is designed to return all points in the Control Network.
References Isis::ControlNet::GetPoints().
Referenced by Isis::ControlHealthMonitorWidget::viewPointAll().
QList< ControlPoint * > Isis::ControlNetVitals::getConstrainedPoints | ( | ) |
This method is designed to return all constrained points in the Control Network.
References Isis::ControlPoint::Constrained, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointConstrained().
QList< QString > Isis::ControlNetVitals::getCubeSerials | ( | ) |
This method is designed to return all cube serials present in the Control Network.
References Isis::ControlNet::GetCubeSerials().
Referenced by Isis::ControlHealthMonitorWidget::viewImageAll().
QList< ControlPoint * > Isis::ControlNetVitals::getFixedPoints | ( | ) |
This method is designed to return all fixed points in the Control Network.
References Isis::ControlPoint::Fixed, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointFixed().
QList< ControlPoint * > Isis::ControlNetVitals::getFreePoints | ( | ) |
This method is designed to return all free points in the Control Network.
References Isis::ControlPoint::Free, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointFree().
QList< ControlPoint * > Isis::ControlNetVitals::getIgnoredPoints | ( | ) |
This method is designed to return all ignored points in the Control Network.
References Isis::ControlNet::GetPoints(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointIgnored().
QList< QString > Isis::ControlNetVitals::getImagesBelowHullTolerance | ( | int | num = 75 | ) |
This method is designed to return a QList containing cube serials for all images that fall below a convex hull tolerance threshold.
For instance, a tolerance of .75 would return all images with a hull tolerance less than 75%.
num | The hull tolerance (decimal percent) an image needs to meet the threshold. |
Referenced by Isis::ControlHealthMonitorWidget::viewImageHullTolerance().
QList< QString > Isis::ControlNetVitals::getImagesBelowMeasureThreshold | ( | int | num = 3 | ) |
This method is designed to return a QList containing cube serials for all images that fall below a measure threshold.
For instance, a measure threshold of 3 would return all images with less than 3 measures.
num | The number of measures an image needs to have to meet the threshold. |
References Isis::ControlNet::GetCubeSerials(), and Isis::ControlNet::GetValidMeasuresInCube().
Referenced by Isis::ControlHealthMonitorWidget::viewImageFewMeasures().
QList< ControlPoint * > Isis::ControlNetVitals::getLockedPoints | ( | ) |
This method is designed to return all edit locked points in the Control Network.
References Isis::ControlNet::GetPoints(), Isis::ControlPoint::IsEditLocked(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointEditLocked().
QString Isis::ControlNetVitals::getNetworkId | ( | ) |
This method is designed to return networkId of the observed Control Network.
It is a wrapper for the ControlNet::GetNetworkId() call of the observed Control Network.
References Isis::ControlNet::GetNetworkId().
Referenced by Isis::ControlHealthMonitorWidget::update().
ControlPoint * Isis::ControlNetVitals::getPoint | ( | QString | id | ) |
This method is designed to return the Control Point with the associated point id from the Control Network.
id | The Point ID of the control point to be fetched. |
References Isis::ControlNet::GetPoint().
Referenced by Isis::ControlHealthMonitorWidget::emitOpenPointEditor().
QList< ControlPoint * > Isis::ControlNetVitals::getPointsBelowMeasureThreshold | ( | int | num = 3 | ) |
This method is designed to return all points that fall below a measure threshold.
For instance, a measure threshold of 3 would return all points with less than 3 measures.
num | The number of measures a point needs to have to meet the threshold. |
References Isis::ControlPoint::GetNumMeasures(), Isis::ControlNet::GetPoints(), and Isis::ControlPoint::IsIgnored().
Referenced by Isis::ControlHealthMonitorWidget::viewPointFewMeasures().
QString Isis::ControlNetVitals::getStatus | ( | ) |
This method is designed to return the current status of the network.
The possible values are "Healthy!", "Weak!", "Broken!"
Referenced by Isis::ControlHealthMonitorWidget::update().
QString Isis::ControlNetVitals::getStatusDetails | ( | ) |
This method is designed to return details for the status of the network.
This QString could contain several details if the status is weak, if more than one factor contribute to the weakness of the network. Details are separated by newline '
' in the QString.
Referenced by Isis::ControlHealthMonitorWidget::update().
bool Isis::ControlNetVitals::hasIslands | ( | ) |
This method is designed to return true if islands exist in the ControlNet Graph and False otherwise.
References numIslands().
Referenced by validate().
|
signal |
Referenced by emitHistoryEntry(), measureModified(), pointModified(), and validateNetwork().
void Isis::ControlNetVitals::initializeVitals | ( | ) |
This will initialize all necessary values and set up the point measure and image measure QMaps appropriately.
References addPoint(), Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, Isis::ControlPoint::Free, Isis::ControlNet::GetCubeSerials(), Isis::ControlNet::GetNumberOfValidMeasuresInImage(), Isis::ControlNet::GetNumMeasures(), Isis::ControlNet::GetPoints(), and Isis::ControlNet::GetSerialConnections().
Referenced by ControlNetVitals(), and validateNetwork().
|
slot |
This SLOT is designed to intercept the measureModified() signal emitted by a Control Network whenever a measure is modified in one of it's Control Points.
This SLOT receives the ControlMeasure that was modified, as well with the ControlMeasure::ModType enum indicating what type of modification was made to the Control Measure. The appropriate methods are called depending on which modification was made.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
point | The Control Measure that was modified in the observed Control Network. |
type | The type of modification that was made to the Control Measure. |
oldValue | The old value (if any) of whatever modification was made to the Control Measure. |
newValue | The new value (if any) of whatever modification was made to the Control Measure. |
References emitHistoryEntry(), historyEntry(), Isis::ControlMeasure::IgnoredModified, and validate().
Referenced by ControlNetVitals().
|
signal |
Referenced by validate().
int Isis::ControlNetVitals::numConstrainedPoints | ( | ) |
This method is designed to return the number of constrained points in the Control Network.
References Isis::ControlPoint::Constrained.
Referenced by Isis::ControlHealthMonitorWidget::update(), and Isis::ControlHealthMonitorWidget::viewPointConstrained().
int Isis::ControlNetVitals::numFixedPoints | ( | ) |
This method is designed to return the number of fixed points in the Control Network.
References Isis::ControlPoint::Fixed.
Referenced by Isis::ControlHealthMonitorWidget::update(), and Isis::ControlHealthMonitorWidget::viewPointFixed().
int Isis::ControlNetVitals::numFreePoints | ( | ) |
This method is designed to return the number of free points in the Control Network.
References Isis::ControlPoint::Free.
Referenced by Isis::ControlHealthMonitorWidget::update(), and Isis::ControlHealthMonitorWidget::viewPointFree().
int Isis::ControlNetVitals::numIgnoredPoints | ( | ) |
This method is designed to return the number of ignored points in the Control Network.
Referenced by Isis::ControlHealthMonitorWidget::update(), and Isis::ControlHealthMonitorWidget::viewPointIgnored().
int Isis::ControlNetVitals::numImages | ( | ) |
This method is designed to return the number of images in the Control Network.
References Isis::ControlNet::GetCubeSerials().
Referenced by Isis::ControlHealthMonitorWidget::update(), Isis::ControlHealthMonitorWidget::viewImageAll(), Isis::ControlHealthMonitorWidget::viewImageFewMeasures(), and Isis::ControlHealthMonitorWidget::viewImageHullTolerance().
int Isis::ControlNetVitals::numImagesBelowHullTolerance | ( | int | tolerance = 75 | ) |
This method is designed to return the number of images that fall below a hull tolerance.
For instance, a tolerance of .75 would return all images with a hull tolerance of < 75%.
num | The number of measures an image needs to have to meet the threshold. |
Referenced by Isis::ControlHealthMonitorWidget::update(), validate(), and Isis::ControlHealthMonitorWidget::viewImageHullTolerance().
int Isis::ControlNetVitals::numImagesBelowMeasureThreshold | ( | int | num = 3 | ) |
This method is designed to return the number of images that fall below a measure threshold.
For instance, a measure threshold of 3 would return all images with less than 3 measures.
num | The number of measures an image needs to have to meet the threshold. |
Referenced by Isis::ControlHealthMonitorWidget::update(), validate(), and Isis::ControlHealthMonitorWidget::viewImageFewMeasures().
int Isis::ControlNetVitals::numIslands | ( | ) |
This method is designed to return the number of islands that exist in the ControlNet Graph.
Referenced by hasIslands(), and validate().
int Isis::ControlNetVitals::numLockedPoints | ( | ) |
This method is designed to return the number of edit locked points in the Control Network.
Referenced by Isis::ControlHealthMonitorWidget::update(), and Isis::ControlHealthMonitorWidget::viewPointEditLocked().
int Isis::ControlNetVitals::numMeasures | ( | ) |
This method is designed to return the number of measures in the Control Network.
Referenced by Isis::ControlHealthMonitorWidget::update().
int Isis::ControlNetVitals::numPoints | ( | ) |
This method is designed to return the number of points in the Control Network.
Referenced by Isis::ControlHealthMonitorWidget::update(), Isis::ControlHealthMonitorWidget::viewPointAll(), Isis::ControlHealthMonitorWidget::viewPointConstrained(), Isis::ControlHealthMonitorWidget::viewPointEditLocked(), Isis::ControlHealthMonitorWidget::viewPointFewMeasures(), Isis::ControlHealthMonitorWidget::viewPointFixed(), Isis::ControlHealthMonitorWidget::viewPointFree(), and Isis::ControlHealthMonitorWidget::viewPointIgnored().
int Isis::ControlNetVitals::numPointsBelowMeasureThreshold | ( | int | num = 3 | ) |
This method is designed to return the number of points that fall below a measure threshold.
For instance, a measure threshold of 3 would return all points with less than 3 measures.
num | The number of measures a point needs to have to meet the threshold. |
Referenced by Isis::ControlHealthMonitorWidget::update(), validate(), and Isis::ControlHealthMonitorWidget::viewPointFewMeasures().
|
slot |
This SLOT is designed to receive a signal emitted from the Control Network whenever a modification is made to a Control Point.
This SLOT receives the ControlPoint that was modified, as well with the ControlPoint::ModType enum indicating what type of modification was made to the Control Point.
We then increment or decrement the appropriate internal counters based on which type of modification was made to the Control Point.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
point | The Control Point that was modified in the observed Control Network. |
type | The type of modification that was made to the Control Point. |
oldValue | The old value (if any) of whatever modification was made to the Control Point. |
newValue | The new value (if any) of whatever modification was made to the Control Point. |
References Isis::ControlPoint::EditLockModified, emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), historyEntry(), Isis::ControlPoint::IgnoredModified, Isis::ControlPoint::IsEditLocked(), Isis::ControlPoint::PointTypeToString(), Isis::ControlPoint::TypeModified, and validate().
Referenced by ControlNetVitals().
|
slot |
This method is designed to evaluate the current vitals of the network to determine if any weaknesses are present and update the status of the network.
The network status is split into 3 states: Healthy, Weak, and Broken.
Healthy - A network is healthy if there are no weaknesses found and it is not broken. Weak - A network is weak if it has points that fall below the measure threshold, A network is weak if it has images that fall below the measure threshold, A network is weak if it has images that fall below a Convex Hull tolerance. Broken - A network is broken if it has more than 1 island.
References hasIslands(), networkChanged(), numImagesBelowHullTolerance(), numImagesBelowMeasureThreshold(), numIslands(), numPointsBelowMeasureThreshold(), and Isis::toString().
Referenced by addMeasure(), addPoint(), ControlNetVitals(), deleteMeasure(), deletePoint(), measureModified(), pointModified(), and validateNetwork().
|
slot |
This SLOT is designed to intercept the networkModified() signal emitted by a Control Network whenever a modification is made to the network.
This SLOT receives the ControlNet::ModType enum indicating what type of modication was made to the Control Network. It then acts based on what type of change was made.
Once complete, we then call the validate() method to re-validate the status and details of the Control Network.
point | The type of modification that was made to the observed Control Network. |
References emitHistoryEntry(), Isis::ControlNet::GetNetworkId(), Isis::ControlNet::GetSerialConnections(), Isis::ControlNet::GraphModified, historyEntry(), initializeVitals(), Isis::ControlNet::Swapped, and validate().
Referenced by ControlNetVitals().