Loading isis/src/base/objs/Target/Target.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ namespace Isis { else { throw IException(e, IException::Unknown, "BODY_FRAME_CODE not found for this Target.", "BODY_CODE not found for this Target.", _FILEINFO_); } } Loading isis/src/control/objs/ControlNet/ControlNet.cpp +15 −5 Original line number Diff line number Diff line Loading @@ -238,14 +238,24 @@ namespace Isis { * parent prematurely to be able to set the radii * in ControlPoint. * @history 2017-12-21 Jesse Mapel - Modified to use the ControlNetVersioner. * * @history 2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii * group to set radii values to those ingested from the versioner * if they exist. Otherwise, we call SetTarget with the targetname. */ void ControlNet::ReadControl(const QString &filename, Progress *progress) { FileName cnetFileName(filename); ControlNetVersioner versionedReader(cnetFileName, progress); if ( versionedReader.hasTargetRadii() ) { p_targetName = versionedReader.targetName(); p_targetRadii.clear(); foreach (Distance distance, versionedReader.targetRadii()) { p_targetRadii.push_back(distance); } } else { SetTarget( versionedReader.targetName() ); } p_networkId = versionedReader.netId(); p_userName = versionedReader.userName(); p_created = versionedReader.creationDate(); Loading isis/src/control/objs/ControlNet/ControlNet.h +5 −1 Original line number Diff line number Diff line Loading @@ -213,6 +213,10 @@ namespace Isis { * image. Previously, this had to be done throug the graph. * @history 2018-01-26 Kristin Berry - Added pointAdded() function to eliminate redundant measure * adds to the control network. * @history 2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii * group to set radii values to those ingested from the versioner * if they exist. Otherwise, we call SetTarget with the targetname. * Fixes #5361. */ class ControlNet : public QObject { Q_OBJECT Loading isis/src/control/objs/ControlNet/ControlNet.truth +1 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ Object = ControlNetwork Created = 2010-07-10T12:50:15 LastModified = 2010-07-10T12:50:55 Description = "UnitTest of ControlNetwork" TargetRadii = (3396190.0, 3396190.0, 3376200.0) Version = 5 Object = ControlPoint Loading isis/src/control/objs/ControlNetVersioner/ControlNetFileHeaderV0005.proto +2 −2 Original line number Diff line number Diff line Loading @@ -10,5 +10,5 @@ message ControlNetFileHeaderV0005 { optional string description = 5; optional string userName = 6; optional int32 numPoints = 7; repeated double targetRadii = 10; } Loading
isis/src/base/objs/Target/Target.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ namespace Isis { else { throw IException(e, IException::Unknown, "BODY_FRAME_CODE not found for this Target.", "BODY_CODE not found for this Target.", _FILEINFO_); } } Loading
isis/src/control/objs/ControlNet/ControlNet.cpp +15 −5 Original line number Diff line number Diff line Loading @@ -238,14 +238,24 @@ namespace Isis { * parent prematurely to be able to set the radii * in ControlPoint. * @history 2017-12-21 Jesse Mapel - Modified to use the ControlNetVersioner. * * @history 2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii * group to set radii values to those ingested from the versioner * if they exist. Otherwise, we call SetTarget with the targetname. */ void ControlNet::ReadControl(const QString &filename, Progress *progress) { FileName cnetFileName(filename); ControlNetVersioner versionedReader(cnetFileName, progress); if ( versionedReader.hasTargetRadii() ) { p_targetName = versionedReader.targetName(); p_targetRadii.clear(); foreach (Distance distance, versionedReader.targetRadii()) { p_targetRadii.push_back(distance); } } else { SetTarget( versionedReader.targetName() ); } p_networkId = versionedReader.netId(); p_userName = versionedReader.userName(); p_created = versionedReader.creationDate(); Loading
isis/src/control/objs/ControlNet/ControlNet.h +5 −1 Original line number Diff line number Diff line Loading @@ -213,6 +213,10 @@ namespace Isis { * image. Previously, this had to be done throug the graph. * @history 2018-01-26 Kristin Berry - Added pointAdded() function to eliminate redundant measure * adds to the control network. * @history 2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii * group to set radii values to those ingested from the versioner * if they exist. Otherwise, we call SetTarget with the targetname. * Fixes #5361. */ class ControlNet : public QObject { Q_OBJECT Loading
isis/src/control/objs/ControlNet/ControlNet.truth +1 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ Object = ControlNetwork Created = 2010-07-10T12:50:15 LastModified = 2010-07-10T12:50:55 Description = "UnitTest of ControlNetwork" TargetRadii = (3396190.0, 3396190.0, 3376200.0) Version = 5 Object = ControlPoint Loading
isis/src/control/objs/ControlNetVersioner/ControlNetFileHeaderV0005.proto +2 −2 Original line number Diff line number Diff line Loading @@ -10,5 +10,5 @@ message ControlNetFileHeaderV0005 { optional string description = 5; optional string userName = 6; optional int32 numPoints = 7; repeated double targetRadii = 10; }