|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.awt.image.SampleModel
public abstract class SampleModel
この抽象クラスは、イメージにあるピクセルのサンプルを抽出するインタフェースを定義します。イメージデータはすべて、ピクセルのコレクションとして表現されます。各ピクセルは多数のサンプルで構成されます。サンプルはイメージの 1 バンドのデータです。バンドはイメージにある特定のタイプのすべてのサンプルで構成されます。たとえばピクセルが、赤色成分、緑色成分、青色成分を表す 3 つのサンプルを含んでいるとします。このピクセルを含むイメージには 3 つのバンドがあります。1 つのバンドはイメージのすべてのピクセルのすべての赤色サンプルで構成されます。2 つ目のバンドはすべての緑色サンプルで構成され、残りのバンドはすべての青色サンプルで構成されます。ピクセルはさまざまな形式で格納できます。たとえば、特定のバンドのすべてのサンプルを連続して格納したり、単一のピクセルのすべてのサンプルを連続して格納したりできます。
SampleModel のサブクラスは、unsigned 8-bit byte、signed 16-bit short などの、表現可能なサンプルのデータ型を指定します。メモリ上でのサンプルの配置方法も指定可能です。Java 2D(TM) API では、組み込み型のイメージ処理演算子では、使用可能なすべてのサンプルデータ型の演算を行わず、16 ビット以下の符号なし整数のサンプルの演算だけを実行します。演算子によっては、より多くのサンプルデータ型に対応しているものもあります。
ピクセルの集合は、DataBuffer と SampleModel で構成される Raster として表されます。SampleModel を使うと、DataBuffer 内のサンプルにアクセスできます。また、DataBuffer でサンプルおよびピクセルを直接操作するためにプログラマが使用できる低レベルの情報を提供します。
このクラスは、一般にはイメージ処理のためのフォールバックメソッドです。より効率的にコードを記述すれば、適切なサブクラスに SampleModel をキャストして、DataBuffer のピクセルを直接操作するために必要な情報を抽出できます。
@see java.awt.image.Raster @see java.awt.image.ComponentSampleModel @see java.awt.image.PixelInterleavedSampleModel @see java.awt.image.BandedSampleModel @see java.awt.image.MultiPixelPackedSampleModel @see java.awt.image.SinglePixelPackedSampleModel
フィールドの概要 | |
---|---|
protected int |
dataType
ピクセルデータを格納する DataBuffer のデータ型 @see java.awt.image.DataBuffer |
protected int |
height
この SampleModel が記述するイメージデータの領域の高さ (単位はピクセル) です。 |
protected int |
numBands
この SampleModel が記述するイメージデータのバンド数です。 |
protected int |
width
この SampleModel が記述するイメージデータの領域の幅 (単位はピクセル) です。 |
コンストラクタの概要 | |
---|---|
SampleModel(int dataType,
int w,
int h,
int numBands)
指定されたパラメータを使って SampleModel を構築します。 |
メソッドの概要 | |
---|---|
abstract SampleModel |
createCompatibleSampleModel(int w,
int h)
この SampleModel の形式でデータが記述されている、幅と高さが異なる SampleModel を生成します。 |
abstract DataBuffer |
createDataBuffer()
この SampleModel に対応する DataBuffer を生成します。 |
abstract SampleModel |
createSubsetSampleModel(int[] bands)
この SampleModel のバンドのサブセットを使って新しい SampleModel を生成します。 |
Object |
getDataElements(int x,
int y,
int w,
int h,
Object obj,
DataBuffer data)
TransferType 型のプリミティブ配列の、指定されたピクセル矩形のピクセルデータを返します。 |
abstract Object |
getDataElements(int x,
int y,
Object obj,
DataBuffer data)
transferType 型のプリミティブ配列内の 1 つのピクセルのデータを返します。 |
int |
getDataType()
ピクセルデータが格納されている DataBuffer のデータ型を返します。 |
int |
getHeight()
高さをピクセル数で返します。 |
int |
getNumBands()
イメージデータのバンドの総数を返します。 |
abstract int |
getNumDataElements()
getDataElements メソッドと setDataElements メソッドで、1 つのピクセルを転送するために必要なデータ要素の数を返します。 |
double[] |
getPixel(int x,
int y,
double[] dArray,
DataBuffer data)
double の配列内の指定されたピクセルのサンプルを返します。 |
float[] |
getPixel(int x,
int y,
float[] fArray,
DataBuffer data)
float の配列内の指定されたピクセルのサンプルを返します。 |
int[] |
getPixel(int x,
int y,
int[] iArray,
DataBuffer data)
int 配列内の指定されたピクセルのサンプルを返します。 |
double[] |
getPixels(int x,
int y,
int w,
int h,
double[] dArray,
DataBuffer data)
double 配列のピクセル矩形のすべてのサンプルを返します。 |
float[] |
getPixels(int x,
int y,
int w,
int h,
float[] fArray,
DataBuffer data)
float 配列のピクセル矩形のすべてのサンプルを返します。 |
int[] |
getPixels(int x,
int y,
int w,
int h,
int[] iArray,
DataBuffer data)
int 配列のピクセル矩形のすべてのサンプルを返します。 |
abstract int |
getSample(int x,
int y,
int b,
DataBuffer data)
(x, y) に位置するピクセルの指定されたバンド内のサンプルを int として返します。 |
double |
getSampleDouble(int x,
int y,
int b,
DataBuffer data)
(x, y) に位置するピクセルの指定されたバンド内のサンプルを double として返します。 |
float |
getSampleFloat(int x,
int y,
int b,
DataBuffer data)
(x, y) に位置するピクセルの指定されたバンド内のサンプルを float として返します。 |
double[] |
getSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray,
DataBuffer data)
double 配列内の指定されたピクセル矩形の、指定されたバンドのサンプルを返します。 |
float[] |
getSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray,
DataBuffer data)
float 配列内の指定されたピクセル矩形の、指定されたバンドのサンプルを返します。 |
int[] |
getSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray,
DataBuffer data)
int 配列の指定されたピクセルの矩形の、指定されたバンドのサンプルを返します。 |
abstract int[] |
getSampleSize()
すべてのバンドについて、サンプルのサイズをビット単位で返します。 |
abstract int |
getSampleSize(int band)
指定されたバンドのサンプルのサイズをビット単位で返します。 |
int |
getTransferType()
getDataElements メソッドと setDataElements メソッドで、1 つのピクセルを転送するために必要なデータ要素の数を返します。 |
int |
getWidth()
幅をピクセル数で返します。 |
void |
setDataElements(int x,
int y,
int w,
int h,
Object obj,
DataBuffer data)
TransferType 型のプリミティブ配列から、指定された DataBuffer 内のピクセル矩形のデータを設定します。 |
abstract void |
setDataElements(int x,
int y,
Object obj,
DataBuffer data)
TransferType 型のプリミティブ配列からの、指定された DataBuffer 内の 1 つのピクセルのデータを設定します。 |
void |
setPixel(int x,
int y,
double[] dArray,
DataBuffer data)
サンプルの double 配列を入力として、DataBuffer 内のピクセルを設定します。 |
void |
setPixel(int x,
int y,
float[] fArray,
DataBuffer data)
サンプルの float 配列を入力として、DataBuffer 内のピクセルを設定します。 |
void |
setPixel(int x,
int y,
int[] iArray,
DataBuffer data)
サンプルの int 配列を入力として、DataBuffer 内のピクセルを設定します。 |
void |
setPixels(int x,
int y,
int w,
int h,
double[] dArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている double 配列から、ピクセルの矩形のすべてのサンプルを設定します。 |
void |
setPixels(int x,
int y,
int w,
int h,
float[] fArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている float 配列から、ピクセルの矩形のすべてのサンプルを設定します。 |
void |
setPixels(int x,
int y,
int w,
int h,
int[] iArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている int 配列から、ピクセルの矩形のすべてのサンプルを設定します。 |
void |
setSample(int x,
int y,
int b,
double s,
DataBuffer data)
double を入力とし、DataBuffer 内の (x, y) に位置するピクセルの、指定されたバンド内のサンプルを設定します。 |
void |
setSample(int x,
int y,
int b,
float s,
DataBuffer data)
float を入力とし、DataBuffer 内の (x, y) に位置するピクセルの、指定されたバンド内のサンプルを設定します。 |
abstract void |
setSample(int x,
int y,
int b,
int s,
DataBuffer data)
int を入力とし、DataBuffer 内の (x, y) に位置するピクセルの、指定したバンド内のサンプルを設定します。 |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている double 配列から、指定されたピクセルの矩形の指定されたバンド内のサンプルを設定します。 |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている float 配列から、指定されたピクセルの矩形の指定されたバンド内のサンプルを設定します。 |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray,
DataBuffer data)
配列要素ごとに 1 つのサンプルが格納されている int 配列から、指定されたピクセルの矩形の指定されたバンド内のサンプルを設定します。 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected int width
protected int height
protected int numBands
protected int dataType
コンストラクタの詳細 |
---|
public SampleModel(int dataType, int w, int h, int numBands)
dataType
- ピクセルデータを格納する DataBuffer のデータ型w
- イメージデータの領域の幅 (単位はピクセル)h
- イメージデータの領域の高さ (単位はピクセル)numBands
- イメージデータのバンド数
IllegalArgumentException
- w
または h
がゼロ以下の場合
IllegalArgumentException
- w
と h
の積が Integer.MAX_VALUE
より大きい場合
IllegalArgumentException
- dataType
がサポートされていない場合メソッドの詳細 |
---|
public final int getWidth()
SampleModel
が記述するイメージデータの領域の幅 (単位はピクセル)
public final int getHeight()
SampleModel
が記述するイメージデータの領域の高さ (単位はピクセル)
public final int getNumBands()
SampleModel
が記述するイメージデータのバンド数
public abstract int getNumDataElements()
public final int getDataType()
public int getTransferType()
public int[] getPixel(int x, int y, int[] iArray, DataBuffer data)
x, y
- ピクセル位置の座標iArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または iArray が小さすぎて出力を保持できない場合setPixel(int, int, int[], DataBuffer)
public abstract Object getDataElements(int x, int y, Object obj, DataBuffer data)
次のコードは、SampleModel sm1
によってストレージレイアウトが記述されている DataBuffer db1
から、SampleModel sm2
によってストレージレイアウトが記述されている DataBuffer db2
へ、1 ピクセルのデータを転送する例です。通常、この転送は getPixel/setPixel を使うよりも効率的です。
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1), db2);SampleModel のバンド数が同じで、対応するバンドのサンプルあたりのビット数が同じで、TransferType が同じである場合、2 つの DataBuffer/SampleModel 間の転送には、getDataElements/setDataElements を使用するのが適切です。
obj が null でない場合は、TransferType 型のプリミティブ配列になります。そうでない場合は、ClassCastException がスローされます。座標が境界内にない場合、または obj が null でなく、ピクセルデータを格納するために十分なサイズでない場合は、ArrayIndexOutOfBoundsException がスローされます。
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標obj
- null でない場合は、ピクセルデータが返されるプリミティブ配列data
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または obj が小さすぎて出力を保持できない場合getNumDataElements()
,
getTransferType()
,
DataBuffer
,
setDataElements(int, int, Object, DataBuffer)
public Object getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
次のコードは、SampleModel sm1
によってストレージレイアウトが記述されている DataBuffer db1
から、SampleModel sm2
によってストレージレイアウトが記述されている DataBuffer db2
へ、ピクセルの矩形領域のデータを転送する例です。通常、この転送は getPixels/setPixels を使うよりも効率的です。
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w, h, null, db1), db2);SampleModel のバンド数が同じで、対応するバンドのサンプルあたりのビット数が同じで、TransferType が同じである場合、2 つの DataBuffer/SampleModel 間の転送には、getDataElements/setDataElements を使用するのが適切です。
obj が null でない場合は、TransferType 型のプリミティブ配列になります。そうでない場合は、ClassCastException がスローされます。座標が境界内にない場合、または obj が null でなく、ピクセルデータを格納するために十分なサイズでない場合は、ArrayIndexOutOfBoundsException がスローされます。
x
- ピクセル矩形の最小の X 座標y
- ピクセル矩形の最小の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さobj
- null でない場合は、ピクセルデータが返されるプリミティブ配列data
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または obj が小さすぎて出力を保持できない場合getNumDataElements()
,
getTransferType()
,
setDataElements(int, int, int, int, Object, DataBuffer)
,
DataBuffer
public abstract void setDataElements(int x, int y, Object obj, DataBuffer data)
次のコードは、SampleModel sm1
によってストレージレイアウトが記述されている DataBuffer db1
から、SampleModel sm2
によってストレージレイアウトが記述されている DataBuffer db2
へ、1 ピクセルのデータを転送する例です。通常、この転送は getPixel/setPixel を使うよりも効率的です。
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1), db2);SampleModel のバンド数が同じで、対応するバンドのサンプルあたりのビット数が同じで、TransferType が同じである場合、2 つの DataBuffer/SampleModel 間の転送には、getDataElements/setDataElements を使用するのが適切です。
obj は TransferType 型のプリミティブ配列でなければなりません。そうでない場合は、ClassCastException がスローされます。座標が境界内にない場合、または obj がピクセルデータを格納するために十分なサイズでない場合は、ArrayIndexOutOfBoundsException がスローされます。
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標obj
- ピクセルデータを格納するプリミティブ配列data
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または obj が小さすぎて入力を保持できない場合getNumDataElements()
,
getTransferType()
,
getDataElements(int, int, Object, DataBuffer)
,
DataBuffer
public void setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
次のコードは、SampleModel sm1
によってストレージレイアウトが記述されている DataBuffer db1
から、SampleModel sm2
によってストレージレイアウトが記述されている DataBuffer db2
へ、ピクセルの矩形領域のデータを転送する例です。通常、この転送は getPixels/setPixels を使うよりも効率的です。
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w, h, null, db1), db2);SampleModel のバンド数が同じで、対応するバンドのサンプルあたりのビット数が同じで、TransferType が同じである場合、2 つの DataBuffer/SampleModel 間の転送には、getDataElements/setDataElements を使用するのが適切です。
obj は TransferType 型のプリミティブ配列でなければなりません。そうでない場合は、ClassCastException がスローされます。座標が境界内にない場合、または obj がピクセルデータを格納するために十分なサイズでない場合は、ArrayIndexOutOfBoundsException がスローされます。
x
- ピクセル矩形の最小の X 座標y
- ピクセル矩形の最小の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さobj
- ピクセルデータを格納するプリミティブ配列data
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または obj が小さすぎて入力を保持できない場合getNumDataElements()
,
getTransferType()
,
getDataElements(int, int, int, int, Object, DataBuffer)
,
DataBuffer
public float[] getPixel(int x, int y, float[] fArray, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標fArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または fArray が小さすぎて出力を保持できない場合setPixel(int, int, float[], DataBuffer)
public double[] getPixel(int x, int y, double[] dArray, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標dArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または dArray が小さすぎて出力を保持できない場合setPixel(int, int, double[], DataBuffer)
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さiArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または iArray が小さすぎて出力を保持できない場合setPixels(int, int, int, int, int[], DataBuffer)
public float[] getPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さfArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または fArray が小さすぎて出力を保持できない場合setPixels(int, int, int, int, float[], DataBuffer)
public double[] getPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さdArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または dArray が小さすぎて出力を保持できない場合setPixels(int, int, int, int, double[], DataBuffer)
public abstract int getSample(int x, int y, int b, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合setSample(int, int, int, int, DataBuffer)
public float getSampleFloat(int x, int y, int b, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合public double getSampleDouble(int x, int y, int b, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合public int[] getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドiArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または iArray が小さすぎて出力を保持できない場合setSamples(int, int, int, int, int, int[], DataBuffer)
public float[] getSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドfArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または fArray が小さすぎて出力を保持できない場合setSamples(int, int, int, int, int, float[], DataBuffer)
public double[] getSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドdArray
- null でない場合、この配列内のサンプルを返すdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または dArray が小さすぎて出力を保持できない場合setSamples(int, int, int, int, int, double[], DataBuffer)
public void setPixel(int x, int y, int[] iArray, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標iArray
- int 配列形式の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- iArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または iArray が小さすぎて入力を保持できない場合getPixel(int, int, int[], DataBuffer)
public void setPixel(int x, int y, float[] fArray, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標fArray
- float 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- fArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または fArray が小さすぎて入力を保持できない場合getPixel(int, int, float[], DataBuffer)
public void setPixel(int x, int y, double[] dArray, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標dArray
- double 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- dArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または fArray が小さすぎて入力を保持できない場合getPixel(int, int, double[], DataBuffer)
public void setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さiArray
- int 配列形式の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- iArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または iArray が小さすぎて入力を保持できない場合getPixels(int, int, int, int, int[], DataBuffer)
public void setPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さfArray
- float 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- fArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または fArray が小さすぎて入力を保持できない場合getPixels(int, int, int, int, float[], DataBuffer)
public void setPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さdArray
- double 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- dArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標が境界内にない場合、または dArray が小さすぎて入力を保持できない場合getPixels(int, int, int, int, double[], DataBuffer)
public abstract void setSample(int x, int y, int b, int s, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 設定されるバンドs
- int の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合getSample(int, int, int, DataBuffer)
public void setSample(int x, int y, int b, float s, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 設定されるバンドs
- float の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合getSample(int, int, int, DataBuffer)
public void setSample(int x, int y, int b, double s, DataBuffer data)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 設定されるバンドs
- double の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- データが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合getSample(int, int, int, DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 設定されるバンドiArray
- int 配列形式の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- iArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または iArray が小さすぎて入力を保持できない場合getSamples(int, int, int, int, int, int[], DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 設定されるバンドfArray
- float 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- fArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または fArray が小さすぎて入力を保持できない場合getSamples(int, int, int, int, int, float[], DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 設定されるバンドdArray
- double 配列の入力サンプルdata
- イメージデータを格納する DataBuffer
NullPointerException
- dArray またはデータが null の場合
ArrayIndexOutOfBoundsException
- 座標またはバンドインデックスが境界内にない場合、または dArray が小さすぎて入力を保持できない場合getSamples(int, int, int, int, int, double[], DataBuffer)
public abstract SampleModel createCompatibleSampleModel(int w, int h)
SampleModel
と同じイメージデータを記述するが、サイズの異なる SampleModel
public abstract SampleModel createSubsetSampleModel(int[] bands)
bands
- この SampleModel
のバンドのサブセット
SampleModel
のバンドのサブセットを持つ SampleModel
public abstract DataBuffer createDataBuffer()
SampleModel
に対応する DataBuffer
public abstract int[] getSampleSize()
public abstract int getSampleSize(int band)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。