Unverified Commit 2161209e authored by robotprogrammer22's avatar robotprogrammer22 Committed by GitHub
Browse files

Crop Tests (#4268)

* added code for two tests

* test modifications

* changed crop input and ouput function

* fixed last two tests

* added more tests

* removed old tests

* added tests and removed old test files

* added tests for exceptions
parent 8d20d67d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -115,9 +115,11 @@ namespace Isis {
    el = sl + (nl - 1) * linc;

    // Allocate the output file and make sure things get propogated nicely
    p.SetInputCube("FROM");
    CubeAttributeInput &inputAtt =ui.GetInputAttribute("FROM");
    p.SetInputCube(ui.GetFileName("FROM"), inputAtt);
    CubeAttributeOutput &att = ui.GetOutputAttribute("TO");
    Cube *ocube = p.SetOutputCube(ui.GetFileName("TO"), att, ns, nl, nb);
    p.PropagateTables(false);
    Cube *ocube = p.SetOutputCube("TO", ns, nl, nb);
    p.ClearInputCubes();

    // propagate tables manually
+0 −11
Original line number Diff line number Diff line
APPNAME = crop

simp.txt.IGNORELINES = Bytes StartByte ByteOrder TileSamples TileLines

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/mapsimp.cub to=$(OUTPUT)/mapsimpcrop.cub \
	  sample=818 nsamples=300 sinc=1 line=2070 nlines=300 linc=1 > /dev/null;
	catlab from=$(OUTPUT)/mapsimpcrop.cub to=$(OUTPUT)/simp.txt > /dev/null;
	rm $(OUTPUT)/mapsimpcrop.cub;
+0 −11
Original line number Diff line number Diff line
APPNAME = crop

sinu.txt.IGNORELINES = Bytes StartByte ByteOrder TileSamples TileLines

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/mapsinu.cub to=$(OUTPUT)/mapsinucrop.cub \
	  sample=818 nsamples=300 sinc=1 line=2070 nlines=300 linc=1 > /dev/null;
	catlab from=$(OUTPUT)/mapsinucrop.cub to=$(OUTPUT)/sinu.txt > /dev/null;
	rm $(OUTPUT)/mapsinucrop.cub;
+0 −13
Original line number Diff line number Diff line
APPNAME = crop

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/isisTruth.cub \
	  to=$(OUTPUT)/cropTruth1.cub \
	  sample= 1 \
	  nsamples= 10 \
	  sinc=1 \
	  line= 3 \
	  nlines= 1 \
	  linc=1 > /dev/null;
+0 −13
Original line number Diff line number Diff line
APPNAME = crop

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/isisTruth.cub \
	  to=$(OUTPUT)/cropTruth2.cub \
	  sample= 50 \
	  nsamples= 50 \
	  sinc=2 \
	  line= 50 \
	  nlines= 50 \
	  linc=3 > /dev/null;
Loading