Isis 3 Programmer Reference
Isis::ControlNetVitals Class Reference

ControlNetVitals. More...

#include <ControlNetVitals.h>

Inheritance diagram for Isis::ControlNetVitals:
Inheritance graph
Collaboration diagram for Isis::ControlNetVitals:
Collaboration graph

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. More...
 
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. More...
 
void addPoint (ControlPoint *)
 This SLOT is designed to intercept the newPoint() signal emitted from a ControlNetwork whenever a new point has been added. More...
 
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. More...
 
void deletePoint (ControlPoint *)
 This SLOT is designed to intercept the removePoint() signal emitted by a Control Network whenever a point is deleted. More...
 
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. More...
 
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. More...
 
void deleteMeasure (ControlMeasure *)
 This SLOT is designed to intercept the measureRemoved() signal emitted by a Control Network whenever a Control Measure is deleted. More...
 

Signals

void networkChanged ()
 
void historyEntry (QString, QString, QVariant, QVariant, QString)
 

Public Member Functions

 ControlNetVitals (ControlNet *net)
 Constructs a ControlNetVitals object from a ControlNet. More...
 
virtual ~ControlNetVitals ()
 De-constructor. More...
 
void initializeVitals ()
 This will initialize all necessary values and set up the point measure and image measure QMaps appropriately. More...
 
bool hasIslands ()
 This method is designed to return true if islands exist in the ControlNet Graph and False otherwise. More...
 
int numIslands ()
 This method is designed to return the number of islands that exist in the ControlNet Graph. More...
 
const QList< QList< QString > > & getIslands ()
 This method is designed to return a QList containing each island present in the ControlNet. More...
 
ControlPointgetPoint (QString id)
 This method is designed to return the Control Point with the associated point id from the Control Network. More...
 
int numPoints ()
 This method is designed to return the number of points in the Control Network. More...
 
int numIgnoredPoints ()
 This method is designed to return the number of ignored points in the Control Network. More...
 
int numLockedPoints ()
 This method is designed to return the number of edit locked points in the Control Network. More...
 
int numFixedPoints ()
 This method is designed to return the number of fixed points in the Control Network. More...
 
int numConstrainedPoints ()
 This method is designed to return the number of constrained points in the Control Network. More...
 
int numFreePoints ()
 This method is designed to return the number of free points in the Control Network. More...
 
int numPointsBelowMeasureThreshold (int num=3)
 This method is designed to return the number of points that fall below a measure threshold. More...
 
int numImages ()
 This method is designed to return the number of images in the Control Network. More...
 
int numMeasures ()
 This method is designed to return the number of measures in the Control Network. More...
 
int numImagesBelowMeasureThreshold (int num=3)
 This method is designed to return the number of images that fall below a measure threshold. More...
 
int numImagesBelowHullTolerance (int tolerance=75)
 This method is designed to return the number of images that fall below a hull tolerance. More...
 
QList< QString > getCubeSerials ()
 This method is designed to return all cube serials present in the Control Network. More...
 
QList< ControlPoint * > getAllPoints ()
 This method is designed to return all points in the Control Network. More...
 
QList< ControlPoint * > getIgnoredPoints ()
 This method is designed to return all ignored points in the Control Network. More...
 
QList< ControlPoint * > getLockedPoints ()
 This method is designed to return all edit locked points in the Control Network. More...
 
QList< ControlPoint * > getFixedPoints ()
 This method is designed to return all fixed points in the Control Network. More...
 
QList< ControlPoint * > getConstrainedPoints ()
 This method is designed to return all constrained points in the Control Network. More...
 
QList< ControlPoint * > getFreePoints ()
 This method is designed to return all free points in the Control Network. More...
 
QList< ControlPoint * > getPointsBelowMeasureThreshold (int num=3)
 This method is designed to return all points that fall below a measure threshold. More...
 
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. More...
 
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. More...
 
QString getNetworkId ()
 This method is designed to return networkId of the observed Control Network. More...
 
QString getStatus ()
 This method is designed to return the current status of the network. More...
 
