public abstract class AbstractBuffer extends BaseWeakReferencingObservable implements Buffer
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Band> |
bands |
protected BufferDimensions |
dimensions |
protected static Logger |
logger |
protected IProjection |
projection |
protected Statistics |
statistics |
INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, INTERPOLATION_Undefined| Constructor and Description |
|---|
AbstractBuffer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBand(Band band)
Adds a band
|
boolean |
areAllBandsOfTheSameType() |
Buffer |
clip(Envelope envelope) |
Buffer |
convert(ICoordTrans ct,
SimpleTaskStatus status)
Converts buffer using specified coordinate transformation
|
Buffer |
createInterpolated(int rows,
int columns,
int interpolationMode,
SimpleTaskStatus status)
Creates a interpolated buffer
|
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
void |
doDispose()
Internal implementation for the
dispose() method. |
protected void |
finalize() |
Band |
getBand(int pos)
Gets the band in the "pos" position
|
Band.BandByte |
getBandByte(int pos) |
int |
getBandCount() |
Band.BandDouble |
getBandDouble(int pos) |
Band.BandFloat |
getBandFloat(int pos) |
Band.BandInt |
getBandInt(int pos) |
NoData[] |
getBandNoData() |
Band[] |
getBands() |
Band.BandShort |
getBandShort(int pos) |
BandInfo[] |
getBandsInfo() |
int[] |
getBandTypes() |
int |
getColumns() |
BufferDimensions |
getDimensions() |
Envelope |
getEnvelope() |
double |
getPixelSizeX() |
double |
getPixelSizeY() |
IProjection |
getProjection() |
int |
getRows() |
Statistics |
getStatistics(SimpleTaskStatus status)
Gets the statistics of the object than implements this interface
|
boolean |
isInside(int cellX,
int cellY)
Returns true if passed as parameter cell is inside of the buffer, else returns false.
|
boolean |
isInside(Point point)
Returns true if passed as parameter point is inside of the buffer, else returns false.
|
java.util.Iterator<Band> |
iterator() |
void |
removeBand(int pos)
Removes the band in the "pos" position
|
void |
setBand(int pos,
Band band)
Sets a band in the "pos" position
|
void |
switchBands(int[] positions)
Switches the bands as indicated by the parameter
|
void |
switchBands(int pos1,
int pos2)
Switches two bands
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
addObserver, addObserver, addObservers, beginComplexNotification, clearChanged, clone, countObservers, deleteObserver, deleteObserver, deleteObservers, disableNotifications, enableNotifications, endComplexNotification, hasChanged, inComplex, isEnabledNotifications, notify, notifyObservers, notifyObservers, setChangedequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBufferedImageaddObserver, deleteObserver, deleteObserversprotected static final Logger logger
protected java.util.List<Band> bands
protected IProjection projection
protected Statistics statistics
protected BufferDimensions dimensions
public Statistics getStatistics(SimpleTaskStatus status)
StatisticsCapablegetStatistics in interface StatisticsCapablepublic java.util.Iterator<Band> iterator()
iterator in interface java.lang.Iterable<Band>public void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public int getBandCount()
getBandCount in interface Bufferpublic Band[] getBands()
public int getColumns()
getColumns in interface Bufferpublic Envelope getEnvelope()
getEnvelope in interface Bufferpublic BufferDimensions getDimensions()
getDimensions in interface Bufferpublic IProjection getProjection()
getProjection in interface Bufferpublic boolean isInside(int cellX,
int cellY)
Bufferpublic boolean isInside(Point point)
Bufferpublic void setBand(int pos,
Band band)
throws BandException
BuffersetBand in interface BufferBandExceptionpublic void removeBand(int pos)
BufferremoveBand in interface Bufferpublic Band getBand(int pos)
Bufferpublic Band.BandByte getBandByte(int pos)
getBandByte in interface Bufferpublic Band.BandShort getBandShort(int pos)
getBandShort in interface Bufferpublic Band.BandInt getBandInt(int pos)
getBandInt in interface Bufferpublic Band.BandFloat getBandFloat(int pos)
getBandFloat in interface Bufferpublic Band.BandDouble getBandDouble(int pos)
getBandDouble in interface Bufferpublic void switchBands(int[] positions)
BufferswitchBands in interface Bufferpublic void switchBands(int pos1,
int pos2)
BufferswitchBands in interface Bufferpublic Buffer createInterpolated(int rows, int columns, int interpolationMode, SimpleTaskStatus status) throws BufferException
BuffercreateInterpolated in interface BufferBufferExceptionpublic Buffer convert(ICoordTrans ct, SimpleTaskStatus status) throws BufferException
Bufferconvert in interface Bufferct - Coordinate transformation to convert bufferBufferException - If there are problems converting bufferpublic int[] getBandTypes()
getBandTypes in interface Bufferpublic boolean areAllBandsOfTheSameType()
areAllBandsOfTheSameType in interface Bufferpublic NoData[] getBandNoData()
getBandNoData in interface Bufferpublic Buffer clip(Envelope envelope) throws BufferException
clip in interface BufferBufferExceptionpublic double getPixelSizeX()
getPixelSizeX in interface Bufferpublic double getPixelSizeY()
getPixelSizeY in interface Bufferpublic final void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic void doDispose()
throws BaseException
dispose() method.BaseExceptiondispose()protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic BandInfo[] getBandsInfo()
getBandsInfo in interface Buffer