Package skyview.geometry
Class Sampler
java.lang.Object
skyview.geometry.Sampler
- All Implemented Interfaces:
Serializable
,Cloneable
,Component
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]
This gives the minX,maxX, minY,maxY pixel values for the current output image.protected int
protected int
protected Image
The input image.protected int
protected int
protected int
protected Image
The output image.protected int
protected Transformer
The transformation from the output image to the input image. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Allow someone to get a copy of this sampler for use on another image.static Sampler
Factory for creating samplersabstract void
sample
(int index) Find the value in the input data to put in the output data.void
setBounds
(int[] bounds) Set the bounds of the output image that may be asked for.void
Set the input image for the samplingvoid
setOrder
(int order) Set the order of the classifier.void
Set the output image for the samplingvoid
setTransform
(Transformer transform) Set the transformation information.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface skyview.Component
getDescription, getName
-
Field Details
-
inImage
The input image. It should have a size inHeight*inWidth*inDepth -
inHeight
protected int inHeight -
inWidth
protected int inWidth -
inDepth
protected int inDepth -
bounds
protected int[] boundsThis gives the minX,maxX, minY,maxY pixel values for the current output image. We can use this to limit the region of the input image we are interested in. -
outImage
The output image. It should have a size outHeight*outWidth*outDepth -
outHeight
protected int outHeight -
outWidth
protected int outWidth -
outDepth
protected int outDepth -
trans
The transformation from the output image to the input image.
-
-
Constructor Details
-
Sampler
public Sampler()
-
-
Method Details
-
sample
public abstract void sample(int index) Find the value in the input data to put in the output data. The output array defined in a previous setOutput call is updated.- Parameters:
index
- The index into the output array.
-
clone
Allow someone to get a copy of this sampler for use on another image. -
setInput
Set the input image for the sampling -
setBounds
public void setBounds(int[] bounds) Set the bounds of the output image that may be asked for. -
setOutput
Set the output image for the sampling -
setTransform
Set the transformation information.- Parameters:
transform
- The transformer object.
-
factory
Factory for creating samplers -
setOrder
public void setOrder(int order) Set the order of the classifier. By default this does nothing but it defines the order of the sampling for some samplers.
-