Unverified Commit 411d802f authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Cnetextract App and Test Update (#4109)

* Convert cnetextract and update tests

* Adds a check for bad app inputs

* Disabled old tests

* Updated cnetextract BadInput test to be three different tests
parent a5ce95ba
Loading
Loading
Loading
Loading
+856 −0

File added.

Preview size limit exceeded, changes collapsed.

+38 −0
Original line number Diff line number Diff line
#ifndef cnetextract_h
#define cnetextract_h

#include <set>
#include <sstream>

#include <QMap>
#include <QSet>
#include <QVector>

#include "Angle.h"
#include "Camera.h"
#include "ControlMeasure.h"
#include "ControlNet.h"
#include "ControlPoint.h"
#include "Cube.h"
#include "CubeManager.h"
#include "Environment.h"
#include "FileList.h"
#include "IException.h"
#include "IString.h"
#include "Longitude.h"
#include "Latitude.h"
#include "TProjection.h"
#include "Progress.h"
#include "ProjectionFactory.h"
#include "Pvl.h"
#include "SerialNumber.h"
#include "SurfacePoint.h"
#include "UserInterface.h"

namespace Isis {
  void cnetextract(UserInterface &ui, Pvl *log);

  void cnetextract(ControlNet outNet, UserInterface &ui, Pvl *log);
}

#endif
+11 −864

File changed.

Preview size limit exceeded, changes collapsed.

+0 −34
Original line number Diff line number Diff line
# Basic cnetextract test using noignore, nosinglemeasure, and nomeasureless filters
#
# Since a prefix is given, with the given filters, this test will make the 
# following reports:
#		preIgnoredPoints.txt 
#		preIgnoredMeasures.txt 
#		preSingleMeasurePoints.txt 
#		preMeasurelessPoints.txt 
#
# The following will be extracted
#		--points that are not ignored, with at least two measures
#		for each of these points the following measures will be extracted:
#			--reference measures (ignored or not)
# 			--non-ignored measures
APPNAME = cnetextract

include $(ISISROOT)/make/isismake.tsts

commands:
	$(LS) $(INPUT)/*.cub > $(OUTPUT)/list.lis;
	$(APPNAME) fromlist=$(OUTPUT)/list.lis \
	  cnet=$(INPUT)/cnet.net \
	  prefix=$(OUTPUT)/pre \
	  tolist=$(OUTPUT)/newList.lis \
	  onet=$(OUTPUT)/newNet.net \
	  networkid=new \
	  description=new \
	  noignore=true \
	  nosinglemeasure=true \
	  nomeasureless=true \
	  > /dev/null;
	$(SED) 's+/.*/input/+input/+' $(OUTPUT)/newList.lis > $(OUTPUT)/newList.txt;
	$(RM) $(OUTPUT)/newList.lis;
	$(RM) $(OUTPUT)/list.lis;
+0 −42
Original line number Diff line number Diff line
# Tests cnetextract using CUBES filters
#
# (1) The first run is a basic test of the filter. It extracts
#		--non-ignored points that have at least one measure in the cubelist 
#		for each of these points the following measures will be extracted:
#			--reference measures (ignored or not)
# 			--non-ignored measures
# (2) The second run uses an extra filter to remove any measures that are not
#	  in the cubelist 
APPNAME = cnetextract

include $(ISISROOT)/make/isismake.tsts

commands:
	$(LS) $(INPUT)/*.cub > $(OUTPUT)/list.lis;
	$(APPNAME) fromlist=$(OUTPUT)/list.lis \
	  cnet=$(INPUT)/cnet.net \
	  prefix=$(OUTPUT)/point \
	  tolist=$(OUTPUT)/newList.lis \
	  onet=$(OUTPUT)/newNetPoint.net \
	  networkid=new \
	  description=new \
	  noignore=true \
	  cubes=true \
	  cubelist=$(OUTPUT)/list.lis \
	  > /dev/null;
	$(SED) 's+/.*/input/+input/+' $(OUTPUT)/newList.lis > $(OUTPUT)/pointNewList.txt;
	$(APPNAME) fromlist=$(OUTPUT)/list.lis \
	  cnet=$(INPUT)/cnet.net \
	  prefix=$(OUTPUT)/measure \
	  tolist=$(OUTPUT)/newList.lis \
	  onet=$(OUTPUT)/newNetMeasure.net \
	  networkid=new \
	  description=new \
	  noignore=true \
	  cubes=true cubelist=$(OUTPUT)/list.lis \
	  cubemeasures=true \
	  retain_reference=true \
	  > /dev/null;
	$(SED) 's+/.*/input/+input/+' $(OUTPUT)/newList.lis > $(OUTPUT)/measureNewList.txt;
	$(RM) $(OUTPUT)/newList.lis;
	$(RM) $(OUTPUT)/list.lis;
Loading