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 newFeatureInputMarkinstance.FeatureInputMark(Mark mark, Dimensions dimensions, Dictionary dictionary) Constructs a new instance with a mark, dimensions, and dictionary. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe 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.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.anchoranalysis.feature.input.FeatureInputDictionary
getDictionaryRequiredMethods 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 newFeatureInputMarkinstance.- 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:FeatureInputWithResolutionThe resolution of the associated image, if it is available.- Specified by:
getResolutionOptionalin interfaceFeatureInputWithResolution- Returns:
- the resolution, if it is available.
-
getDictionaryOptional
Description copied from interface:FeatureInputDictionaryThe associated dictionary, if it exists.- Specified by:
getDictionaryOptionalin interfaceFeatureInputDictionary- Returns:
- the dictionary, if it exists.
-
getDimensionsOptional
Gets the optional dimensions associated with this feature input.- Returns:
- an
Optionalcontaining 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.
-