Revision 11424 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/RasterMultiDataset.java
RasterMultiDataset.java | ||
---|---|---|
47 | 47 |
* |
48 | 48 |
*/ |
49 | 49 |
public class RasterMultiDataset implements IHistogramable { |
50 |
|
|
51 |
private boolean[] cancel = new boolean[1]; |
|
52 |
|
|
50 | 53 |
//File list |
51 | 54 |
private ArrayList files = new ArrayList(); |
52 | 55 |
private String name = null; |
... | ... | |
524 | 527 |
throws InvalidSetViewException { |
525 | 528 |
if(x < 0 || y < 0 || w > ((RasterDataset)files.get(0)).getWidth() || h > ((RasterDataset)files.get(0)).getHeight()) |
526 | 529 |
throw new InvalidSetViewException("Out of image"); |
527 |
|
|
528 |
System.out.println(""); |
|
529 |
System.out.println("0*............................"); |
|
530 |
bandList.show(); |
|
531 |
|
|
530 |
|
|
532 | 531 |
IBuffer raster = RasterBuffer.getBuffer(getDataType()[0], bufWidth, bufHeight, bandList.getDrawableBandsCount(), false); |
533 |
|
|
534 |
System.out.println(""); |
|
535 |
System.out.println("1*............................"); |
|
536 |
bandList.show(); |
|
537 |
|
|
532 |
|
|
538 | 533 |
for(int iBand = 0; iBand < raster.getBandCount(); iBand ++) |
539 | 534 |
raster.assignBandToNotValid(iBand); |
540 |
|
|
541 |
System.out.println(""); |
|
542 |
System.out.println("2*............................"); |
|
543 |
bandList.show(); |
|
544 |
|
|
535 |
|
|
545 | 536 |
//Reservamos memoria para los buffers por dataset |
546 | 537 |
IBuffer[] bufferDatasets = mallocBuffersDatasets(bandList, bufWidth, bufHeight); |
547 | 538 |
|
... | ... | |
560 | 551 |
return rb; |
561 | 552 |
} |
562 | 553 |
}*/ |
563 |
|
|
564 |
System.out.println(""); |
|
565 |
System.out.println("3*............................"); |
|
566 |
bandList.show(); |
|
567 |
|
|
554 |
|
|
568 | 555 |
for(int i = 0; i < getDatasetCount(); i++) |
569 | 556 |
bufferDatasets[i] = ((RasterDataset)files.get(i)).getWindowRaster(x, y, w, h, bufWidth, bufHeight, bandList, bufferDatasets[i]); |
570 | 557 |
|
... | ... | |
994 | 981 |
* (non-Javadoc) |
995 | 982 |
* @see org.gvsig.raster.util.ICancellable#isCanceled() |
996 | 983 |
*/ |
997 |
public boolean isCanceled() { |
|
998 |
if (histogram != null) return histogram.isCanceled(); |
|
984 |
public boolean isCanceled(int process) { |
|
985 |
if(process == CANCEL_HISTOGRAM) { |
|
986 |
if (histogram != null) |
|
987 |
return histogram.isCanceled(0); |
|
988 |
} |
|
999 | 989 |
return false; |
1000 | 990 |
} |
1001 | 991 |
|
... | ... | |
1003 | 993 |
* (non-Javadoc) |
1004 | 994 |
* @see org.gvsig.raster.util.ICancellable#setCanceled(boolean) |
1005 | 995 |
*/ |
1006 |
public void setCanceled(boolean value) { |
|
1007 |
if (histogram != null) histogram.setCanceled(value); |
|
996 |
public void setCanceled(boolean value, int process) { |
|
997 |
if(process == CANCEL_HISTOGRAM || process == 0) |
|
998 |
if (histogram != null) |
|
999 |
histogram.setCanceled(value, 0); |
|
1000 |
|
|
1008 | 1001 |
} |
1009 | 1002 |
} |
Also available in: Unified diff