QString getStatusDetails ()
 This method is designed to return details for the status of the network. More...
 
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. More...
 

Private Member Functions

void addMeasureToCounts (ControlMeasure *measure)
 Add a measure to the internal counters. More...
 
void removeMeasureFromCounts (ControlMeasure *measure)
 Remove a measure from the internal counters. More...
 

Private Attributes

ControlNetm_controlNet
 The Control Network that the vitals class is observing. More...
 
QString m_status
 The string representing the status of the net. Healthy, Weak, or Broken. More...
 
QString m_statusDetails
 The string providing details into the status of the network. More...
 
QList< QList< QString > > m_islandList
 A QList containing every island in the net. Each island consists of a QList containing All cube serials for that island. More...
 
QMap< int, int > m_pointMeasureCounts
 The measureCount maps track how many points/images have how many measures. For instance, if I wanted to know how many points have 3 measures I would query the m_pointMeasureCounts with a key of 3 and it would return how many points have 3 measures. More...
 
QMap< int, int > m_imageMeasureCounts
 The same is true for imageMeasureCounts, except for images. More...
 
QMap< ControlPoint::PointType, int > m_pointTypeCounts
 The pointTypeCounts operates in the same fashion as the above two, except that the key would be the ControlPoint::PointType you're searching for. For instance, if I wanted to know how many points were fixed I would query This map at key ControlPoint::Fixed and it would return how many fixed points there are. More...
 
int m_numPoints
 The number of points in the network. More...
 
int m_numPointsIgnored
 The number of ignored points in the network. More...
 
int m_numPointsLocked
 The number of edit locked points in the network. More...
 
int m_numMeasures
 The number of measures in the network. More...
 

Detailed Description

ControlNetVitals.

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.

Author
2018-05-28 Adam Goins
History:

2018-05-28 Adam Goins - Initial Creation.

2018-06-14 Adam Goins & Jesse Maple - Refactored method calls and Signal/Slot usage.

2018-06-15 Adam Goins - Added documentation.

2018-06-25 Kristin Berry - Fixed problem with getImagesBelowMeasureThreshold().size() not matching numImagesBelowMeasureThreshold(). Fixed a similar problem with numPointsBelowMeasureThreshold().

2018-07-03 Jesse Mapel - Fixed deleting control points not properly updating the point counters.

Definition at line 65 of file ControlNetVitals.h.

Constructor & Destructor Documentation

◆ ControlNetVitals()

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.

Parameters
cnetThe Control Network that we will be tracking vitals for.

Definition at line 24 of file ControlNetVitals.cpp.

References addMeasure(), addPoint(), deleteMeasure(), deletePoint(), initializeVitals(), m_controlNet, measureModified(), pointModified(), validate(), and validateNetwork().

◆ ~ControlNetVitals()

Isis::ControlNetVitals::~ControlNetVitals ( )
virtual

De-constructor.

Definition at line 503 of file ControlNetVitals.cpp.

Member Function Documentation

◆ addMeasure

void Isis::ControlNetVitals::addMeasure ( ControlMeasure measure)
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.

Parameters
measureThe Control Measure being added to a Control Point in the network.

Definition at line 319 of file ControlNetVitals.cpp.

References addMeasureToCounts(), emitHistoryEntry(), Isis::ControlMeasure::GetCubeSerialNumber(), m_numMeasures, and validate().

Referenced by ControlNetVitals().

◆ addMeasureToCounts()

void Isis::ControlNetVitals::addMeasureToCounts ( ControlMeasure measure)
private

◆ addPoint

void Isis::ControlNetVitals::addPoint ( ControlPoint point)
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.

Parameters
pointThe ControlPoint being added to the network.

Definition at line 121 of file ControlNetVitals.cpp.

References emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlNet::GetNumMeasures(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), m_controlNet, m_numMeasures, m_numPoints, m_numPointsIgnored, m_numPointsLocked, m_pointMeasureCounts, m_pointTypeCounts, and validate().

Referenced by ControlNetVitals(), and initializeVitals().

◆ deleteMeasure

void Isis::ControlNetVitals::deleteMeasure ( ControlMeasure measure)
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.

