net.imglib2.outofbounds.OutOfBoundsFactory Java Examples

The following examples show how to use net.imglib2.outofbounds.OutOfBoundsFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucy.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> richardsonLucy(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final int maxIterations)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucy.class, out, in, kernel,
			borderSize, obfInput, obfKernel, maxIterations);
	return result;
}
 
Example #2
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucy.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> richardsonLucy(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final int maxIterations)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucy.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, maxIterations);
	return result;
}
 
Example #3
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucy.class)
public <I extends RealType<I>, O extends RealType<O> & NativeType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> richardsonLucy(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType, final int maxIterations)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucy.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, fftType, maxIterations);
	return result;
}
 
Example #4
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucy.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> richardsonLucy(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType, final int maxIterations,
		final boolean nonCirculant)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucy.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, fftType, maxIterations,
			nonCirculant);
	return result;
}
 
Example #5
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final int maxIterations, final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, maxIterations, regularizationFactor);
	return result;
}
 
Example #6
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final int maxIterations, final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, obfKernel, maxIterations, regularizationFactor);
	return result;
}
 
Example #7
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final int maxIterations,
		final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, maxIterations,
			regularizationFactor);
	return result;
}
 
Example #8
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O> & NativeType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType, final int maxIterations,
		final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, fftType, maxIterations,
			regularizationFactor);
	return result;
}
 
Example #9
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType, final int maxIterations,
		final boolean nonCirculant, final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, fftType, maxIterations,
			nonCirculant, regularizationFactor);
	return result;
}
 
Example #10
Source File: DeconvolveNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@OpMethod(op = net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> richardsonLucyTV(
		final RandomAccessibleInterval<O> out,
		final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType, final int maxIterations,
		final boolean nonCirculant, final boolean accelerate,
		final float regularizationFactor)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(
			net.imagej.ops.deconvolve.PadAndRichardsonLucyTV.class, out, in, kernel,
			borderSize, obfInput, obfKernel, outType, fftType, maxIterations,
			nonCirculant, accelerate, regularizationFactor);
	return result;
}
 
Example #11
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMinimumThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	minimum(final IterableInterval<B> out, final RandomAccessibleInterval<T> in,
		final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMinimumThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #12
Source File: FilterNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/** Executes the "padInput" filter operation on the given arguments. */
@OpMethod(op = net.imagej.ops.filter.pad.PadInput.class)
public <T extends ComplexType<T>> RandomAccessibleInterval<T> padInput(
	final RandomAccessibleInterval<T> in, final Dimensions paddedDimensions,
	final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> obf)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<T> result =
		(RandomAccessibleInterval<T>) ops().run(Ops.Filter.PadInput.class, in,
			paddedDimensions, obf);
	return result;
}
 
