MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / ReadControl

Method ReadControl

isis/src/control/objs/ControlNet/ControlNet.cpp:269–294  ·  view source on GitHub ↗

* Reads in the control points from the given file * * @param ptfile Name of file containing a Pvl list of control points * @param progress A pointer to the progress of reading in the control points * * @throws Isis::iException::User - "Invalid Network Type" * @throws Isis::iException::User - "Invalid Control Point" * @throws Isis::iException::User - "Invalid Format" * *

Source from the content-addressed store, hash-verified

267 * if they exist. Otherwise, we call SetTarget with the targetname.
268 */
269 void ControlNet::ReadControl(const QString &filename, Progress *progress) {
270
271 FileName cnetFileName(filename);
272 ControlNetVersioner versionedReader(cnetFileName, progress);
273 SetTarget( versionedReader.targetName() );
274 p_networkId = versionedReader.netId();
275 p_userName = versionedReader.userName();
276 p_created = versionedReader.creationDate();
277 p_modified = versionedReader.lastModificationDate();
278 p_description = versionedReader.description();
279
280 int numPoints = versionedReader.numPoints();
281
282 if (progress) {
283 progress->SetText("Adding Control Points to Network...");
284 progress->SetMaximumSteps(numPoints);
285 progress->CheckStatus();
286 }
287
288 for (int i = 0; i < numPoints; i++) {
289 AddPoint( versionedReader.takeFirstPoint() );
290 if (progress) {
291 progress->CheckStatus();
292 }
293 }
294 }
295
296
297 /**

Callers 7

mainFunction · 0.80
cnetbin2pvlFunction · 0.80
cnetpvl2binFunction · 0.80
operator()Method · 0.80
TEST_FFunction · 0.80
SetUpMethod · 0.80
TEST_FFunction · 0.80

Calls 11

netIdMethod · 0.80
creationDateMethod · 0.80
lastModificationDateMethod · 0.80
SetTextMethod · 0.80
SetMaximumStepsMethod · 0.80
CheckStatusMethod · 0.80
takeFirstPointMethod · 0.80
targetNameMethod · 0.45
userNameMethod · 0.45
descriptionMethod · 0.45
numPointsMethod · 0.45

Tested by 4

mainFunction · 0.64
TEST_FFunction · 0.64
SetUpMethod · 0.64
TEST_FFunction · 0.64