Loading isis/src/base/apps/demprep/demprep.cpp +28 −2 Original line number Diff line number Diff line Loading @@ -322,9 +322,21 @@ void DoWrap(Buffer &in) { // Write top pad? if (topPad == 1 && in.Line() == 1) { double average = inputLineStats.Average(); double average = inputLineStats.Average(); //may be Isis::NULL8 for(int outputIndex = 0; outputIndex < outputSize; outputIndex++) { int inputIndex = outputIndex - leftPad; if (average == Isis::NULL8) { if(inputIndex < 0) { outMan[outputIndex] = in[inputIndex + inputSize]; } else if(inputIndex < inputSize) { outMan[outputIndex] = in[inputIndex]; } else { outMan[outputIndex] = in[inputIndex - inputSize]; } } else { if(inputIndex < 0) { outMan[outputIndex] = 2.0 * average - in[inputIndex + inputSize]; } Loading @@ -335,6 +347,7 @@ void DoWrap(Buffer &in) { outMan[outputIndex] = 2.0 * average - in[inputIndex - inputSize]; } } } outMan.SetLine(1); outCubeStats.AddData(&outMan[0], outMan.size()); Loading @@ -361,9 +374,21 @@ void DoWrap(Buffer &in) { // Write bottom pad? if (bottomPad == 1 && in.Line() == inl) { double average = inputLineStats.Average(); double average = inputLineStats.Average(); //may be Isis::NULL8 for (int outputIndex = 0; outputIndex < outputSize; outputIndex++) { int inputIndex = outputIndex - leftPad; if (average == Isis::NULL8) { if(inputIndex < 0) { outMan[outputIndex] = in[inputIndex + inputSize]; } else if(inputIndex < inputSize) { outMan[outputIndex] = in[inputIndex]; } else { outMan[outputIndex] = in[inputIndex - inputSize]; } } else { if(inputIndex < 0) { outMan[outputIndex] = 2.0 * average - in[inputIndex + inputSize]; } Loading @@ -374,6 +399,7 @@ void DoWrap(Buffer &in) { outMan[outputIndex] = 2.0 * average - in[inputIndex - inputSize]; } } } outMan.SetLine(inl + topPad + bottomPad); outCubeStats.AddData(&outMan[0], outMan.size()); ocube->write(outMan); Loading isis/src/base/apps/demprep/demprep.xml +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,9 @@ <change name="Debbie A. Cook" date="2012-12-10"> Changed to use TProjection instead of Projection. References #775 </change> <change name="Kristin Berry" date="2014-05-30"> Fixed padding for special pixels. References #1010 </change> </history> <category> Loading isis/src/base/apps/demprep/tsts/specialpixels/Makefile 0 → 100644 +11 −0 Original line number Diff line number Diff line APPNAME = demprep labels.txt.IGNORELINES = Bytes StartByte ByteOrder TileSamples TileLines include $(ISISROOT)/make/isismake.tsts commands: $(APPNAME) from=$(INPUT)/vest64_dtm_specialpixels.cub \ to=$(OUTPUT)/vest64_dtm_specialpixels.cub > /dev/null; catlab from=$(OUTPUT)/vest64_dtm_specialpixels.cub \ to=$(OUTPUT)/labels.txt > /dev/null; Loading
isis/src/base/apps/demprep/demprep.cpp +28 −2 Original line number Diff line number Diff line Loading @@ -322,9 +322,21 @@ void DoWrap(Buffer &in) { // Write top pad? if (topPad == 1 && in.Line() == 1) { double average = inputLineStats.Average(); double average = inputLineStats.Average(); //may be Isis::NULL8 for(int outputIndex = 0; outputIndex < outputSize; outputIndex++) { int inputIndex = outputIndex - leftPad; if (average == Isis::NULL8) { if(inputIndex < 0) { outMan[outputIndex] = in[inputIndex + inputSize]; } else if(inputIndex < inputSize) { outMan[outputIndex] = in[inputIndex]; } else { outMan[outputIndex] = in[inputIndex - inputSize]; } } else { if(inputIndex < 0) { outMan[outputIndex] = 2.0 * average - in[inputIndex + inputSize]; } Loading @@ -335,6 +347,7 @@ void DoWrap(Buffer &in) { outMan[outputIndex] = 2.0 * average - in[inputIndex - inputSize]; } } } outMan.SetLine(1); outCubeStats.AddData(&outMan[0], outMan.size()); Loading @@ -361,9 +374,21 @@ void DoWrap(Buffer &in) { // Write bottom pad? if (bottomPad == 1 && in.Line() == inl) { double average = inputLineStats.Average(); double average = inputLineStats.Average(); //may be Isis::NULL8 for (int outputIndex = 0; outputIndex < outputSize; outputIndex++) { int inputIndex = outputIndex - leftPad; if (average == Isis::NULL8) { if(inputIndex < 0) { outMan[outputIndex] = in[inputIndex + inputSize]; } else if(inputIndex < inputSize) { outMan[outputIndex] = in[inputIndex]; } else { outMan[outputIndex] = in[inputIndex - inputSize]; } } else { if(inputIndex < 0) { outMan[outputIndex] = 2.0 * average - in[inputIndex + inputSize]; } Loading @@ -374,6 +399,7 @@ void DoWrap(Buffer &in) { outMan[outputIndex] = 2.0 * average - in[inputIndex - inputSize]; } } } outMan.SetLine(inl + topPad + bottomPad); outCubeStats.AddData(&outMan[0], outMan.size()); ocube->write(outMan); Loading
isis/src/base/apps/demprep/demprep.xml +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,9 @@ <change name="Debbie A. Cook" date="2012-12-10"> Changed to use TProjection instead of Projection. References #775 </change> <change name="Kristin Berry" date="2014-05-30"> Fixed padding for special pixels. References #1010 </change> </history> <category> Loading
isis/src/base/apps/demprep/tsts/specialpixels/Makefile 0 → 100644 +11 −0 Original line number Diff line number Diff line APPNAME = demprep labels.txt.IGNORELINES = Bytes StartByte ByteOrder TileSamples TileLines include $(ISISROOT)/make/isismake.tsts commands: $(APPNAME) from=$(INPUT)/vest64_dtm_specialpixels.cub \ to=$(OUTPUT)/vest64_dtm_specialpixels.cub > /dev/null; catlab from=$(OUTPUT)/vest64_dtm_specialpixels.cub \ to=$(OUTPUT)/labels.txt > /dev/null;