Package skyview.geometry
Class Sampler
- java.lang.Object
-
- skyview.geometry.Sampler
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]boundsThis gives the minX,maxX, minY,maxY pixel values for the current output image.protected intinDepthprotected intinHeightprotected ImageinImageThe input image.protected intinWidthprotected intoutDepthprotected intoutHeightprotected ImageoutImageThe output image.protected intoutWidthprotected TransformertransThe transformation from the output image to the input image.
-
Constructor Summary
Constructors Constructor Description Sampler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Allow someone to get a copy of this sampler for use on another image.static Samplerfactory(java.lang.String type)Factory for creating samplersabstract voidsample(int index)Find the value in the input data to put in the output data.voidsetBounds(int[] bounds)Set the bounds of the output image that may be asked for.voidsetInput(Image inImage)Set the input image for the samplingvoidsetOrder(int order)Set the order of the classifier.voidsetOutput(Image outImage)Set the output image for the samplingvoidsetTransform(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 Detail
-
inImage
protected Image 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[] bounds
This 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
protected Image 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
protected Transformer trans
The transformation from the output image to the input image.
-
-
Method Detail
-
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
public java.lang.Object clone()
Allow someone to get a copy of this sampler for use on another image.- Overrides:
clonein classjava.lang.Object
-
setInput
public void setInput(Image inImage)
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
public void setOutput(Image outImage)
Set the output image for the sampling
-
setTransform
public void setTransform(Transformer transform)
Set the transformation information.- Parameters:
transform- The transformer object.
-
factory
public static Sampler factory(java.lang.String type)
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.
-
-