|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.tools.videolabeler.AnnotationLayer
net.sourceforge.nite.tools.videolabeler.FeeltraceAnnotationLayer
public class FeeltraceAnnotationLayer
In this annotation layer the annotation targets are emotions, consisting
of evaluation and activation. Both evaluation and activation are double
values between -1.0 and +1.0. These values are specified in attributes of an
annotation element. An emotion, defined as a two-dimensional point, can be
displayed in a circle with radius 1 and origin (0,0), where the X value is
the evaluation and the Y value is the activation. These coordinates define
the label of an emotion. The layer uses a FeeltraceColourMap
to map emotions to colours. This map can be obtained with
getColourMap()
.
Constructor Summary | |
---|---|
FeeltraceAnnotationLayer(NLayer layer,
java.lang.String codeName,
java.lang.String panelType,
org.w3c.dom.Node layerInfo)
Constructs a new feeltrace annotation layer. |
Method Summary | |
---|---|
void |
createGap(NOMElement annotation,
double startTime,
double endTime)
Splits an annotation, so there will be a gap between the specified start time and end time. |
double |
getActivation(NOMElement annotation)
Returns the activation of an annotation. |
java.lang.String |
getActivationAttribute()
Returns the name of the attribute that contains the activation value of an annotation. |
FeeltraceColourMap |
getColourMap()
Returns the Feeltrace colour map that maps emotions to colours. |
double |
getEvaluation(NOMElement annotation)
Returns the evaluation of an annotation. |
java.lang.String |
getEvaluationAttribute()
Returns the name of the attribute that contains the evaluation value of an annotation. |
java.lang.String |
getLabel(NOMElement annotation)
Returns the label of the specified annotation. |
java.util.HashMap |
getStyleMap()
Returns a map that maps style names to styles. |
boolean |
sameTargets(NOMElement elem1,
NOMElement elem2)
Compares two annotations and returns true if they have the same evaluation and activation. |
boolean |
showAnnotationArea()
Returns false. |
Methods inherited from class net.sourceforge.nite.tools.videolabeler.AnnotationLayer |
---|
createTargetControlPanel, getCodeElement, getElementFormatter, getNLayer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeeltraceAnnotationLayer(NLayer layer, java.lang.String codeName, java.lang.String panelType, org.w3c.dom.Node layerInfo) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.Exception
Constructs a new feeltrace annotation layer. The layerInfo parameter is the layerinfo element from the configuration file. It should have the following two attributes:
layer
- the NXT layercodeName
- the name of the code elements that represent annotations
in this layerpanelType
- the qualified class name of the target control panel
that should be used with this layerlayerInfo
- the layerinfo element
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.Exception
Method Detail |
---|
public java.lang.String getEvaluationAttribute()
Returns the name of the attribute that contains the evaluation value of an annotation.
public java.lang.String getActivationAttribute()
Returns the name of the attribute that contains the activation value of an annotation.
public FeeltraceColourMap getColourMap()
Returns the Feeltrace colour map that maps emotions to colours.
public java.util.HashMap getStyleMap()
Returns a map that maps style names to styles.
getStyleMap
in class AnnotationLayer
public boolean showAnnotationArea()
Returns false. An annotation frame for this layer should not show the annotation area, because annotations can be visualised in the target control panel.
showAnnotationArea
in class AnnotationLayer
public double getActivation(NOMElement annotation)
Returns the activation of an annotation. This should be a value
between -1.0 and +1.0. If no value could be retrieved, this method
returns Double.NaN
.
annotation
- an annotation
Double.NaN
public double getEvaluation(NOMElement annotation)
Returns the evaluation of an annotation. This should be a value
between -1.0 and +1.0. If no value could be retrieved, this method
returns Double.NaN
.
annotation
- an annotation
Double.NaN
public java.lang.String getLabel(NOMElement annotation)
Returns the label of the specified annotation. The label will consist of the evaluation and the activation, separated by a comma. If no evaluation or activation could be retrieved from the annotation, this method returns null.
getLabel
in class AnnotationLayer
annotation
- an annotation
public void createGap(NOMElement annotation, double startTime, double endTime) throws java.lang.Exception
Splits an annotation, so there will be a gap between the specified start time and end time. The specified annotation must start before the start time and it must end after the end time.
createGap
in class AnnotationLayer
annotation
- the annotation that will be splitstartTime
- the time where the gap will startendTime
- the time where the gap will end
java.lang.Exception
- if an error occurspublic boolean sameTargets(NOMElement elem1, NOMElement elem2)
Compares two annotations and returns true if they have the same evaluation and activation. If the two annotations are adjacent, it means they can be merged into one annotation.
sameTargets
in class AnnotationLayer
elem1
- the first annotationelem2
- the second annotation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |