本文整理了Java中net.imglib2.util.Intervals.contains()
方法的一些代码示例,展示了Intervals.contains()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intervals.contains()
方法的具体详情如下:
包路径:net.imglib2.util.Intervals
类名称:Intervals
方法名:contains
[英]Test whether the containing interval completely contains the contained interval.
[中]测试包含的间隔是否完全包含包含的间隔。
代码示例来源:origin: imagej/imagej-ops
public static <I1, I2, O> boolean compatible(
final RandomAccessibleInterval<I1> a, final IterableInterval<I2> b,
final RandomAccessibleInterval<O> c)
{
return Intervals.contains(a, b) && Intervals.contains(c, b);
}
代码示例来源:origin: imagej/imagej-ops
public static <I1, I2, O> boolean compatible(
final RandomAccessibleInterval<I1> a, final RandomAccessibleInterval<I2> b,
final IterableInterval<O> c)
{
return Intervals.contains(a, c) && Intervals.contains(b, c);
}
代码示例来源:origin: imagej/imagej-ops
public static <I, O> boolean compatible(final IterableInterval<I> a,
final RandomAccessibleInterval<O> b)
{
return Intervals.contains(b, a);
}
代码示例来源:origin: imagej/imagej-ops
public static <I, O> boolean compatible(final RandomAccessibleInterval<I> a,
final IterableInterval<O> b)
{
return Intervals.contains(a, b);
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public boolean test( final Localizable localizable )
{
if ( Intervals.contains( this, localizable ) )
return predicate.test( localizable );
return false;
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public boolean test( final RealLocalizable localizable )
{
if ( Intervals.contains( this, localizable ) )
return predicate.test( localizable );
return false;
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public boolean test( final RealLocalizable l )
{
if ( Intervals.contains( this, l ) ) { return GeomMaths.lineContains( pointOne, pointTwo, l, n ); }
return false;
}
代码示例来源:origin: net.imglib2/imglib2
/**
* {@inheritDoc}
*/
@Override
public boolean supportsOptimizedCursor( final Interval interval )
{
// we want to optimize exactly one plane
return Intervals.contains( this, interval ) && correspondsToPlane( interval );
}
代码示例来源:origin: imglib/imglib2
/**
* {@inheritDoc}
*/
@Override
public boolean supportsOptimizedCursor( final Interval interval )
{
// we want to optimize exactly one plane
return Intervals.contains( this, interval ) && correspondsToPlane( interval );
}
代码示例来源:origin: imagej/imagej-ops
public static <I1, I2, O> boolean compatible(final IterableInterval<I1> a,
final RandomAccessibleInterval<I2> b, final IterableInterval<O> c)
{
return a.iterationOrder().equals(c.iterationOrder()) && Intervals.contains(
b, a);
}
代码示例来源:origin: imagej/imagej-ops
public static <I1, I2, O> boolean compatible(final IterableInterval<I1> a,
final IterableInterval<I2> b, final RandomAccessibleInterval<O> c)
{
return a.iterationOrder().equals(b.iterationOrder()) && Intervals.contains(
c, a);
}
代码示例来源:origin: imagej/imagej-ops
public static <I1, I2, O> boolean compatible(
final RandomAccessibleInterval<I1> a, final IterableInterval<I2> b,
final IterableInterval<O> c)
{
return b.iterationOrder().equals(c.iterationOrder()) && Intervals.contains(
a, b);
}
代码示例来源:origin: net.imglib2/imglib2
@Override
final public RealRandomAccess< T > realRandomAccess( final RealInterval interval )
{
assert source.numDimensions() == interval.numDimensions();
if ( Intervals.contains( source, interval ) ) { return source.realRandomAccess(); }
return realRandomAccess();
}
代码示例来源:origin: net.imglib2/imglib2
@Override
final public RandomAccess< T > randomAccess( final Interval interval )
{
assert source.numDimensions() == interval.numDimensions();
if ( Intervals.contains( source, interval ) ) { return source.randomAccess( interval ); }
return randomAccess();
}
代码示例来源:origin: imglib/imglib2
@Override
final public RandomAccess< T > randomAccess( final Interval interval )
{
assert source.numDimensions() == interval.numDimensions();
if ( Intervals.contains( source, interval ) ) { return source.randomAccess( interval ); }
return randomAccess();
}
代码示例来源:origin: imglib/imglib2
@Override
final public RealRandomAccess< T > realRandomAccess( final RealInterval interval )
{
assert source.numDimensions() == interval.numDimensions();
if ( Intervals.contains( source, interval ) ) { return source.realRandomAccess(); }
return realRandomAccess();
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public boolean test( final Localizable l )
{
if ( Intervals.contains( this, l ) )
{
final RandomAccess< B > accessor = sourceInterval.randomAccess();
accessor.setPosition( l );
return accessor.get().get();
}
return false;
}
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public boolean test( final RealLocalizable l )
{
if ( Intervals.contains( this, l ) )
{
final RealRandomAccess< B > accessor = sourceInterval.realRandomAccess();
accessor.setPosition( l );
return accessor.get().get();
}
return false;
}
}
代码示例来源:origin: net.imglib2/imglib2-roi
@Override
public RandomAccess< BoolType > randomAccess( final Interval interval )
{
update();
if ( Intervals.contains( this, interval ) )
return randomAccess();
else
return new OutOfBoundsConstantValue< BoolType >( this, new BoolType( false ) );
}
代码示例来源:origin: imglib/imglib2
private static < T extends Type< T > > void testValueExtended(
final RandomAccessible<T> accessible,
final Interval inside,
final Interval total,
final T insideValue,
final T outsideValue ) {
final Cursor< T > cursor = Views.interval( accessible, total ).cursor();
while ( cursor.hasNext() ) {
final T value = cursor.next();
assertTrue( value.valueEquals( Intervals.contains( inside, cursor ) ? insideValue : outsideValue ) );
}
}
}
内容来源于网络,如有侵权,请联系作者删除!