public class Regions extends Object
| Constructor and Description |
|---|
Regions() |
| Modifier and Type | Method and Description |
|---|---|
static <B extends BooleanType<B>> |
countTrue(RandomAccessibleInterval<B> interval)
Counts the number of true pixels in the given region.
|
static <B extends BooleanType<B>> |
iterable(RandomAccessibleInterval<B> region)
Obtains an
IterableRegion whose iteration consists of only the
true pixels of a region (instead of all pixels in bounding box). |
static <B extends BooleanType<B>> |
positionable(RandomAccessibleInterval<B> region)
Make any
RandomAccessibleInterval<BooleanType> into an
PositionableIterableRegion. |
static <T> IterableInterval<T> |
sample(IterableInterval<Void> region,
RandomAccessible<T> img)
Given a region and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
static <T> IterableInterval<T> |
sample(MaskInterval mask,
RandomAccessible<T> img)
Given a mask and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
static <T> IterableInterval<T> |
sample(RealMaskRealInterval mask,
RandomAccessible<T> img)
Given a mask and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
static <T> IterableInterval<T> |
sampleWithMask(Mask mask,
RandomAccessibleInterval<T> img)
Given a mask and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
static <T,B extends BooleanType<B>> |
sampleWithRandomAccessible(RandomAccessible<B> mask,
RandomAccessibleInterval<T> img)
Given a mask and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
static <T> IterableInterval<T> |
sampleWithRealMask(RealMask mask,
RandomAccessibleInterval<T> img)
Given a mask and an image, return an
IterableInterval over the
pixels of the image inside the mask. |
public static <T> IterableInterval<T> sample(IterableInterval<Void> region, RandomAccessible<T> img)
IterableInterval over the
pixels of the image inside the mask.region - The region that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the region.public static <T> IterableInterval<T> sample(MaskInterval mask, RandomAccessible<T> img)
IterableInterval over the
pixels of the image inside the mask.mask - The mask that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the mask.public static <T> IterableInterval<T> sample(RealMaskRealInterval mask, RandomAccessible<T> img)
IterableInterval over the
pixels of the image inside the mask.mask - The mask that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the mask.public static <T,B extends BooleanType<B>> IterableInterval<T> sampleWithRandomAccessible(RandomAccessible<B> mask, RandomAccessibleInterval<T> img)
IterableInterval over the
pixels of the image inside the mask.mask - The mask that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the mask.public static <T> IterableInterval<T> sampleWithMask(Mask mask, RandomAccessibleInterval<T> img)
IterableInterval over the
pixels of the image inside the mask.mask - The mask that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the mask.public static <T> IterableInterval<T> sampleWithRealMask(RealMask mask, RandomAccessibleInterval<T> img)
IterableInterval over the
pixels of the image inside the mask.mask - The mask that defines which pixels in img to iterate over.img - The source from which to grab the pixels inside the mask.public static <B extends BooleanType<B>> IterableRegion<B> iterable(RandomAccessibleInterval<B> region)
IterableRegion whose iteration consists of only the
true pixels of a region (instead of all pixels in bounding box).
If region already is an IterableRegion, return it.
Otherwise, wrap it. This is potentially expensive, because it requires
iterating region once.
B - The BooleanType of the region.region - The region to filter by its true values.IterableRegion consisting of true values of the input
region.public static <B extends BooleanType<B>> PositionableIterableRegion<B> positionable(RandomAccessibleInterval<B> region)
RandomAccessibleInterval<BooleanType> into an
PositionableIterableRegion.
If region already is a PositionableIterableRegion, return
it. Otherwise, wrap it. This is potentially expensive, because it
requires iterating region once, unless it already is an
IterableRegion.
region - the region to make iterable and positionableregion as an PositionableIterableRegionpublic static <B extends BooleanType<B>> long countTrue(RandomAccessibleInterval<B> interval)
B - The BooleanType of the region.interval - The region whose true values should be counted.Copyright © 2015–2022 ImgLib2. All rights reserved.