public abstract class AbstractFeatureDescriptor extends Object implements FeatureDescriptor
Descriptor.Supports
Modifier and Type | Field and Description |
---|---|
protected PropertyChangeSupport |
pcs
Property change support that can be used by the implementing class to inform listeners about updates.
|
DOES_ALL
Constructor and Description |
---|
AbstractFeatureDescriptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addData(double[] data)
Adds the double array to the list.
|
protected void |
addData(int[] data)
Converts the given int array to double[] and adds this array to the list.
|
protected void |
addData(List<double[]> data)
Adds the double array list to the list of data arrays.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a Property change listener for this feature vector.
|
protected void |
endProgress() |
protected void |
firePropertyChange(Progress event)
Propagates the given progress event using property change support.
|
List<double[]> |
getFeatures()
Returns a reference to the data calculated by the according descriptor.
|
ij.process.ImageProcessor |
getMask()
returns the current mask
|
protected boolean |
inMask(int x,
int y)
Check wether a pixel is inside a set mask.
|
protected void |
setMask(ij.process.ImageProcessor ip)
Sets / stores the mask applied to the referenced image processor.
|
void |
setProperties(LibProperties properties)
Injects the properties class that can be used to retrieve several
properties.
|
protected void |
startProgress() |
EnumSet<Descriptor.Supports> |
supports()
Determine the capabilities of this algorithm.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription
run
protected final PropertyChangeSupport pcs
public List<double[]> getFeatures()
getFeatures
in interface FeatureDescriptor
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface Descriptor
listener
- Progress.START
,
Progress.END
,
Progress
protected void addData(double[] data)
data
protected void addData(int[] data)
data
protected void addData(List<double[]> data)
data
- data
protected void firePropertyChange(Progress event)
event
- public void setProperties(LibProperties properties) throws IOException
FeatureDescriptor
setProperties
in interface FeatureDescriptor
IOException
- if something went wrongpublic EnumSet<Descriptor.Supports> supports()
Descriptor
supports
in interface Descriptor
protected void startProgress()
protected void endProgress()
protected void setMask(ij.process.ImageProcessor ip)
ip
- the image processor from which the mask should be takenprotected boolean inMask(int x, int y)
x
- y
- public ij.process.ImageProcessor getMask()
Copyright © 2013. All Rights Reserved.