Parameters
pointThe Control Measure being deleted from a Control Point in the Control Network.

Definition at line 382 of file ControlNetVitals.cpp.

References emitHistoryEntry(), Isis::ControlMeasure::GetCubeSerialNumber(), m_numMeasures, removeMeasureFromCounts(), and validate().

Referenced by ControlNetVitals().

◆ deletePoint

void Isis::ControlNetVitals::deletePoint ( ControlPoint point)
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.

Parameters
pointThe Control Point being deleted from the Control Network.

Definition at line 277 of file ControlNetVitals.cpp.

References emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), m_numPoints, m_numPointsIgnored, m_numPointsLocked, m_pointMeasureCounts, m_pointTypeCounts, and validate().

Referenced by ControlNetVitals().

◆ emitHistoryEntry()

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.

Parameters
entryThe history comment that includes what modification was made.
idThe ID of the object modified. This can be a point id, measure serial, or net id.
oldValueThe oldValue the object had before the modification.
newValueThe newValue the object had after its modification.

Definition at line 102 of file ControlNetVitals.cpp.

References Isis::toString().

Referenced by addMeasure(), addPoint(), deleteMeasure(), deletePoint(), measureModified(), pointModified(), and validateNetwork().

◆ getAllPoints()

QList< ControlPoint * > Isis::ControlNetVitals::getAllPoints ( )

This method is designed to return all points in the Control Network.

Returns
A QList<ControlPoint*> containing all points in the Control Network.

Definition at line 697 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetPoints(), and m_controlNet.

◆ getConstrainedPoints()

QList< ControlPoint * > Isis::ControlNetVitals::getConstrainedPoints ( )

This method is designed to return all constrained points in the Control Network.

Returns
A QList<ControlPoint*> containing all constrained points in the Control Network.

Definition at line 749 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Constrained, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and m_controlNet.

◆ getCubeSerials()

QList< QString > Isis::ControlNetVitals::getCubeSerials ( )

This method is designed to return all cube serials present in the Control Network.

Returns
A QList<QString> containing all cube serials in the Control Network.

Definition at line 687 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetCubeSerials(), and m_controlNet.

◆ getFixedPoints()

QList< ControlPoint * > Isis::ControlNetVitals::getFixedPoints ( )

This method is designed to return all fixed points in the Control Network.

Returns
A QList<ControlPoint*> containing all fixed points in the Control Network.

Definition at line 735 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Fixed, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and m_controlNet.

◆ getFreePoints()

QList< ControlPoint * > Isis::ControlNetVitals::getFreePoints ( )

This method is designed to return all free points in the Control Network.

Returns
A QList<ControlPoint*> containing all free points in the Control Network.

Definition at line 763 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Free, Isis::ControlNet::GetPoints(), Isis::ControlPoint::GetType(), and m_controlNet.

◆ getIgnoredPoints()

QList< ControlPoint * > Isis::ControlNetVitals::getIgnoredPoints ( )

This method is designed to return all ignored points in the Control Network.

Returns
A QList<ControlPoint*> containing all ignored points in the Control Network.

Definition at line 707 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetPoints(), and m_controlNet.

◆ getImagesBelowHullTolerance()

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%.

Parameters
numThe hull tolerance (decimal percent) an image needs to meet the threshold.
Returns
A QList<QString> containing all images with a hull tolerance below the threshold.

Definition at line 818 of file ControlNetVitals.cpp.

◆ getImagesBelowMeasureThreshold()

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.

Parameters
numThe number of measures an image needs to have to meet the threshold.
Returns
A QList<QString> containing all images with number of measures less than the threshold.

Definition at line 798 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetCubeSerials(), Isis::ControlNet::GetValidMeasuresInCube(), and m_controlNet.

◆ getIslands()

const QList< QList< QString > > & Isis::ControlNetVitals::getIslands ( )

This method is designed to return a QList containing each island present in the ControlNet.

Each island is composed of another QList containing the cube serials for all cubes in that island.

Returns
A QList containing a QList of cube serials for each island present in the Control Net.

