|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
view.AstroKernel
public abstract class AstroKernel
A kernel is used for filtering an image to detect stars. I hope that any
kernel one can think of consists of a (quadratic) matrix of floats.
Therefore, methods are supported, getAstroKernel(),
getSizeX() and
getSizeY(). Additionally, for least-square fitting, the quadratic sum
of the kernel minus the sum of the kernel squared divided by the kernel size
is return in the (abstract) getWeight() method. Note that this
latter method is only useful for quadratic kernels.
This class is abstract and not an interface to stress
the importance that the computation of the kernel via the protected
computeAstroKernel() method should always be done directly
after the construction phase using the init() method.
This class work together with the Kernel class by
invoking toImageKernel() on it.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private float[][] |
kernel
The kernel matrix. |
static String |
KEY_CLASS
The key mapping to the CommandLaunching class name. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG |
| Constructor Summary | |
|---|---|
protected |
AstroKernel(Map prop)
Constructs the kernel. |
| Method Summary | |
|---|---|
protected abstract float[][] |
computeAstroKernel()
Computes the kernel. |
static AstroKernel |
createAstroKernel(Map prop)
Constructs a new kernel instance using the mapping of the KEY_CLASS to the class name to derive the class to instantiate. |
float[][] |
getAstroKernel()
Returns the kernel as a two-dimensional float array. |
int |
getSizeX()
Returns the size of the kernel in x. |
int |
getSizeY()
Returns the size of the kernel in y. |
abstract double |
getWeight()
Returns the weight of the kernel. |
void |
init()
Initializes the kernel. |
Kernel |
toImageKernel()
Uses the astro-kernel data to construct a image-kernel, as used in the java.awt.image.Kernel class. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_CLASS
private float[][] kernel
| Constructor Detail |
|---|
protected AstroKernel(Map prop)
computeAstroKernel() method.
To allow concrete subclasses to carry some properties, a map can be
included in the construction phase.
| Method Detail |
|---|
public void init()
createAstroKernel(java.util.Map) is used to build a kernel.
init in interface Initializableinit in class PropertyResourcespublic float[][] getAstroKernel()
public Kernel toImageKernel()
public int getSizeX()
public int getSizeY()
public abstract double getWeight()
protected abstract float[][] computeAstroKernel()
init() method,
i.e. right after the construction of the kernel.
public static final AstroKernel createAstroKernel(Map prop)
KEY_CLASS to the class name to derive the class to instantiate.
If this property is defined, a new AstroKernel
instance with the stated
class name is created, the supplied properties used as an argument in
the constructor. As all kernels are Initializable, the
init() method is called immediately after the construction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||