Modifier and Type | Class and Description |
---|---|
static class |
PearsonsCorrelation.Implementation |
Constructor and Description |
---|
PearsonsCorrelation()
Creates a new Pearson's Correlation with default (fast) implementation parameter.
|
PearsonsCorrelation(PearsonsCorrelation.Implementation implementation)
Creates a new Pearson's Correlation and allows us to define
which implementation of the calculation to use.
|
Modifier and Type | Method and Description |
---|---|
<S extends RealType<S>> |
calculatePearsons(RandomAccessibleInterval<S> img1,
RandomAccessibleInterval<S> img2)
Calculates Pearson's R value without any constraint in values, thus it uses no thresholds.
|
<S extends RealType<S>> |
calculatePearsons(RandomAccessibleInterval<S> img1,
RandomAccessibleInterval<S> img2,
RandomAccessibleInterval<BitType> mask)
Calculates Pearson's R value without any constraint in values, thus it uses no
thresholds.
|
<S extends RealType<S>> |
calculatePearsons(TwinCursor<S> cursor,
double mean1,
double mean2,
S thresholdCh1,
S thresholdCh2,
ThresholdMode tMode)
Calculates Pearson's R value with the possibility to constraint in values.
|
static <T extends RealType<T>> |
classicPearsons(TwinCursor<T> cursor,
double meanCh1,
double meanCh2)
Calculates Person's R value by using a Classic implementation of the
algorithm.
|
static <T extends RealType<T>> |
classicPearsons(TwinCursor<T> cursor,
double meanCh1,
double meanCh2,
T thresholdCh1,
T thresholdCh2,
ThresholdMode tMode) |
void |
execute(DataContainer<T> container)
Executes the previously initialized
Algorithm . |
static <T extends RealType<T>> |
fastPearsons(TwinCursor<T> cursor)
Calculates Person's R value by using a fast implementation of the
algorithm.
|
static <T extends RealType<T>> |
fastPearsons(TwinCursor<T> cursor,
T thresholdCh1,
T thresholdCh2,
ThresholdMode tMode) |
double |
getPearsonsCorrelationAboveThreshold() |
double |
getPearsonsCorrelationBelowThreshold() |
double |
getPearsonsCorrelationValue() |
void |
processResults(ResultHandler<T> handler)
A method to give the algorithm the opportunity to let
its results being processed by the passed handler.
|
addWarning, getName, getWarnings
public PearsonsCorrelation(PearsonsCorrelation.Implementation implementation)
implementation
- The implementation of Pearson's Coefficient calculation to use.public PearsonsCorrelation()
public void execute(DataContainer<T> container) throws MissingPreconditionException
Algorithm
Algorithm
.public <S extends RealType<S>> double calculatePearsons(RandomAccessibleInterval<S> img1, RandomAccessibleInterval<S> img2) throws MissingPreconditionException
S
- The images base type.img1
- The first image to walk over.img2
- The second image to walk over.MissingPreconditionException
public <S extends RealType<S>> double calculatePearsons(RandomAccessibleInterval<S> img1, RandomAccessibleInterval<S> img2, RandomAccessibleInterval<BitType> mask) throws MissingPreconditionException
S
- The images base type.img1
- The first image to walk over.img2
- The second image to walk over.mask
- A mask for the images.MissingPreconditionException
public <S extends RealType<S>> double calculatePearsons(TwinCursor<S> cursor, double mean1, double mean2, S thresholdCh1, S thresholdCh2, ThresholdMode tMode) throws MissingPreconditionException
S
- The images base type.cursor
- The cursor to walk over both images.MissingPreconditionException
public static <T extends RealType<T>> double classicPearsons(TwinCursor<T> cursor, double meanCh1, double meanCh2) throws MissingPreconditionException
T
- The image base typecursor
- The cursor that defines the walk over both images.meanCh1
- Mean of channel 1.meanCh2
- Mean of channel 2.MissingPreconditionException
public static <T extends RealType<T>> double classicPearsons(TwinCursor<T> cursor, double meanCh1, double meanCh2, T thresholdCh1, T thresholdCh2, ThresholdMode tMode) throws MissingPreconditionException
MissingPreconditionException
public static <T extends RealType<T>> double fastPearsons(TwinCursor<T> cursor) throws MissingPreconditionException
T
- The image base typecursor
- The cursor that defines the walk over both images.MissingPreconditionException
public static <T extends RealType<T>> double fastPearsons(TwinCursor<T> cursor, T thresholdCh1, T thresholdCh2, ThresholdMode tMode) throws MissingPreconditionException
MissingPreconditionException
public void processResults(ResultHandler<T> handler)
Algorithm
processResults
in class Algorithm<T extends RealType<T>>
handler
- The ResultHandler to process the results.public double getPearsonsCorrelationValue()
public double getPearsonsCorrelationBelowThreshold()
public double getPearsonsCorrelationAboveThreshold()
Copyright © 2015–2021 Fiji. All rights reserved.