Definition at line 536 of file ControlNetVitals.cpp.

References m_islandList.

◆ getLockedPoints()

QList< ControlPoint * > Isis::ControlNetVitals::getLockedPoints ( )

This method is designed to return all edit locked points in the Control Network.

Returns
A QList<ControlPoint*> containing all edit locked points in the Control Network.

Definition at line 721 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetPoints(), and m_controlNet.

◆ getNetworkId()

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.

Returns
A QString containing the NetworkId of the Control Network.

Definition at line 857 of file ControlNetVitals.cpp.

References m_controlNet.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ getPoint()

ControlPoint * Isis::ControlNetVitals::getPoint ( QString  id)

This method is designed to return the Control Point with the associated point id from the Control Network.

Parameters
idThe Point ID of the control point to be fetched.
Returns
The Control Point with the associated point id.

Definition at line 257 of file ControlNetVitals.cpp.

References m_controlNet.

Referenced by Isis::ControlHealthMonitorWidget::emitOpenPointEditor().

◆ getPointsBelowMeasureThreshold()

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.

Parameters
numThe number of measures a point needs to have to meet the threshold.
Returns
All of points with number of measures less than the threshold.

Definition at line 780 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetPoints(), and m_controlNet.

◆ getStatus()

QString Isis::ControlNetVitals::getStatus ( )

This method is designed to return the current status of the network.

The possible values are "Healthy!", "Weak!", "Broken!"

Returns
A QString indicating the status of the Control Network.

Definition at line 831 of file ControlNetVitals.cpp.

References m_status.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ getStatusDetails()

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.

Returns
A QString containing details for the status of the Control Network.

Definition at line 845 of file ControlNetVitals.cpp.

References m_statusDetails.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ hasIslands()

bool Isis::ControlNetVitals::hasIslands ( )

This method is designed to return true if islands exist in the ControlNet Graph and False otherwise.

Returns
True if islands exist, False otherwise.

Definition at line 513 of file ControlNetVitals.cpp.

References numIslands().

Referenced by validate().

◆ initializeVitals()

◆ measureModified

void Isis::ControlNetVitals::measureModified ( ControlMeasure measure,
ControlMeasure::ModType  type,
QVariant  oldValue,
QVariant  newValue 
)
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.

Parameters
pointThe Control Measure that was modified in the observed Control Network.
typeThe type of modification that was made to the Control Measure.
oldValueThe old value (if any) of whatever modification was made to the Control Measure.
newValueThe new value (if any) of whatever modification was made to the Control Measure.

Definition at line 345 of file ControlNetVitals.cpp.

References addMeasureToCounts(), emitHistoryEntry(), Isis::ControlMeasure::GetCubeSerialNumber(), removeMeasureFromCounts(), and validate().

Referenced by ControlNetVitals().

◆ numConstrainedPoints()

int Isis::ControlNetVitals::numConstrainedPoints ( )

This method is designed to return the number of constrained points in the Control Network.

Returns
The number of constrained points in the Control Network.

Definition at line 586 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Constrained, and m_pointTypeCounts.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numFixedPoints()

int Isis::ControlNetVitals::numFixedPoints ( )

This method is designed to return the number of fixed points in the Control Network.

Returns
The number of fixed points in the Control Network.

Definition at line 576 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Fixed, and m_pointTypeCounts.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numFreePoints()

int Isis::ControlNetVitals::numFreePoints ( )

This method is designed to return the number of free points in the Control Network.

Returns
The number of free points in the Control Network.

Definition at line 596 of file ControlNetVitals.cpp.

References Isis::ControlPoint::Free, and m_pointTypeCounts.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numIgnoredPoints()

int Isis::ControlNetVitals::numIgnoredPoints ( )

This method is designed to return the number of ignored points in the Control Network.

Returns
The number of ignored points in the Control Network.

Definition at line 556 of file ControlNetVitals.cpp.

References m_numPointsIgnored.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numImages()

int Isis::ControlNetVitals::numImages ( )

This method is designed to return the number of images in the Control Network.

Returns
The number of images in the Control Network.

Definition at line 630 of file ControlNetVitals.cpp.

