public class MultiScaleObject extends Object
ObjectMask
that exists at multiple scales.
Specifically the scales are:
Constructor and Description |
---|
MultiScaleObject(java.util.function.Supplier<ObjectMask> inputScale,
java.util.function.Supplier<ObjectMask> modelScale)
Creates with a separate supplier of an
ObjectMask for each respective scale. |
Modifier and Type | Method and Description |
---|---|
static <T,S> MultiScaleObject |
extractFrom(DualScale<T> dual1,
DualScale<S> dual2,
java.util.function.BiFunction<T,S,ObjectMask> extractObject)
|
static <T> MultiScaleObject |
extractFrom(DualScale<T> dual,
java.util.function.Function<T,ObjectMask> extractObject)
|
ObjectMask |
getInputScale()
Gets the
ObjectMask at the scale associated with the input-image. |
ObjectMask |
getModelScale()
Gets the
ObjectMask at the scale associated with the segmentation. |
public MultiScaleObject(java.util.function.Supplier<ObjectMask> inputScale, java.util.function.Supplier<ObjectMask> modelScale)
ObjectMask
for each respective scale.
The suppliers will be cached internally, so are guaranteed to be called maximally one time.
inputScale
- supplies an ObjectMask
for the input-scale.modelScale
- supplies an ObjectMask
for the model-scale.public static <T> MultiScaleObject extractFrom(DualScale<T> dual, java.util.function.Function<T,ObjectMask> extractObject)
MultiScaleObject
by extracting a ObjectMask
from a DualScale
.
This extract occurs lazily, only when needed.
T
- the element-type of the DualScale
.dual
- the DualScale
the object is extracted from.extractObject
- a function applied to the respective scale in DualScale
to
extract an ObjectMask
.MultiScaleObject
, as per above.public static <T,S> MultiScaleObject extractFrom(DualScale<T> dual1, DualScale<S> dual2, java.util.function.BiFunction<T,S,ObjectMask> extractObject)
MultiScaleObject
by extracting a ObjectMask
from two DualScale
s.
This extract occurs lazily, only when needed.
T
- the element-type of dual1
.S
- the element-type of dual2
.dual1
- the first DualScale
the object is extracted from.dual2
- the second DualScale
the object is extracted from.extractObject
- a function applied to the respective scale in the two DualScale
s
respectively to extract an ObjectMask
.MultiScaleObject
, as per above.public ObjectMask getInputScale()
ObjectMask
at the scale associated with the input-image.public ObjectMask getModelScale()
ObjectMask
at the scale associated with the segmentation.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.