Example #13
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMomentsThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	moments(final IterableInterval<B> out, final RandomAccessibleInterval<T> in,
		final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMomentsThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #14
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalOtsuThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	otsu(final IterableInterval<B> out, final RandomAccessibleInterval<T> in,
		final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalOtsuThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #15
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalPercentileThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	percentile(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalPercentileThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #16
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalRenyiEntropyThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	renyiEntropy(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalRenyiEntropyThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #17
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalShanbhagThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	shanbhag(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalShanbhagThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #18
Source File: FilterNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/** Executes the "convolve" operation on the given arguments. */
@OpMethod(op = net.imagej.ops.filter.convolve.PadAndConvolveFFT.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> convolve(final RandomAccessibleInterval<O> out,final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(Ops.Filter.Convolve.class, out, in,
			kernel, borderSize, obfInput);
	return result;
}
 
Example #19
Source File: FilterNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/** Executes the "convolve" operation on the given arguments. */
@OpMethod(op = net.imagej.ops.filter.convolve.PadAndConvolveFFT.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>, C extends ComplexType<C>>
	RandomAccessibleInterval<O> convolve(final RandomAccessibleInterval<O> out,final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType, final C fftType)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(Ops.Filter.Convolve.class, out, in,
			kernel, borderSize, obfInput, obfKernel, outType, fftType);
	return result;
}
 
Example #20
Source File: FilterNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/** Executes the "convolve" operation on the given arguments. */
@OpMethod(op = net.imagej.ops.filter.convolve.PadAndConvolveFFT.class)
public <I extends RealType<I>, O extends RealType<O>, K extends RealType<K>>
	RandomAccessibleInterval<O> convolve(final RandomAccessibleInterval<O> out,final RandomAccessibleInterval<I> in,
		final RandomAccessibleInterval<K> kernel, final long[] borderSize,
		final OutOfBoundsFactory<I, RandomAccessibleInterval<I>> obfInput,
		final OutOfBoundsFactory<K, RandomAccessibleInterval<K>> obfKernel,
		final O outType)
{
	@SuppressWarnings("unchecked")
	final RandomAccessibleInterval<O> result =
		(RandomAccessibleInterval<O>) ops().run(Ops.Filter.Convolve.class, out, in,
			kernel, borderSize, obfInput, obfKernel, outType);
	return result;
}
 
Example #21
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMinErrorThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	minError(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMinErrorThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #22
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMaxLikelihoodThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	maxLikelihood(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMaxLikelihoodThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #23
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMaxEntropyThreshold.class)
public <T extends RealType<T>, B extends BooleanType<B>> IterableInterval<B>
	maxEntropy(final IterableInterval<B> out,
		final RandomAccessibleInterval<T> in, final Shape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBoundsFactory)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<B> result = (IterableInterval<B>) ops().run(
		net.imagej.ops.threshold.ApplyThresholdMethodLocal.LocalMaxEntropyThreshold.class,
		out, in, shape, outOfBoundsFactory);
	return result;
}
 
Example #24
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.localSauvola.LocalSauvolaThresholdIntegral.class)
public <T extends RealType<T>> IterableInterval<BitType>
	localSauvolaThreshold(final IterableInterval<BitType> out,
		final RandomAccessibleInterval<T> in, final RectangleShape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result = (IterableInterval<BitType>) ops()
		.run(net.imagej.ops.Ops.Threshold.LocalSauvolaThreshold.class, out, in,
			shape, outOfBounds);
	return result;
}
 
Example #25
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.localSauvola.LocalSauvolaThresholdIntegral.class)
public <T extends RealType<T>> IterableInterval<BitType>
	localSauvolaThreshold(final IterableInterval<BitType> out,
		final RandomAccessibleInterval<T> in, final RectangleShape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds,
		final double k)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result = (IterableInterval<BitType>) ops()
		.run(net.imagej.ops.Ops.Threshold.LocalSauvolaThreshold.class, out, in,
			shape, outOfBounds, k);
	return result;
}
 
Example #26
Source File: ConvolveNaiveF.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public RandomAccessibleInterval<O> calculate(
	final RandomAccessibleInterval<I> img,
	final RandomAccessibleInterval<K> kernel)
{

	RandomAccessibleInterval<O> out = createOutput(img, kernel);

	if (obf == null) {
		obf = new OutOfBoundsConstantValueFactory<>(Util.getTypeFromInterval(in())
			.createVariable());
	}

	// extend the input
	RandomAccessibleInterval<I> extendedIn = Views.interval(Views.extend(img,
		obf), img);

	OutOfBoundsFactory<O, RandomAccessibleInterval<O>> obfOutput =
		new OutOfBoundsConstantValueFactory<>(Util.getTypeFromInterval(out)
			.createVariable());

	// extend the output
	RandomAccessibleInterval<O> extendedOut = Views.interval(Views.extend(out,
		obfOutput), out);

	// ops().filter().convolve(extendedOut, extendedIn, kernel);
	convolver.compute(extendedIn, extendedOut);

	return out;
}
 
Example #27
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(op = net.imagej.ops.threshold.localSauvola.LocalSauvolaThreshold.class)
public <T extends RealType<T>> IterableInterval<BitType> localSauvolaThreshold(
	final IterableInterval<BitType> out,
	final RandomAccessibleInterval<T> in, final Shape shape,
	final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result =
		(IterableInterval<BitType>) ops().run(
			net.imagej.ops.Ops.Threshold.LocalSauvolaThreshold.class, out, in, shape,
			outOfBounds);
	return result;
}
 
Example #28
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(op = net.imagej.ops.threshold.localSauvola.LocalSauvolaThreshold.class)
public <T extends RealType<T>> IterableInterval<BitType> localSauvolaThreshold(
	final IterableInterval<BitType> out,
	final RandomAccessibleInterval<T> in, final Shape shape,
	final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds,
	final double k)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result =
		(IterableInterval<BitType>) ops().run(
			net.imagej.ops.Ops.Threshold.LocalSauvolaThreshold.class, out, in, shape,
			outOfBounds, k);
	return result;
}
 
Example #29
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(op = net.imagej.ops.threshold.localSauvola.LocalSauvolaThreshold.class)
public <T extends RealType<T>> IterableInterval<BitType> localSauvolaThreshold(
	final IterableInterval<BitType> out,
	final RandomAccessibleInterval<T> in, final Shape shape,
	final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds,
	final double k, final double r)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result =
		(IterableInterval<BitType>) ops().run(
			net.imagej.ops.Ops.Threshold.LocalSauvolaThreshold.class, out, in, shape,
			outOfBounds, k, r);
	return result;
}
 
Example #30
Source File: ThresholdNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@OpMethod(
	op = net.imagej.ops.threshold.localPhansalkar.LocalPhansalkarThresholdIntegral.class)
public <T extends RealType<T>> IterableInterval<BitType>
	localPhansalkarThreshold(final IterableInterval<BitType> out,
		final RandomAccessibleInterval<T> in, final RectangleShape shape,
		final OutOfBoundsFactory<T, RandomAccessibleInterval<T>> outOfBounds)
{
	@SuppressWarnings("unchecked")
	final IterableInterval<BitType> result = (IterableInterval<BitType>) ops()
		.run(net.imagej.ops.Ops.Threshold.LocalPhansalkarThreshold.class, out, in,
			shape, outOfBounds);
	return result;
}