References Isis::ControlNet::GetCubeSerials(), and m_controlNet.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numImagesBelowHullTolerance()

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%.

Parameters
numThe number of measures an image needs to have to meet the threshold.
Returns
The number of images with number of measures less than the threshold.

Definition at line 677 of file ControlNetVitals.cpp.

Referenced by Isis::ControlHealthMonitorWidget::update(), and validate().

◆ numImagesBelowMeasureThreshold()

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.

Parameters
numThe number of measures an image needs to have to meet the threshold.
Returns
The number of images with number of measures less than the threshold.

Definition at line 653 of file ControlNetVitals.cpp.

References m_imageMeasureCounts.

Referenced by Isis::ControlHealthMonitorWidget::update(), and validate().

◆ numIslands()

int Isis::ControlNetVitals::numIslands ( )

This method is designed to return the number of islands that exist in the ControlNet Graph.

Returns
The number of islands present in the ControlNet Graph.

Definition at line 524 of file ControlNetVitals.cpp.

References m_islandList.

Referenced by hasIslands(), and validate().

◆ numLockedPoints()

int Isis::ControlNetVitals::numLockedPoints ( )

This method is designed to return the number of edit locked points in the Control Network.

Returns
The number of edit locked points in the Control Network.

Definition at line 566 of file ControlNetVitals.cpp.

References m_numPointsLocked.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numMeasures()

int Isis::ControlNetVitals::numMeasures ( )

This method is designed to return the number of measures in the Control Network.

Returns
The number of measures in the Control Network.

Definition at line 640 of file ControlNetVitals.cpp.

References m_numMeasures.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numPoints()

int Isis::ControlNetVitals::numPoints ( )

This method is designed to return the number of points in the Control Network.

Returns
The number of points in the Control Network.

Definition at line 546 of file ControlNetVitals.cpp.

References m_numPoints.

Referenced by Isis::ControlHealthMonitorWidget::update().

◆ numPointsBelowMeasureThreshold()

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.

Parameters
numThe number of measures a point needs to have to meet the threshold.
Returns
The number of points with number of measures less than the threshold.

Definition at line 609 of file ControlNetVitals.cpp.

References m_pointMeasureCounts.

Referenced by Isis::ControlHealthMonitorWidget::update(), and validate().

◆ pointModified

void Isis::ControlNetVitals::pointModified ( ControlPoint point,
ControlPoint::ModType  type,
QVariant  oldValue,
QVariant  newValue 
)
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.

Parameters
pointThe Control Point that was modified in the observed Control Network.
typeThe type of modification that was made to the Control Point.
oldValueThe old value (if any) of whatever modification was made to the Control Point.
newValueThe new value (if any) of whatever modification was made to the Control Point.

Definition at line 168 of file ControlNetVitals.cpp.

