@Override public T firstElement() { return getFullViewIterableInterval().firstElement(); }
@Override public T firstElement() { return getFullViewIterableInterval().firstElement(); }
@Override public void initialize(final IterableInterval<T> interval) { image = interval; min = image.firstElement().createVariable(); max = min.copy(); init(); }
public ImgLabeling( final RandomAccessibleInterval< I > img ) { super( img ); indexAccessible = img; indexIterable = Views.iterable( img ); subIterable = indexIterable instanceof SubIntervalIterable; generation = new ModCount(); mapping = new LabelingMapping< T >( indexIterable.firstElement() ); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void initialize() { super.initialize(); thresholdComp = (UnaryComputerOp) Computers.unary(ops(), Ops.Threshold.IJ1.class, in().firstElement().getClass(), Histogram1d.class); }
@Override public T getThreshold(final IterableInterval<T> input) { final Histogram1d<T> hist = histCreator.calculate(input); final T type = input.firstElement().createVariable(); thresholdComp.compute(hist, type); return type; } }
@Override public T getThreshold(final IterableInterval<T> input) { final Histogram1d<T> hist = histCreator.calculate(input); final T type = input.firstElement().createVariable(); thresholdComp.compute(hist, type); return type; } }
@Override public T getThreshold(final IterableInterval<T> input) { final Histogram1d<T> hist = histCreator.calculate(input); final T type = input.firstElement().createVariable(); thresholdComp.compute(hist, type); return type; } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void initialize() { super.initialize(); thresholdComp = (UnaryComputerOp) Computers.unary(ops(), Ops.Threshold.Percentile.class, in().firstElement().getClass(), Histogram1d.class); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { map = Computers.unary(ops(), Ops.Map.class, in(), in(), Computers.unary( ops(), Ops.Copy.Type.class, in().firstElement().getClass(), in() .firstElement().getClass())); imgCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in(), in().firstElement()); }
@Override public UnaryComputerOp<IterableInterval<I>, Img<O>> createWorker( final IterableInterval<I> t) { final I inElement = t.firstElement(); final UnaryComputerOp<I, O> elementOp = Computers.unary(ops(), opType, outElement, inElement); return (UnaryComputerOp) Computers.unary(ops(), Ops.Map.class, Img.class, t, elementOp); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in1(), in1().firstElement() .createVariable()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in(), in().firstElement() .createVariable()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in1(), in1().firstElement() .createVariable()); }
@Override public void initialize() { mapper = Computers.unary(ops(), Ops.Map.class, out(), in(), pixConvert); pixConvert.checkInput(in().firstElement().createVariable(), out() .firstElement().createVariable()); pixConvert.checkInput(in()); }
public static < T extends BooleanType< T > > void spur( final RandomAccessible< T > source, final IterableInterval< T > target ) { final T extendedVal = target.firstElement().createVariable(); extendedVal.set( false ); final ImgFactory< T > factory = Util.getSuitableImgFactory( target, extendedVal ); final Img< T > temp = factory.create( target ); new Spur1().calculate( source, temp ); new Spur2().calculate( temp, target ); }
public static < T extends BooleanType< T > > void thin( final RandomAccessible< T > source, final IterableInterval< T > target ) { final T extendedVal = target.firstElement().createVariable(); extendedVal.set( false ); final ImgFactory< T > factory = Util.getSuitableImgFactory( target, extendedVal ); final Img< T > temp = factory.create( target ); new Thin1().calculate( source, temp ); new Thin2().calculate( temp, target ); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in1(), in1().firstElement() .createVariable()); if (out() == null) setOutput(createOutput()); final Op op = Hybrids.binaryCI(ops(), Ops.Logic.Or.class, BooleanType.class, BooleanType.class); mapper = Computers.binary(ops(), Ops.Map.class, out(), in1(), in2(), op); inplaceMapper = Inplaces.binary(ops(), Ops.Map.class, in1(), in2(), op); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in1(), in1().firstElement() .createVariable()); if (out() == null) setOutput(createOutput()); final Op op = Hybrids.binaryCI(ops(), Ops.Logic.Xor.class, BooleanType.class, BooleanType.class); mapper = Computers.binary(ops(), Ops.Map.class, out(), in1(), in2(), op); inplaceMapper = Inplaces.binary(ops(), Ops.Map.class, in1(), in2(), op); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void initialize() { outputCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, IterableInterval.class, in1(), in1().firstElement() .createVariable()); if (out() == null) setOutput(createOutput()); final Op op = Hybrids.binaryCI1(ops(), Ops.Logic.Or.class, BooleanType.class, BooleanType.class, BooleanType.class); mapper = Computers.binary(ops(), Ops.Map.class, out(), in1(), in2(), op); inplaceMapper = Inplaces.binary1(ops(), Ops.Map.class, in1(), in2(), op); }