Revision 16640
trunk/extensions/extRemoteSensing/src/org/gvsig/remotesensing/principalcomponents/gui/PrincipalComponentCalculusPanel.java | ||
---|---|---|
83 | 83 |
import org.gvsig.gui.beans.incrementabletask.IncrementableTask; |
84 | 84 |
import org.gvsig.raster.dataset.GeoRasterWriter; |
85 | 85 |
import org.gvsig.raster.grid.Grid; |
86 |
import org.gvsig.raster.grid.GridException; |
|
86 | 87 |
import org.gvsig.rastertools.RasterModule; |
87 | 88 |
import org.gvsig.remotesensing.principalcomponents.PCImageProcess; |
88 | 89 |
import org.gvsig.remotesensing.principalcomponents.PCStatisticsProcess; |
... | ... | |
532 | 533 |
outputStream.write("Mean Value\t".getBytes()); |
533 | 534 |
outputStream.write("\n".getBytes()); |
534 | 535 |
String aux=""; |
536 |
|
|
535 | 537 |
for(int i=0; i<grid.getBandCount();i++) |
536 |
{ |
|
537 |
grid.setBandToOperate(i); |
|
538 |
outputStream.write("\n".getBytes()); |
|
539 |
outputStream.write(("Band"+(i+1)).getBytes()); |
|
540 |
// Se escribe los valores con un numero de caracteres inferior a 8. |
|
541 |
outputStream.write(("\t\t").getBytes()); |
|
542 |
Double var= new Double(grid.getMaxValue()); |
|
543 |
if (var.toString().getBytes().length>7) |
|
544 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
545 |
else{ |
|
546 |
aux = var.toString(); |
|
547 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
548 |
aux=aux+" "; |
|
549 |
outputStream.write(aux.getBytes(),0,7); |
|
538 |
{ |
|
539 |
grid.setBandToOperate(i); |
|
540 |
outputStream.write("\n".getBytes()); |
|
541 |
outputStream.write(("Band"+(i+1)).getBytes()); |
|
542 |
// Se escribe los valores con un numero de caracteres inferior a 8. |
|
543 |
outputStream.write(("\t\t").getBytes()); |
|
544 |
Double var= new Double(grid.getMaxValue()); |
|
545 |
if (var.toString().getBytes().length>7) |
|
546 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
547 |
else{ |
|
548 |
aux = var.toString(); |
|
549 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
550 |
aux=aux+" "; |
|
551 |
outputStream.write(aux.getBytes(),0,7); |
|
552 |
} |
|
553 |
outputStream.write(("\t").getBytes()); |
|
554 |
var= new Double(grid.getMinValue()); |
|
555 |
if (var.toString().getBytes().length>7) |
|
556 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
557 |
else{ |
|
558 |
aux = var.toString(); |
|
559 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
560 |
aux=aux+" "; |
|
561 |
outputStream.write(aux.getBytes(),0,7); |
|
562 |
} |
|
563 |
outputStream.write(("\t").getBytes()); |
|
564 |
var= new Double(grid.getMeanValue()); |
|
565 |
if (var.toString().getBytes().length>7) |
|
566 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
567 |
else{ |
|
568 |
aux = var.toString(); |
|
569 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
570 |
aux=aux+" "; |
|
571 |
outputStream.write(aux.getBytes(),0,7); |
|
572 |
} |
|
573 |
|
|
550 | 574 |
} |
551 |
outputStream.write(("\t").getBytes()); |
|
552 |
var= new Double(grid.getMinValue()); |
|
553 |
if (var.toString().getBytes().length>7) |
|
554 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
555 |
else{ |
|
556 |
aux = var.toString(); |
|
557 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
558 |
aux=aux+" "; |
|
559 |
outputStream.write(aux.getBytes(),0,7); |
|
560 |
} |
|
561 |
outputStream.write(("\t").getBytes()); |
|
562 |
var= new Double(grid.getMeanValue()); |
|
563 |
if (var.toString().getBytes().length>7) |
|
564 |
outputStream.write(var.toString().getBytes(),0,7);// Elementos de la matriz; |
|
565 |
else{ |
|
566 |
aux = var.toString(); |
|
567 |
for (int k=var.toString().getBytes().length; k<8; k++) |
|
568 |
aux=aux+" "; |
|
569 |
outputStream.write(aux.getBytes(),0,7); |
|
570 |
} |
|
575 |
outputStream.write("\n\n".getBytes()); |
|
576 |
|
|
577 |
} catch (IOException e) { |
|
578 |
e.printStackTrace(); |
|
579 |
} catch (GridException e) { |
|
571 | 580 |
|
572 | 581 |
} |
573 |
|
|
574 |
outputStream.write("\n\n".getBytes()); |
|
575 |
} catch (IOException e) { |
|
576 |
e.printStackTrace(); |
|
577 |
} |
|
578 | 582 |
|
579 | 583 |
|
580 | 584 |
} |
Also available in: Unified diff