Class CreateMarkFromPoints
Object
org.anchoranalysis.bean.AnchorBean<CreateMarkFromPoints>
org.anchoranalysis.mpp.bean.points.CreateMarkFromPoints
public class CreateMarkFromPoints extends AnchorBean<CreateMarkFromPoints>
Creates a mark by fitting it to a set of points extracted from other marks.
-
Constructor Summary
Constructors Constructor Description CreateMarkFromPoints() -
Method Summary
Modifier and Type Method Description Optional<Mark>fitMarkToPointsFromMarks(MarkCollection marks, Dimensions dimensions)Extracts points from marks, creates a new mark, and fits this mark to the extracted points.SingleMarkProvidergetMarkProvider()Provides the mark to be fitted.intgetMinNumPoints()Minimum number of points required to create a mark.PointsFittergetPointsFitter()Fits the provided mark to the extracted points.booleanisThrowExceptionForInsufficientPoints()Whether to throw an exception when there are insufficient points.voidsetMarkProvider(SingleMarkProvider markProvider)Provides the mark to be fitted.voidsetMinNumPoints(int minNumPoints)Minimum number of points required to create a mark.voidsetPointsFitter(PointsFitter pointsFitter)Fits the provided mark to the extracted points.voidsetThrowExceptionForInsufficientPoints(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 OperationFailedExceptionExtracts 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.
-