|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.filters.BorderSampleGenerator
public abstract class BorderSampleGenerator
Abstract base class for classes that fill an int
array with samples
from a rectangular region of an image's channel by
(1) copying int
samples from an IntegerImage
object
and by (2) generating samples that lie outside of the image.
To be used by ConvolutionKernelFilter
and other operations
that require rectangular parts of an image that may not lie fully
inside of the image.
Constructor Summary | |
---|---|
BorderSampleGenerator(IntegerImage integerImage,
int areaWidth,
int areaHeight)
Initialize width and height of the area to be covered in every call to fill(int, int, int[]) , also provides the image to be used for data copying. |
Method Summary | |
---|---|
abstract void |
fill(int x,
int y,
int[] samples)
Fills the argument array with samples from the current channel of the image given to the constructor, generating samples that lie outside of the image. |
int |
getAreaHeight()
Returns the number of rows from which data is copied or generated with every call to fill(int, int, int[]) . |
int |
getAreaWidth()
Returns the number of columns from which data is copied or generated with every call to fill(int, int, int[]) . |
int |
getChannelIndex()
Returns the index of the channel of the image from which data is copied. |
IntegerImage |
getImage()
Returns the image from which data is copied. |
void |
setChannelIndex(int newChannelIndex)
Sets the channel from which data is copied in fill(int, int, int[]) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BorderSampleGenerator(IntegerImage integerImage, int areaWidth, int areaHeight)
fill(int, int, int[])
, also provides the image to be used for data copying.
The current channel is set to 0.
integerImage
- the image from which samples will be copiedareaWidth
- number of columns of the area to be covered in fill(int, int, int[])
areaHeight
- number of rows of the area to be covered in fill(int, int, int[])
Method Detail |
---|
public abstract void fill(int x, int y, int[] samples)
The implementation of this method is left to the child classes. There are different ways to generate new samples, and each child class is supposed to implement another way. Obviously, the child classes also must copy samples from the image.
x
- leftmost column to be copied or generatedy
- top row to be copied or generatedsamples
- array to which samples will be written; must have at least
getAreaWidth()
times getAreaHeight()
elementspublic int getAreaHeight()
fill(int, int, int[])
.
public int getAreaWidth()
fill(int, int, int[])
.
public int getChannelIndex()
setChannelIndex(int)
public IntegerImage getImage()
public void setChannelIndex(int newChannelIndex)
fill(int, int, int[])
.
getChannelIndex()
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |