Revision 1001

View differences:

org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.api/src/main/java/org/gvsig/raster/cache/buffer/BufferCacheManager.java
74 74
	public Buffer createReadOnlyBuffer(String file);
75 75
	
76 76
	/**
77
	 * Genera una instancia del buffer de solo lectura. Este buffer consta de una cache y unos apuntadores
78
	 * a las p?ginas en disco. Cuando se accede a los datos se carga en memoria la p?gina pedida.
79
	 *  
77
	 * Creates an instance of a memory buffer
78
	 * 
80 79
	 * @param dataType Tipo de dato
81 80
	 * @param width Ancho
82 81
	 * @param height Alto
......
88 87
	public Buffer createMemoryBuffer(int dataType, int width, int height, int bandNr, boolean malloc);
89 88
	
90 89
	/**
90
	 * Creates an instance of a memory buffer
91
	 * 
92
	 * @param params
93
	 *        Parameters to instantiate this buffer
94
	 */
95
	public Buffer createMemoryBuffer(BufferParam params);
96
	
97
	/**
91 98
	 * Creates a new instance of an interpolation object.
92 99
	 * @param buf IRasterBuffer
93 100
	 * @return IBufferInterpolation
......
123 130
	
124 131
	/**
125 132
	 * Creates a parameter object for building a buffer. For this call the buffer type 
133
	 * is read-only and the source will be a multifile. 
134
	 * @param files
135
	 *        File list in disk
136
	 * @param x
137
	 *        initial pixel
138
	 * @param y
139
	 *        initial pixel
140
	 * @param w
141
	 *        Width in pixels
142
	 * @param h
143
	 *        Height in pixels
144
	 * @param bands
145
	 *        bands to render
146
	 * @return {@link BufferParam}
147
	 * @throws IOException 
148
	 */
149
	public BufferParam createBufferParams(String[] files, int x, int y, int w, int h, int[] bands) throws IOException;
150
	
151
	/**
152
	 * Creates a parameter object for building a buffer. For this call the buffer type 
126 153
	 * is read-only. 
127 154
	 * @param file
128 155
	 *        File in disk
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.api/src/main/java/org/gvsig/raster/cache/buffer/Buffer.java
576 576
	 */
577 577
	public Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws InterruptedException;
578 578
    
579
	/**
580
	 * Selects bands for read-only buffers which referencing a image in disk
581
	 * @param bands
582
	 */
583
	public void addDrawableBands(int[] bands);
579 584
}
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/buffer/impl/BufferCacheManagerImpl.java
165 165
		return new RasterReadOnlyBuffer(ds);
166 166
	}
167 167
	
168
	/**
169
	 * Genera una instancia del buffer de solo lectura. Este buffer consta de una cache y unos apuntadores
170
	 * a las p?ginas en disco. Cuando se accede a los datos se carga en memoria la p?gina pedida.
171
	 *  
172
	 * @param dataType Tipo de dato
173
	 * @param width Ancho
174
	 * @param height Alto
175
	 * @param bandNr Banda
176
	 * @param flag En caso de buffers de memoria este flag a true significa que se reserva la memoria
177
	 * para el buffer de forma normal y si est? a false no se reserva por lo que la reserva deber? ser
178
	 * posterior. 
168
	/*
169
	 * (non-Javadoc)
170
	 * @see org.gvsig.raster.cache.buffer.BufferCacheManager#createMemoryBuffer(org.gvsig.raster.cache.buffer.BufferParam)
179 171
	 */
172
	public Buffer createMemoryBuffer(BufferParam params) {
173
		return new RasterMemoryBuffer(params.getDataType(), 
174
									(int)params.getWidth(), 
175
									(int)params.getHeight(), 
176
									params.getBandCount(), 
177
									true);
178
	}
179
	
180
	/*
181
	 * (non-Javadoc)
182
	 * @see org.gvsig.raster.cache.buffer.BufferCacheManager#createMemoryBuffer(int, int, int, int, boolean)
183
	 */
180 184
	public Buffer createMemoryBuffer(int dataType, int width, int height, int bandNr, boolean malloc) {
181 185
		return new RasterMemoryBuffer(dataType, width, height, bandNr, malloc);
182 186
	}
