Class AbstractFitnessFunction
- java.lang.Object
-
- science.aist.imaging.api.fitnessfunction.AbstractFitnessFunction
-
- All Implemented Interfaces:
ToDoubleBiFunction<ImageWrapper<?>,ImageWrapper<?>>
- Direct Known Subclasses:
DistanceMapFitnessFunction
,MIFitnessFunction
,SSEFitnessFunction
public abstract class AbstractFitnessFunction extends Object implements ToDoubleBiFunction<ImageWrapper<?>,ImageWrapper<?>>
Abstract implementation of a fitness function
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isLowerErrorValueBetter
protected JavaRectangle2D
roi
-
Constructor Summary
Constructors Constructor Description AbstractFitnessFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double
applyAsDouble(ImageWrapper<?> imageWrapper, ImageWrapper<?> imageWrapper2)
protected abstract double
applyFitness(ImageWrapper<?> imageWrapper, ImageWrapper<?> imageWrapper2, int startX, int startY, int endX, int endY, int channels)
abstract method for applying the actual fitness implementationabstract double
getBestPossibleError()
-
-
-
Field Detail
-
isLowerErrorValueBetter
protected boolean isLowerErrorValueBetter
-
roi
protected JavaRectangle2D roi
-
-
Method Detail
-
applyAsDouble
public double applyAsDouble(ImageWrapper<?> imageWrapper, ImageWrapper<?> imageWrapper2)
- Specified by:
applyAsDouble
in interfaceToDoubleBiFunction<ImageWrapper<?>,ImageWrapper<?>>
-
applyFitness
protected abstract double applyFitness(ImageWrapper<?> imageWrapper, ImageWrapper<?> imageWrapper2, int startX, int startY, int endX, int endY, int channels)
abstract method for applying the actual fitness implementation- Parameters:
imageWrapper
- image1 to compareimageWrapper2
- image2 to comparestartX
- start x position of the region of intereststartY
- start y position of the region of interestendX
- end x position of the region of interestendY
- end y position of the region of interestchannels
- number of channels- Returns:
- fitnessvalue
-
getBestPossibleError
public abstract double getBestPossibleError()
- Returns:
- the best possible fitness value
-
-