本文整理了Java中net.imglib2.view.Views.extend()
方法的一些代码示例,展示了Views.extend()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Views.extend()
方法的具体详情如下:
包路径:net.imglib2.view.Views
类名称:Views
方法名:extend
[英]Extend a RandomAccessibleInterval with an out-of-bounds strategy.
[中]用越界策略扩展一个随机访问的区间。
代码示例来源:origin: net.imglib2/imglib2-algorithm-gpl
/**
* Updates the source.
*/
public void updateSource(RandomAccessibleInterval<T> source) {
this.source = source;
this.extendedSource = Views.extend(source, outOfBounds);
}
代码示例来源:origin: net.imglib2/imglib2-algorithms-gpl
/**
* Updates the source.
*/
public void updateSource(IN source) {
this.source = source;
this.extendedSource = Views.extend(source, outOfBounds);
}
代码示例来源:origin: imagej/imagej-ops
@Override
public ExtendedRandomAccessibleInterval<T, F> calculate(F input) {
return Views.extend(input, factory);
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with double precision on an entire {@link Img}
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
* @param outOfBounds - the {@link OutOfBoundsFactory} to use
*/
public GaussDouble( final double[] sigma, final Img<DoubleType> input, final OutOfBoundsFactory< DoubleType, Img<DoubleType> > outOfBounds )
{
this( sigma, Views.extend( input, outOfBounds ), input, input.factory() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with float precision on an entire {@link Img}
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
* @param outOfBounds - the {@link OutOfBoundsFactory} to use
*/
public GaussFloat( final double[] sigma, final Img<FloatType> input, final OutOfBoundsFactory< FloatType, Img<FloatType> > outOfBounds )
{
this( sigma, Views.extend( input, outOfBounds ), input, input.factory() );
}
代码示例来源:origin: fiji/TrackMate
public SquareNeighborhood3x3(RandomAccessibleInterval<T> source, OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds) {
this.source = source;
this.center = new long[source.numDimensions()];
this.extendedSource = Views.extend(source, outOfBounds);
}
代码示例来源:origin: sc.fiji/TrackMate_
public SquareNeighborhood3x3(RandomAccessibleInterval<T> source, OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds) {
this.source = source;
this.center = new long[source.numDimensions()];
this.extendedSource = Views.extend(source, outOfBounds);
}
代码示例来源:origin: net.imglib2/imglib2-algorithm-fft
final public static < R extends RealType< R > > Img< ComplexFloatType > realToComplex( final RandomAccessibleInterval< R > input, final OutOfBoundsFactory< R, RandomAccessibleInterval< R > > oobs, final ImgFactory< ComplexFloatType > factory )
{
return realToComplex( Views.extend( input, oobs ), input, factory, new ComplexFloatType(), Runtime.getRuntime().availableProcessors() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithm-fft
final public static < R extends RealType< R > > Img< ComplexFloatType > realToComplex( final RandomAccessibleInterval< R > input, final OutOfBoundsFactory< R, RandomAccessibleInterval< R > > oobs, final ImgFactory< ComplexFloatType > factory, final ExecutorService service )
{
return realToComplex( Views.extend( input, oobs ), input, factory, new ComplexFloatType(), service );
}
代码示例来源:origin: imagej/imagej-ops
@Override
public void compute(RandomAccessibleInterval<I> input,
IterableInterval<O> output)
{
map.compute(Views.interval(Views.extend(input, outOfBoundsFactory), input),
output);
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with double precision on an entire {@link Img} using the {@link OutOfBoundsMirrorFactory} with single boundary
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
*/
public GaussDouble( final double[] sigma, final Img<DoubleType> input )
{
this( sigma, Views.extend( input, new OutOfBoundsMirrorFactory< DoubleType, Img<DoubleType> >( Boundary.SINGLE ) ), input, input.factory() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with float precision on an entire {@link Img} using the {@link OutOfBoundsMirrorFactory} with single boundary
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
*/
public GaussFloat( final double[] sigma, final Img<FloatType> input )
{
this( sigma, Views.extend( input, new OutOfBoundsMirrorFactory< FloatType, Img<FloatType> >( Boundary.SINGLE ) ), input, input.factory() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms-gpl
final public static < R extends RealType< R > > Img< ComplexFloatType > realToComplex( final RandomAccessibleInterval< R > input, final OutOfBoundsFactory< R, RandomAccessibleInterval< R > > oobs, final ImgFactory< ComplexFloatType > factory )
{
return realToComplex( Views.extend( input, oobs ), input, factory, new ComplexFloatType() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithm-fft
final public static < R extends RealType< R > > Img< ComplexFloatType > realToComplex( final RandomAccessibleInterval< R > input, final OutOfBoundsFactory< R, RandomAccessibleInterval< R > > oobs, final ImgFactory< ComplexFloatType > factory, final int numThreads )
{
return realToComplex( Views.extend( input, oobs ), input, factory, new ComplexFloatType(), numThreads );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with any precision on an entire {@link Img} using the {@link OutOfBoundsMirrorFactory} with single boundary
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
*/
public GaussNativeType( final double[] sigma, final Img<T> input, final OutOfBoundsFactory< T, Img<T> > outOfBounds )
{
this( sigma, Views.extend( input, outOfBounds ), input, input.factory(), input.firstElement().createVariable() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution in-place (temporary imgs are necessary) with the precision of the type provided on an entire {@link Img}
*
* @param sigma - the sigma for the convolution
* @param img - the img {@link Img} that will be convolved in place
*/
public static <T extends NumericType<T>> void inNumericTypeInPlace( final double[] sigma, final Img< T > img,
final OutOfBoundsFactory< T, RandomAccessibleInterval< T > > outofbounds )
{
inNumericType( sigma, Views.extend( img, outofbounds ), img, img, new Point( sigma.length ), img.factory() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithm
/**
* Computes a Gaussian convolution in-place (temporary imgs are necessary)
* with the precision of the type provided on an entire {@link Img}
*
* @param sigma
* - the sigma for the convolution
* @param img
* - the img {@link Img} that will be convolved in place
*/
public static < T extends NumericType< T >> void inNumericTypeInPlace( final double[] sigma, final Img< T > img,
final OutOfBoundsFactory< T, RandomAccessibleInterval< T > > outofbounds )
{
inNumericType( sigma, Views.extend( img, outofbounds ), img, img, new Point( sigma.length ), img.factory() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with any precision on an entire {@link Img} using the {@link OutOfBoundsMirrorFactory} with single boundary
*
* WARNING: This is a very slow implementation as it is not written for {@link NativeType}. If your type is {@link NativeType},
* use {@link GaussNativeType} instead!
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
*/
public GaussGeneral( final double[] sigma, final Img<T> input )
{
this( sigma, Views.extend( input, new OutOfBoundsMirrorFactory< T, Img<T> >( Boundary.SINGLE ) ), input, input.factory(), input.firstElement().createVariable() );
}
代码示例来源:origin: net.imglib2/imglib2-algorithms
/**
* Computes a Gaussian convolution with any precision on an entire {@link Img} using the {@link OutOfBoundsMirrorFactory} with single boundary
*
* @param sigma - the sigma for the convolution
* @param input - the input {@link Img}
*/
public GaussNativeType( final double[] sigma, final Img<T> input )
{
this( sigma, Views.extend( input, new OutOfBoundsMirrorFactory< T, Img<T> >( Boundary.SINGLE ) ), input, input.factory(), input.firstElement().createVariable() );
}
代码示例来源:origin: imagej/imagej-ops
@Override
@SuppressWarnings("unchecked")
public O calculate(final I input) {
if (obf == null) {
obf = new OutOfBoundsConstantValueFactory<>(
Util.getTypeFromInterval(input).createVariable());
}
Interval inputInterval = paddingIntervalCentered.calculate(input,
paddedDimensions);
return (O) Views.interval(Views.extend(input, obf), inputInterval);
}
}
内容来源于网络,如有侵权,请联系作者删除!