References emitHistoryEntry(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetNumValidMeasures(), Isis::ControlPoint::GetType(), m_numPointsIgnored, m_numPointsLocked, m_pointMeasureCounts, m_pointTypeCounts, Isis::ControlPoint::PointTypeToString(), and validate().

Referenced by ControlNetVitals().

◆ removeMeasureFromCounts()

void Isis::ControlNetVitals::removeMeasureFromCounts ( ControlMeasure measure)
private

Remove a measure from the internal counters.

Parameters
measureThe measure to remove

Definition at line 435 of file ControlNetVitals.cpp.

References Isis::ControlMeasure::GetCubeSerialNumber(), Isis::ControlNet::GetNumberOfValidMeasuresInImage(), Isis::ControlPoint::GetNumValidMeasures(), m_controlNet, m_imageMeasureCounts, and m_pointMeasureCounts.

Referenced by deleteMeasure(), and measureModified().

◆ validate

void Isis::ControlNetVitals::validate ( )
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.

Definition at line 874 of file ControlNetVitals.cpp.

References hasIslands(), m_status, m_statusDetails, numImagesBelowHullTolerance(), numImagesBelowMeasureThreshold(), numIslands(), numPointsBelowMeasureThreshold(), and Isis::toString().

Referenced by addMeasure(), addPoint(), ControlNetVitals(), deleteMeasure(), deletePoint(), measureModified(), pointModified(), and validateNetwork().

◆ validateNetwork

void Isis::ControlNetVitals::validateNetwork ( ControlNet::ModType  type)
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.

Parameters
pointThe type of modification that was made to the observed Control Network.

Definition at line 479 of file ControlNetVitals.cpp.

References emitHistoryEntry(), Isis::ControlNet::GetSerialConnections(), initializeVitals(), m_controlNet, m_islandList, and validate().

Referenced by ControlNetVitals().

Member Data Documentation

◆ m_controlNet

◆ m_imageMeasureCounts

QMap<int, int> Isis::ControlNetVitals::m_imageMeasureCounts
private

The same is true for imageMeasureCounts, except for images.

Definition at line 148 of file ControlNetVitals.h.

Referenced by addMeasureToCounts(), initializeVitals(), numImagesBelowMeasureThreshold(), and removeMeasureFromCounts().

◆ m_islandList

QList< QList< QString > > Isis::ControlNetVitals::m_islandList
private

A QList containing every island in the net. Each island consists of a QList containing All cube serials for that island.

Definition at line 140 of file ControlNetVitals.h.

Referenced by getIslands(), initializeVitals(), numIslands(), and validateNetwork().

◆ m_numMeasures

int Isis::ControlNetVitals::m_numMeasures
private

The number of measures in the network.

Definition at line 163 of file ControlNetVitals.h.

Referenced by addMeasure(), addPoint(), deleteMeasure(), initializeVitals(), and numMeasures().

◆ m_numPoints

int Isis::ControlNetVitals::m_numPoints
private

The number of points in the network.

Definition at line 157 of file ControlNetVitals.h.

Referenced by addPoint(), deletePoint(), initializeVitals(), and numPoints().

◆ m_numPointsIgnored

int Isis::ControlNetVitals::m_numPointsIgnored
private

The number of ignored points in the network.

Definition at line 159 of file ControlNetVitals.h.

Referenced by addPoint(), deletePoint(), initializeVitals(), numIgnoredPoints(), and pointModified().

◆ m_numPointsLocked

int Isis::ControlNetVitals::m_numPointsLocked
private

The number of edit locked points in the network.

Definition at line 161 of file ControlNetVitals.h.

Referenced by addPoint(), deletePoint(), initializeVitals(), numLockedPoints(), and pointModified().

◆ m_pointMeasureCounts

QMap<int, int> Isis::ControlNetVitals::m_pointMeasureCounts
private

The measureCount maps track how many points/images have how many measures. For instance, if I wanted to know how many points have 3 measures I would query the m_pointMeasureCounts with a key of 3 and it would return how many points have 3 measures.

Definition at line 146 of file ControlNetVitals.h.

Referenced by addMeasureToCounts(), addPoint(), deletePoint(), initializeVitals(), numPointsBelowMeasureThreshold(), pointModified(), and removeMeasureFromCounts().

◆ m_pointTypeCounts

QMap<ControlPoint::PointType, int> Isis::ControlNetVitals::m_pointTypeCounts
private

The pointTypeCounts operates in the same fashion as the above two, except that the key would be the ControlPoint::PointType you're searching for. For instance, if I wanted to know how many points were fixed I would query This map at key ControlPoint::Fixed and it would return how many fixed points there are.

Definition at line 154 of file ControlNetVitals.h.

Referenced by addPoint(), deletePoint(), initializeVitals(), numConstrainedPoints(), numFixedPoints(), numFreePoints(), and pointModified().

◆ m_status

QString Isis::ControlNetVitals::m_status
private

The string representing the status of the net. Healthy, Weak, or Broken.

Definition at line 134 of file ControlNetVitals.h.

Referenced by getStatus(), and validate().

◆ m_statusDetails

QString Isis::ControlNetVitals::m_statusDetails
private

The string providing details into the status of the network.

Definition at line 136 of file ControlNetVitals.h.

Referenced by getStatusDetails(), and validate().


The documentation for this class was generated from the following files: