@Override public double getMinValue() { return t.getMinValue(); }
@Override public double getMinValue() { return t.getMinValue(); }
@Override protected V getVMinValue( final V var ) { var.setReal( var.getMinValue() ); return var; }
protected ClampingNLinearInterpolatorRealType( final RandomAccessible< T > randomAccessible, final T type ) { super( randomAccessible, type ); clampMin = type.getMinValue(); clampMax = type.getMaxValue(); }
@Override protected T getTMinValue( final T var ) { var.setReal( var.getMinValue() ); return var; }
@Override protected T getTMinValue( final T var ) { var.setReal( var.getMinValue() ); return var; }
@Override protected T getTMinValue( final T var ) { var.setReal( var.getMinValue() ); return var; }
public < T extends RealType< T >> OpsHistogram( final int bins, final T type ) { this( new int[ bins ], type.getMinValue(), type.getMaxValue() ); }
protected ClampingNLinearInterpolatorRealType( final RandomAccessible< T > randomAccessible, final T type ) { super( randomAccessible, type ); clampMin = type.getMinValue(); clampMax = type.getMaxValue(); }
@Override protected V getVMinValue( final V var ) { var.setReal( var.getMinValue() ); return var; }
@Override public void checkInput(final I inType, final O outType) { outMin = outType.getMinValue(); outMax = outType.getMaxValue(); }
public < T extends RealType< T >> Histogram2D( final int bins, final T type ) { this( bins, type.getMinValue(), type.getMaxValue() ); }
public < T extends RealType< T >> Histogram2D( final int bins, final T type ) { this( bins, type.getMinValue(), type.getMaxValue() ); }
private boolean outOfBounds(double val, RealType<?> type) { if (val < type.getMinValue()) return true; if (val > type.getMaxValue()) return true; return false; }
@Override protected T getTMinValue( final T var ) { var.setReal( var.getMinValue() ); return var; }
/** * Resets the range of interest of this overlay to default values. */ public void resetThreshold() { // TODO - this is hacky. Maybe we need actual data values but scanning is // slow. Or maybe we delete threshold? No, we use it in constructor. RealType<?> type = dataset.getType(); double min = type.getMinValue(); double max = type.getMaxValue(); if (min < -20000) min = -20000; if (max > 20000) max = 20000; setRange(min, max / 2); }
@Override public void compute(final Iterable<T> input, final T output) { // Re-use output to compare against output.setReal(output.getMinValue()); for (final T in : input) if (output.compareTo(in) < 0) output.set(in); }
private < T extends RealType< T > > T minValue( final T one ) { final T minValue = one.copy(); minValue.mul( one.getMinValue() ); return minValue; }
public ExplicitDiffusionScheme( final RandomAccessibleInterval< T > input, final RandomAccessibleInterval< FloatType > D, ImgFactory< FloatType > imgFactory ) { this.input = input; this.D = D; this.increment = imgFactory.create( input ); // Protection against under/overflow this.minVal = ( float ) Views.iterable( input ).firstElement().getMinValue(); this.maxVal = ( float ) Views.iterable( input ).firstElement().getMaxValue(); // The dimension to iterate over to retrieve the tensor components this.tensorComponentDimension = input.numDimensions(); this.processingTime = 0; this.imgFactory = imgFactory; }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void initialize() { minVal = Util.getTypeFromInterval(in()).createVariable(); minVal.setReal(minVal.getMinValue()); imgCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, Img.class, in(), minVal.createVariable()); erodeComputer = Hybrids.binaryCF(ops(), Ops.Morphology.Erode.class, out(), in1(), in2(), false); dilateComputer = Hybrids.binaryCF(ops(), Ops.Morphology.Dilate.class, out(), in1(), in2(), false); }