Class CreateMarkFromPoints
Creates a mark by fitting it to a set of points extracted from other marks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfitMarkToPointsFromMarks
(MarkCollection marks, Dimensions dimensions) Extracts points from marks, creates a new mark, and fits this mark to the extracted points.Provides the mark to be fitted.int
Minimum number of points required to create a mark.Fits the provided mark to the extracted points.boolean
Whether to throw an exception when there are insufficient points.void
setMarkProvider
(SingleMarkProvider markProvider) Provides the mark to be fitted.void
setMinNumPoints
(int minNumPoints) Minimum number of points required to create a mark.void
setPointsFitter
(PointsFitter pointsFitter) Fits the provided mark to the extracted points.void
setThrowExceptionForInsufficientPoints
(boolean throwExceptionForInsufficientPoints) Whether to throw an exception when there are insufficient points.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
CreateMarkFromPoints
public CreateMarkFromPoints()
-
-
Method Details
-
fitMarkToPointsFromMarks
public Optional<Mark> fitMarkToPointsFromMarks(MarkCollection marks, Dimensions dimensions) throws OperationFailedException Extracts points from marks, creates a new mark, and fits this mark to the extracted points.- Parameters:
marks
- a collection of marks containing PointListsdimensions
- the dimensions of the space in which the marks exist- Returns:
- an Optional containing the fitted mark, or empty if fitting was not possible
- Throws:
OperationFailedException
- if the operation fails
-
getMarkProvider
Provides the mark to be fitted. -
setMarkProvider
Provides the mark to be fitted. -
getPointsFitter
Fits the provided mark to the extracted points. -
setPointsFitter
Fits the provided mark to the extracted points. -
getMinNumPoints
public int getMinNumPoints()Minimum number of points required to create a mark. -
setMinNumPoints
public void setMinNumPoints(int minNumPoints) Minimum number of points required to create a mark. -
isThrowExceptionForInsufficientPoints
public boolean isThrowExceptionForInsufficientPoints()Whether to throw an exception when there are insufficient points. -
setThrowExceptionForInsufficientPoints
public void setThrowExceptionForInsufficientPoints(boolean throwExceptionForInsufficientPoints) Whether to throw an exception when there are insufficient points.
-