|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object viper.descriptors.attributes.AbstractAttribute viper.descriptors.attributes.Attribute viper.descriptors.attributes.Attribute_polygon viper.descriptors.attributes.Attribute_bbox
This attribute represents a rectangle or Bounding Box. It has dice, overlap, and equality metrics.
Nested Class Summary | |
protected static class |
Attribute_bbox.Bbox
|
protected static class |
Attribute_bbox.Crops
Crops all rectangles to be within the given rectangle Returns false when the rectangle is without the window. |
protected static class |
Attribute_bbox.ProportionalResizer
Modifies the boxes widths and heights about the center. |
protected static class |
Attribute_bbox.Resizer
Adds to the boxes size by some fixed number of pixels. |
Nested classes inherited from class viper.descriptors.attributes.Attribute_polygon |
Attribute_polygon.Sizer |
Nested classes inherited from class viper.filters.Filterable |
Filterable.Rule |
Field Summary |
Fields inherited from class viper.descriptors.attributes.Attribute |
composition, compositionTolerance, compositionType, errors, value |
Constructor Summary | |
Attribute_bbox()
Create an empty Attribute. toString will return an empty String until more is known. |
|
Attribute_bbox(Attribute old)
Constructs a new copy of the old bbox value. |
|
Attribute_bbox(boolean mobile)
Attributes for OBJECT type should use this constructor, with mobile set to true. |
Method Summary | |
java.lang.Object |
clone()
Returns a clone of this Attribute. |
Filterable.Rule |
convertRule(java.lang.String unparsedRule,
java.util.List unparsedValues,
ErrorWriter err)
This converts a string into a rule, writing out errors in the format to err . |
java.lang.String |
getType()
Returns the Attribute type, eg lvalue or bbox . |
boolean |
isCompositionType(java.lang.String s)
This allows attributes to define their own composition types in addition to the default ones. |
boolean |
isValidRule(java.lang.String ruleName)
Tell if a name is a valid rule or not |
boolean |
possibleValueOf(java.lang.String S)
Determines if this Attribute can take the value specified. |
Methods inherited from class viper.descriptors.attributes.Attribute_polygon |
getArea, getAreaOfIntersectionWith, setArchetype, setArchetype |
Methods inherited from class viper.descriptors.attributes.Attribute |
compareTo, compose, crop, getCompositionType, getExtraConfig, getStaticValue, getValue, getValues, getValueToString, getXMLFormat, getXMLFormat, isType, nullXML, nullXML, parseExtraConfig, passes, possibleValueOf, setCompositionType, setDefaultValue, setDefaultValue, setExtraConfig, setFrameSpan, setName, setOutputWidth, setStaticValue, setValue, setValue, setValue, setValue, setValue, toString |
Methods inherited from class viper.descriptors.attributes.AbstractAttribute |
getArchetype, getDefault, getExtraConfigInXML, getExtraConfigString, getName, isDynamic, loadAttributeType, named, named, parseAnInt, resetDefault, setArchetype, setDynamic |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Attribute_bbox()
public Attribute_bbox(boolean mobile)
mobile
- Descriptor that holds this Attribute is of type OBJECTpublic Attribute_bbox(Attribute old)
old
- the old value.Method Detail |
public boolean isCompositionType(java.lang.String s)
Attribute
isCompositionType
in class Attribute
s
- the name of composition type to test
public java.lang.String getType()
AbstractAttribute
lvalue
or bbox
.
getType
in class Attribute_polygon
public java.lang.Object clone()
Attribute
clone
in class Attribute_polygon
public boolean possibleValueOf(java.lang.String S)
possibleValueOf
in class Attribute
S
- the string to be tested
public boolean isValidRule(java.lang.String ruleName)
Filterable
isValidRule
in interface Filterable
isValidRule
in class Attribute_polygon
public Filterable.Rule convertRule(java.lang.String unparsedRule, java.util.List unparsedValues, ErrorWriter err) throws BadDataException
Attribute_polygon
err
.
convertRule
in interface Filterable
convertRule
in class Attribute_polygon
unparsedRule
- A string containing a single rule.unparsedValues
- A string containing values.err
- A place to log the errors.
BadDataException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |