Revision 11453 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/BufferFactory.java
BufferFactory.java | ||
---|---|---|
397 | 397 |
|
398 | 398 |
rasterBuf = mDataset.getWindowRaster(x, y, w, h, bufWidth, bufHeight); |
399 | 399 |
} |
400 |
|
|
401 |
/** |
|
402 |
* Ajusta el ?rea del grid a un ancho y un alto dado en pixeles. Este ajuste se har? |
|
403 |
* en relaci?n a un m?todo de interpolaci?n definido en el par?metro. |
|
404 |
* @param w Ancho de la nueva imagen. |
|
405 |
* @param h Alto de la nueva imagen. |
|
406 |
* @param interpolation M?todo de interpolaci?n que se usar? en el ajuste. |
|
407 |
* @param bands Bandas que se desea en el nuevo RasterBuf ajustado. Si este par?metro es null |
|
408 |
* se usar?n todas las bandas de la imagen. |
|
409 |
*/ |
|
410 |
public void setAdjustedWindow(int w, int h, int interpolationMethod, int[] bands) { |
|
411 |
if(w == width && h == height) |
|
412 |
return; |
|
413 |
switch(interpolationMethod) { |
|
414 |
case IQueryableRaster.INTERPOLATION_NearestNeighbour: |
|
415 |
rasterBuf = ((RasterBuffer)rasterBuf).adjustRasterNearestNeighbourInterpolation(w, h, bands); |
|
416 |
break; |
|
417 |
case IQueryableRaster.INTERPOLATION_Bilinear: |
|
418 |
System.out.println("Method not implemented yet"); |
|
419 |
break; |
|
420 |
case IQueryableRaster.INTERPOLATION_InverseDistance: |
|
421 |
System.out.println("Method not implemented yet"); |
|
422 |
break; |
|
423 |
case IQueryableRaster.INTERPOLATION_BicubicSpline: |
|
424 |
System.out.println("Method not implemented yet"); |
|
425 |
break; |
|
426 |
case IQueryableRaster.INTERPOLATION_BSpline: |
|
427 |
System.out.println("Method not implemented yet"); |
|
428 |
break; |
|
429 |
} |
|
430 |
//width = rasterBuf.getWidth(); |
|
431 |
//height = rasterBuf.getHeight(); |
|
432 |
} |
|
433 | 400 |
|
434 | 401 |
/** |
435 | 402 |
* Obtiene el tipo de datos del grid. |
Also available in: Unified diff