Class FeatureInputMark
Object
FeatureInputMark
- All Implemented Interfaces:
FeatureInput
,FeatureInputDictionary
,FeatureInputWithResolution
A feature input that wraps a
Mark
along with optional dimensions and dictionary.
This class implements FeatureInputDictionary
to provide dictionary-related
functionality for feature calculations on marks.
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureInputMark
(Mark mark, Optional<Dimensions> dimensions) Constructs a new instance with a mark and optional dimensions.FeatureInputMark
(Mark mark, Optional<Dimensions> dimensions, Optional<Dictionary> dictionary) Creates a newFeatureInputMark
instance.FeatureInputMark
(Mark mark, Dimensions dimensions, Dictionary dictionary) Constructs a new instance with a mark, dimensions, and dictionary. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The associated dictionary, if it exists.Gets the optional dimensions associated with this feature input.Gets the dimensions associated with this feature input, throwing an exception if not present.getMark()
The mark associated with this feature input.The resolution of the associated image, if it is available.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.anchoranalysis.feature.input.FeatureInputDictionary
getDictionaryRequired
Methods inherited from interface org.anchoranalysis.feature.input.FeatureInputWithResolution
getResolutionRequired
-
Constructor Details
-
FeatureInputMark
Constructs a new instance with a mark and optional dimensions.- Parameters:
mark
- the markdimensions
- optional dimensions
-
FeatureInputMark
Constructs a new instance with a mark, dimensions, and dictionary.- Parameters:
mark
- the markdimensions
- the dimensionsdictionary
- the dictionary
-
FeatureInputMark
public FeatureInputMark(Mark mark, Optional<Dimensions> dimensions, Optional<Dictionary> dictionary) Creates a newFeatureInputMark
instance.- Parameters:
mark
- The mark associated with this feature input.dimensions
- Optional dimensions associated with the mark.dictionary
- Optional dictionary associated with the mark.
-
-
Method Details
-
getResolutionOptional
Description copied from interface:FeatureInputWithResolution
The resolution of the associated image, if it is available.- Specified by:
getResolutionOptional
in interfaceFeatureInputWithResolution
- Returns:
- the resolution, if it is available.
-
getDictionaryOptional
Description copied from interface:FeatureInputDictionary
The associated dictionary, if it exists.- Specified by:
getDictionaryOptional
in interfaceFeatureInputDictionary
- Returns:
- the dictionary, if it exists.
-
getDimensionsOptional
Gets the optional dimensions associated with this feature input.- Returns:
- an
Optional
containing the dimensions, if present
-
getDimensionsRequired
Gets the dimensions associated with this feature input, throwing an exception if not present.- Returns:
- the dimensions
- Throws:
FeatureCalculationException
- if dimensions are not present
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getMark
The mark associated with this feature input.
-