* 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" * *
| 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 | /** |