......
224 228
	
225 229
	/*
226 230
	 * (non-Javadoc)
231
	 * @see org.gvsig.raster.cache.buffer.BufferCacheManager#createBufferParams(java.lang.String[], int, int, int, int, int[])
232
	 */
233
	public BufferParam createBufferParams(String[] files, int x, int y, int w, int h, int[] bands) throws IOException {
234
		return new BufferParamImpl(files, x, y, w, h, bands);
235
	}
236
	
237
	/*
238
	 * (non-Javadoc)
227 239
	 * @see org.gvsig.raster.cache.buffer.BufferCacheManager#createNoData(java.lang.Number, java.lang.Number, java.lang.String, int)
228 240
	 */
229 241
	public BufferNoData createNoData(Number noData, Number nativeNoData, String fileName, int bandCount) {
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/buffer/impl/rocache/ReadOnlyCacheBand.java
19 19
	/**
20 20
	 * Loaded page
21 21
	 */
22
	protected Buffer              page              = null;
23
	protected Buffer              secondPage        = null;
24
	protected BufferDataSource          dataSource        = null;
22
	protected Buffer                     page              = null;
23
	protected Buffer                     secondPage        = null;
24
	protected BufferDataSource           dataSource        = null;
25 25
	protected ArrayList<PxTile>          stripeList        = null;
26 26
	
27 27
	/**
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/buffer/impl/rocache/RasterReadOnlyBuffer.java
250 250
	}
251 251
	
252 252
	/*
253
     * (non-Javadoc)
254
     * @see org.fv.raster.buffer.IRasterBuffer#isWritable()
255
     */
253
	 * (non-Javadoc)
254
	 * @see org.gvsig.raster.cache.buffer.Buffer#isWritable()
255
	 */
256 256
    public boolean isWritable() {
257 257
    	return false;
258 258
    }
259
    
260
    public void addDrawableBands(int[] bands) {
261
    	stripeList = new ArrayList<PxTile>();
262
		createStructure(bands);
263
    }
259 264

  
260
	//*********************************************************
261
	
265
    //*********************************************************
266
    
262 267
	/*
263 268
	 * (non-Javadoc)
264
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineByte(int)
269
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineByte(int)
265 270
	 */
266 271
	public byte[][] getLineByte(int line) throws OperationNotSupportedException {
267 272
		int pag = line >> bitsPag;
......
275 280

  
276 281
	/*
277 282
	 * (non-Javadoc)
278
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineShort(int)
283
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineShort(int)
279 284
	 */
280 285
	public short[][] getLineShort(int line) throws OperationNotSupportedException {
281 286
		int pag = line >> bitsPag;
......
289 294

  
290 295
	/*
291 296
	 * (non-Javadoc)
292
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineInt(int)
297
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineInt(int)
293 298
	 */
294 299
	public int[][] getLineInt(int line) throws OperationNotSupportedException {
295 300
		int pag = line >> bitsPag;
......
303 308

  
304 309
	/*
305 310
	 * (non-Javadoc)
306
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFloat(int)
311
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFloat(int)
307 312
	 */
308 313
	public float[][] getLineFloat(int line) throws OperationNotSupportedException {
309 314
		int pag = line >> bitsPag;
......
317 322

  
318 323
	/*
319 324
	 * (non-Javadoc)
320
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineDouble(int)
325
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineDouble(int)
321 326
	 */
322 327
	public double[][] getLineDouble(int line) throws OperationNotSupportedException {
323 328
		int pag = line >> bitsPag;
......
333 338
	
334 339
	/*
335 340
	 * (non-Javadoc)
336
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFromBandByte(int, int)
341
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFromBandByte(int, int)
337 342
	 */
338 343
	public byte[] getLineFromBandByte(int line, int band) throws OperationNotSupportedException {
339 344
		int pag = line >> bitsPag;
......
344 349

  
345 350
	/*
346 351
	 * (non-Javadoc)
347
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFromBandShort(int, int)
352
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFromBandShort(int, int)
348 353
	 */
349 354
	public short[] getLineFromBandShort(int line, int band) throws OperationNotSupportedException {
350 355
		int pag = line >> bitsPag;
......
355 360

  
356 361
	/*
357 362
	 * (non-Javadoc)
358
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFromBandInt(int, int)
363
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFromBandInt(int, int)
359 364
	 */
360 365
	public int[] getLineFromBandInt(int line, int band) throws OperationNotSupportedException {
361 366
		int pag = line >> bitsPag;
......
366 371

  
367 372
	/*
368 373
	 * (non-Javadoc)
369
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFromBandFloat(int, int)
374
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFromBandFloat(int, int)
370 375
	 */
371 376
	public float[] getLineFromBandFloat(int line, int band) throws OperationNotSupportedException {
372 377
		int pag = line >> bitsPag;
......
377 382

  
378 383
	/*
379 384
	 * (non-Javadoc)
380
	 * @see org.fv.raster.buffer.IRasterBuffer#getLineFromBandDouble(int, int)
385
	 * @see org.gvsig.raster.cache.buffer.Buffer#getLineFromBandDouble(int, int)
381 386
	 */
382 387
	public double[] getLineFromBandDouble(int line, int band) throws OperationNotSupportedException {
383 388
		int pag = line >> bitsPag;
......
388 393

  
389 394
	//*********************************************************
390 395
	
396
	/*
397
	 * (non-Javadoc)
398
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemByte(int, int, int)
399
	 */
391 400
	public byte getElemByte(int line, int col, int band) {
392 401
		int pag = line >> bitsPag;
393 402
		if(pag != loadedPage)
......
395 404
		return this.bandList.get(band).page.getElemByte(line & offset, col, 0);
396 405
	}
397 406

  
407
	/*
408
	 * (non-Javadoc)
409
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemShort(int, int, int)
410
	 */
398 411
	public short getElemShort(int line, int col, int band) {
399 412
		int pag = line >> bitsPag;
400 413
		if(pag != loadedPage)
......
402 415
		return this.bandList.get(band).page.getElemShort(line & offset, col, 0);
403 416
	}
404 417

  
418
	/*
419
	 * (non-Javadoc)
420
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemInt(int, int, int)
421
	 */
405 422
	public int getElemInt(int line, int col, int band) {
406 423
		int pag = line >> bitsPag;
407 424
		if(pag != loadedPage)
......
409 426
		return this.bandList.get(band).page.getElemInt(line & offset, col, 0);
410 427
	}
411 428

  
429
	/*
430
	 * (non-Javadoc)
431
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemFloat(int, int, int)
432
	 */
412 433
	public float getElemFloat(int line, int col, int band) {
413 434
		int pag = line >> bitsPag;
414 435
		if(pag != loadedPage)
......
416 437
		return this.bandList.get(band).page.getElemFloat(line & offset, col, 0);
417 438
	}
418 439

  
440
	/*
441
	 * (non-Javadoc)
442
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemDouble(int, int, int)
443
	 */
419 444
	public double getElemDouble(int line, int col, int band) {
420 445
		int pag = line >> bitsPag;
421 446
		if(pag != loadedPage)
......
424 449
	}
425 450
	
426 451
	//*********************************************************
427

  
452
	
453
	/*
454
	 * (non-Javadoc)
455
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemByte(int, int, byte[])
456
	 */
428 457
	public void getElemByte(int line, int col, byte[] data) {
429 458
		int pag = line >> bitsPag;
430 459
		if(pag != loadedPage)
......
433 462
			data[i] = bandList.get(i).page.getElemByte(line & offset, col, 0);
434 463
	}
435 464

  
465
	/*
466
	 * (non-Javadoc)
467
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemShort(int, int, short[])
468
	 */
436 469
	public void getElemShort(int line, int col, short[] data) {
437 470
		int pag = line >> bitsPag;
438 471
		if(pag != loadedPage)
......
441 474
			data[i] = bandList.get(i).page.getElemShort(line & offset, col, 0);
442 475
	}
443 476

  
477
	/*
478
	 * (non-Javadoc)
479
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemInt(int, int, int[])
480
	 */
444 481
	public void getElemInt(int line, int col, int[] data) {
445 482
		int pag = line >> bitsPag;
446 483
		if(pag != loadedPage)
......
449 486
			data[i] = bandList.get(i).page.getElemInt(line & offset, col, 0);
450 487
	}
451 488

  
489
	/*
490
	 * (non-Javadoc)
491
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemFloat(int, int, float[])
492
	 */
452 493
	public void getElemFloat(int line, int col, float[] data) {
453 494
		int pag = line >> bitsPag;
454 495
		if(pag != loadedPage)
......
457 498
			data[i] = bandList.get(i).page.getElemFloat(line & offset, col, 0);
458 499
	}
459 500

  
501
	/*
502
	 * (non-Javadoc)
503
	 * @see org.gvsig.raster.cache.buffer.Buffer#getElemDouble(int, int, double[])
504
	 */
460 505
	public void getElemDouble(int line, int col, double[] data) {
461 506
		int pag = line >> bitsPag;
462 507
		if(pag != loadedPage)
......
469 514
	
470 515
	/*
471 516
	 * (non-Javadoc)
472
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assignBandToNotValid(int)
517
	 * @see org.gvsig.raster.cache.buffer.Buffer#assignBandToNotValid(int)
473 518
	 */
474 519
	public void assignBandToNotValid(int iBand) throws OperationNotSupportedException {
475 520
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
477 522
	
478 523
	/*
479 524
	 * (non-Javadoc)
480
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assign(int, byte)
525
	 * @see org.gvsig.raster.cache.buffer.Buffer#assign(int, byte)
481 526
	 */
482 527
	public void assign(int band, byte value) throws OperationNotSupportedException {
483 528
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
485 530
	
486 531
	/*
487 532
	 * (non-Javadoc)
488
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assign(int, short)
533
	 * @see org.gvsig.raster.cache.buffer.Buffer#assign(int, short)
489 534
	 */
490 535
	public void assign(int band, short value) throws OperationNotSupportedException {
491 536
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
493 538
	
494 539
	/*
495 540
	 * (non-Javadoc)
496
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assign(int, int)
541
	 * @see org.gvsig.raster.cache.buffer.Buffer#assign(int, int)
497 542
	 */
498 543
	public void assign(int band, int value) throws OperationNotSupportedException {
499 544
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
501 546
	
502 547
	/*
503 548
	 * (non-Javadoc)
504
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assign(int, float)
549
	 * @see org.gvsig.raster.cache.buffer.Buffer#assign(int, float)
505 550
	 */
506 551
	public void assign(int band, float value) throws OperationNotSupportedException {
507 552
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
509 554
	
510 555
	/*
511 556
	 * (non-Javadoc)
512
	 * @see org.gvsig.raster.buffer.IRasterBuffer#assign(int, double)
557
	 * @see org.gvsig.raster.cache.buffer.Buffer#assign(int, double)
513 558
	 */
514 559
	public void assign(int band, double value) throws OperationNotSupportedException {
515 560
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
517 562
	
518 563
	/*
519 564
	 * (non-Javadoc)
520
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElem(int, int, int, byte)
565
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElem(int, int, int, byte)
521 566
	 */
522 567
	public void setElem(int line, int col, int band, byte data) throws OperationNotSupportedException {
523 568
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
525 570
	
526 571
	/*
527 572
	 * (non-Javadoc)
528
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElem(int, int, int, short)
573
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElem(int, int, int, short)
529 574
	 */
530 575
	public void setElem(int line, int col, int band, short data) throws OperationNotSupportedException {
531 576
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
533 578
	
534 579
	/*
535 580
	 * (non-Javadoc)
536
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElem(int, int, int, int)
581
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElem(int, int, int, int)
537 582
	 */
538 583
	public void setElem(int line, int col, int band, int data) throws OperationNotSupportedException {
539 584
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
541 586
	
542 587
	/*
543 588
	 * (non-Javadoc)
544
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElem(int, int, int, float)
589
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElem(int, int, int, float)
545 590
	 */
546 591
	public void setElem(int line, int col, int band, float data) throws OperationNotSupportedException {
547 592
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
549 594
	
550 595
	/*
551 596
	 * (non-Javadoc)
552
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElem(int, int, int, double)
597
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElem(int, int, int, double)
553 598
	 */
554 599
	public void setElem(int line, int col, int band, double data) throws OperationNotSupportedException {
555 600
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
557 602
	
558 603
	/*
559 604
	 * (non-Javadoc)
560
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElemByte(int, int, byte[])
605
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElemByte(int, int, byte[])
561 606
	 */
562 607
	public void setElemByte(int line, int col, byte[] data) throws OperationNotSupportedException {
563 608
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
565 610
	
566 611
	/*
567 612
	 * (non-Javadoc)
568
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElemDouble(int, int, double[])
613
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElemDouble(int, int, double[])
569 614
	 */
570 615
	public void setElemDouble(int line, int col, double[] data) throws OperationNotSupportedException {
571 616
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
573 618
	
574 619
	/*
575 620
	 * (non-Javadoc)
576
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElemFloat(int, int, float[])
621
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElemFloat(int, int, float[])
577 622
	 */
578 623
	public void setElemFloat(int line, int col, float[] data) throws OperationNotSupportedException {
579 624
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
581 626
	
582 627
	/*
583 628
	 * (non-Javadoc)
584
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElemInt(int, int, int[])
629
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElemInt(int, int, int[])
585 630
	 */
586 631
	public void setElemInt(int line, int col, int[] data) throws OperationNotSupportedException {
587 632
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
589 634
	
590 635
	/*
591 636
	 * (non-Javadoc)
592
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setElemShort(int, int, short[])
637
	 * @see org.gvsig.raster.cache.buffer.Buffer#setElemShort(int, int, short[])
593 638
	 */
594 639
	public void setElemShort(int line, int col, short[] data) throws OperationNotSupportedException {
595 640
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
597 642
	
598 643
	/*
599 644
	 * (non-Javadoc)
600
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineByte(byte[][], int)
645
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineByte(byte[][], int)
601 646
	 */
602 647
	public void setLineByte(byte[][] data, int line) throws OperationNotSupportedException {
603 648
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
605 650
	
606 651
	/*
607 652
	 * (non-Javadoc)
608
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineDouble(double[][], int)
653
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineDouble(double[][], int)
609 654
	 */
610 655
	public void setLineDouble(double[][] data, int line) throws OperationNotSupportedException {
611 656
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
613 658
	
614 659
	/*
615 660
	 * (non-Javadoc)
616
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineFloat(float[][], int)
661
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineFloat(float[][], int)
617 662
	 */
618 663
	public void setLineFloat(float[][] data, int line) throws OperationNotSupportedException {
619 664
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
621 666
	
622 667
	/*
623 668
	 * (non-Javadoc)
624
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInBandByte(byte[], int, int)
669
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInBandByte(byte[], int, int)
625 670
	 */
626 671
	public void setLineInBandByte(byte[] data, int line, int band) throws OperationNotSupportedException {
627 672
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
629 674
	
630 675
	/*
631 676
	 * (non-Javadoc)
632
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInBandDouble(double[], int, int)
677
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInBandDouble(double[], int, int)
633 678
	 */
634 679
	public void setLineInBandDouble(double[] data, int line, int band) throws OperationNotSupportedException {
635 680
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
637 682
	
638 683
	/*
639 684
	 * (non-Javadoc)
640
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInBandFloat(float[], int, int)
685
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInBandFloat(float[], int, int)
641 686
	 */
642 687
	public void setLineInBandFloat(float[] data, int line, int band) throws OperationNotSupportedException {
643 688
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
645 690
	
646 691
	/*
647 692
	 * (non-Javadoc)
648
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInBandInt(int[], int, int)
693
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInBandInt(int[], int, int)
649 694
	 */
650 695
	public void setLineInBandInt(int[] data, int line, int band) throws OperationNotSupportedException {
651 696
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
653 698
	
654 699
	/*
655 700
	 * (non-Javadoc)
656
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInBandShort(short[], int, int)
701
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInBandShort(short[], int, int)
657 702
	 */
658 703
	public void setLineInBandShort(short[] data, int line, int band) throws OperationNotSupportedException {
659 704
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
661 706
	
662 707
	/*
663 708
	 * (non-Javadoc)
664
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineInt(int[][], int)
709
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineInt(int[][], int)
665 710
	 */
666 711
	public void setLineInt(int[][] data, int line) throws OperationNotSupportedException {
667 712
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
669 714
	
670 715
	/*
671 716
	 * (non-Javadoc)
672
	 * @see org.gvsig.raster.buffer.IRasterBuffer#setLineShort(short[][], int)
717
	 * @see org.gvsig.raster.cache.buffer.Buffer#setLineShort(short[][], int)
673 718
	 */
674 719
	public void setLineShort(short[][] data, int line) throws OperationNotSupportedException {
675 720
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
676 721
	}
677 722
	
678
    //**************************************
723
	//**************************************
679 724
    //**********BANDS OPERATIONS************
680 725
    //**************************************
681
   	
726
    
682 727
	/*
683
	 *  (non-Javadoc)
684
	 * @see org.gvsig.fmap.dataaccess.buffer.RasterBuffer#switchBands(int[])
728
	 * (non-Javadoc)
729
	 * @see org.gvsig.raster.cache.buffer.impl.RasterBuffer#swapBands(int[])
685 730
	 */
686 731
	public void swapBands(int[] bandPosition) throws WrongParameterException, IOException{
687 732
		super.swapBands(bandPosition);
......
693 738
	
694 739
	/*
695 740
	 * (non-Javadoc)
696
	 * @see org.gvsig.raster.buffer.IRasterBuffer#getBands()
741
	 * @see org.gvsig.raster.cache.buffer.Buffer#getBands()
697 742
	 */
698 743
	public Band[] getBands() {
699 744
		Band[] result = new Band[bandList.size()];
......
703 748
	}
704 749
	
705 750
	/*
706
     * (non-Javadoc)
707
     * @see org.fv.raster.buffer.IRasterBuffer#getBandList()
708
     */
751
	 * (non-Javadoc)
752
	 * @see org.gvsig.raster.cache.buffer.Buffer#getBandList()
753
	 */
709 754
    public ArrayList<Band> getBandList() {
710 755
    	ArrayList<Band> result = new ArrayList<Band>();
711 756
    	for (int i = 0; i < bandList.size(); i++) 
......
715 760
	
716 761
	/*
717 762
	 * (non-Javadoc)
718
	 * @see org.gvsig.raster.buffer.IRasterBuffer#getBand(int)
763
	 * @see org.gvsig.raster.cache.buffer.Buffer#getBand(int)
719 764
	 */
720 765
	public Band getBand(int band){
721 766
		return this.bandList.get(band);
......
723 768
	
724 769
	/*
725 770
	 * (non-Javadoc)
726
	 * @see org.gvsig.raster.buffer.IRasterBuffer#swapBands(int, int)
771
	 * @see org.gvsig.raster.cache.buffer.impl.RasterBuffer#swapBands(int, int)
727 772
	 */
728 773
	public void swapBands(int band1, int band2) throws WrongParameterException, IOException {
729 774
		ReadOnlyCacheBand aux1 = bandList.get(band1);
......
737 782
	
738 783
	/*
739 784
	 * (non-Javadoc)
740
	 * @see org.gvsig.raster.buffer.IRasterBuffer#removeBand(int)
785
	 * @see org.gvsig.raster.cache.buffer.Buffer#removeBand(int)
741 786
	 */
742 787
	public void removeBand(int pos) throws IOException {
743 788
		bandList.remove(pos);
......
746 791
	
747 792
	/*
748 793
	 * (non-Javadoc)
749
	 * @see org.gvsig.raster.buffer.IRasterBuffer#addBand(int)
794
	 * @see org.gvsig.raster.cache.buffer.Buffer#addBand(int)
750 795
	 */
751 796
	public Band addBand(int pos) throws IOException {
752 797
		bandPlusPlus();
......
777 822
	
778 823
	/*
779 824
	 * (non-Javadoc)
780
	 * @see org.gvsig.raster.buffer.IRasterBuffer#getBufferWithOneBand(int)
825
	 * @see org.gvsig.raster.cache.buffer.Buffer#getBufferWithOneBand(int)
781 826
	 */
782 827
	public Buffer getBufferWithOneBand(int nBand) throws IOException {
783 828
		int[] bands = new int[]{nBand};
......
785 830
	}
786 831
	
787 832
	/*
788
	 *  (non-Javadoc)
789
	 * @see org.gvsig.fmap.driver.IBuffer#copyBand(int, org.gvsig.fmap.dataaccess.buffer.IBand)
833
	 * (non-Javadoc)
834
	 * @see org.gvsig.raster.cache.buffer.impl.RasterBuffer#copyBand(int, org.gvsig.raster.cache.buffer.Band)
790 835
	 */
791 836
	public void copyBand(int iBand, Band band) throws BandNotCompatibleException, OperationNotSupportedException {
792 837
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
793 838
	}
794 839

  
795 840
	/*
796
	 *  (non-Javadoc)
797
	 * @see org.gvsig.fmap.driver.IBuffer#assignBand(int, org.gvsig.fmap.dataaccess.buffer.IBand)
841
	 * (non-Javadoc)
842
	 * @see org.gvsig.raster.cache.buffer.Buffer#assignBand(int, org.gvsig.raster.cache.buffer.Band)
798 843
	 */
799 844
	public void assignBand(int nBand, Band band) throws BandNotCompatibleException {
800 845
		if(	band.getDataType() != getDataType())
......
831 876
	
832 877
	/*
833 878
	 * (non-Javadoc)
834
	 * @see org.gvsig.raster.driver.IRasterBuffer#getBand(int)
879
	 * @see org.gvsig.raster.cache.buffer.Buffer#getBandCopy(int)
835 880
	 */
836 881
	public Band getBandCopy(int band) {
837 882
		switch (getDataType()) {
......
850 895
	}
851 896
	
852 897
	/*
853
	 *  (non-Javadoc)
854
	 * @see org.gvsig.fmap.driver.IRasterBuffer#replicateBand(int, int)
898
	 * (non-Javadoc)
899
	 * @see org.gvsig.raster.cache.buffer.Buffer#replicateBand(int, int)
855 900
	 */
856 901
	public void replicateBand(int orig, int dest) throws IOException {
857 902
		Band origBand = getBandCopy(orig);
......
864 909

  
865 910
	/*
866 911
	 * (non-Javadoc)
867
	 * @see org.gvsig.raster.buffer.IRasterBuffer#createBand(double)
912
	 * @see org.gvsig.raster.cache.buffer.Buffer#createBand(double)
868 913
	 */
869 914
	public Band createBand(double defaultValue) throws OperationNotSupportedException {
870 915
		throw new OperationNotSupportedException("RasterReadOnlyBuffer doesn't support this operation");
......
872 917
		
873 918
	/*
874 919
	 * (non-Javadoc)
875
	 * @see org.gvsig.raster.dataset.IBuffer#free()
920
	 * @see org.gvsig.raster.cache.buffer.Buffer#free()
876 921
	 */
877 922
	public void free() throws IOException {
878 923
		for (int i = 0; i < bandList.size() ; i++) {
......
884 929
	}
885 930
	
886 931
	/*
887
	 *  (non-Javadoc)
888
	 * @see org.gvsig.fmap.driver.IBuffer#cloneBuffer()
932
	 * (non-Javadoc)
933
	 * @see org.gvsig.raster.cache.buffer.impl.RasterBuffer#cloneBuffer()
889 934
	 */
890 935
	public Buffer cloneBuffer(){
891 936
		return null;
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/buffer/impl/RasterBuffer.java
106 106
	}
107 107
	
108 108
	/*
109
     *  (non-Javadoc)
110
     * @see org.gvsig.fmap.driver.IRasterBuffer#copyBand(int, org.gvsig.fmap.dataaccess.buffer.IBand)
111
     */
109
	 * (non-Javadoc)
110
	 * @see org.gvsig.raster.cache.buffer.Buffer#addDrawableBands(int[])
111
	 */
112
	public void addDrawableBands(int[] bands) {
113
		
114
	}
115
	
116
	/*
117
	 * (non-Javadoc)
118
	 * @see org.gvsig.raster.cache.buffer.Buffer#copyBand(int, org.gvsig.raster.cache.buffer.Band)
119
	 */
112 120
	public void copyBand(int iBand, Band band) throws BandNotCompatibleException, OperationNotSupportedException {
113 121
		if(band.getDataType() != this.getDataType())
114 122
			throw new BandNotCompatibleException("Diferent data types");
......
173 181
	}
174 182
	
175 183
	/*
176
     * (non-Javadoc)
177
     * @see org.gvsig.fmap.driver.IRasterBuffer#swapBands(int, int)
178
     */
184
	 * (non-Javadoc)
185
	 * @see org.gvsig.raster.cache.buffer.Buffer#swapBands(int, int)
186
	 */
179 187
	public void swapBands(int band1, int band2) throws WrongParameterException, IOException {
180 188
		if(band1 < 0 || band1 > getBandCount() - 1 || band2 < 0 || band2 > getBandCount() - 1)
181 189
			throw new WrongParameterException("Wrong band number");
......
210 218
	
211 219
	/*
212 220
	 * (non-Javadoc)
213
	 * @see org.gvsig.raster.dataset.IBuffer#isInside(int, int)
221
	 * @see org.gvsig.raster.cache.buffer.Buffer#isInside(int, int)
214 222
	 */
215 223
	public boolean isInside(int x, int y) {
216 224
		if (x < 0 || y < 0 || x >= getWidth() || y >= getHeight())
......
219 227
	}
220 228
		
221 229
	/*
222
	 *  (non-Javadoc)
223
	 * @see org.gvsig.fmap.driver.IBuffer#getNotValidValue()
230
	 * (non-Javadoc)
231
	 * @see org.gvsig.raster.cache.buffer.Buffer#getNotValidValue()
224 232
	 */
225 233
	public double getNotValidValue(){
226 234
		return notValidValue;
227 235
	}
228 236
	
229 237
	/*
230
	 *  (non-Javadoc)
231
	 * @see org.gvsig.fmap.driver.IBuffer#setNotValidValue(java.lang.Object)
238
	 * (non-Javadoc)
239
	 * @see org.gvsig.raster.cache.buffer.Buffer#setNotValidValue(double)
232 240
	 */
233 241
	public void setNotValidValue(double value){
234 242
		this.notValidValue = value;
235 243
	}
236 244
	
237 245
	/*
238
	 *  (non-Javadoc)
239
	 * @see org.gvsig.fmap.driver.IBuffer#cloneBuffer()
246
	 * (non-Javadoc)
247
	 * @see org.gvsig.raster.cache.buffer.Buffer#cloneBuffer()
240 248
	 */
241 249
	public abstract Buffer cloneBuffer();
242 250

  
243 251
	/*
244 252
	 * (non-Javadoc)
245
	 * @see org.fv.raster.buffer.IRasterBuffer#getAdjustedWindow(int, int, int)
253
	 * @see org.gvsig.raster.cache.buffer.Buffer#getAdjustedWindow(int, int, int)
246 254
	 */
247 255
	public Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws InterruptedException {
248 256
		BufferInterpolationImpl interp = new BufferInterpolationImpl(this);
......
275 283
	
276 284
	/*
277 285
	 * (non-Javadoc)
278
	 * @see org.fv.raster.buffer.IRasterBuffer#getStatistics()
286
	 * @see org.gvsig.raster.cache.buffer.Buffer#getStatistics()
279 287
	 */
280 288
	public BufferStats getStatistics() {
281 289
		if(statistics == null)
......
283 291
		return statistics;
284 292
	}
285 293
	
294
	/*
295
	 * (non-Javadoc)
296
	 * @see org.gvsig.raster.cache.buffer.histogram.Histogramable#getHistogramComputer()
297
	 */
286 298
	public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
287 299
		if(histogramComputer == null)
288 300
			histogramComputer = new BufferHistogramComputer(this);

Also available in: Unified diff