@Override public double getMaxValue() { return t.getMaxValue(); }
@Override public double getMaxValue() { return t.getMaxValue(); }
protected ClampingNLinearInterpolatorRealType( final RandomAccessible< T > randomAccessible, final T type ) { super( randomAccessible, type ); clampMin = type.getMinValue(); clampMax = type.getMaxValue(); }
protected ClampingNLinearInterpolatorRealType( final RandomAccessible< T > randomAccessible, final T type ) { super( randomAccessible, type ); clampMin = type.getMinValue(); clampMax = type.getMaxValue(); }
public < T extends RealType< T >> OpsHistogram( final int bins, final T type ) { this( new int[ bins ], type.getMinValue(), type.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 public void checkInput(final I inType, final O outType) { outMin = outType.getMinValue(); outMax = outType.getMaxValue(); }
@Override public void checkInput(final I inType, final O outType) { inMin = inType.getMinValue(); outMin = outType.getMinValue(); factor = (inType.getMaxValue() - inMin) / (outType.getMaxValue() - outMin); }
@SuppressWarnings("boxing") public <R extends RealType<R>> Gamma(final IterableRealInterval<R> img, final Number val) { this(new ImageFunction<R>(img), val, 0, img.firstElement().getMaxValue()); }
/** * 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.getMaxValue()); for (final T in : input) if (output.compareTo(in) > 0) output.set(in); }
@Override public final T compute( Iterable< T > input, T output ) { double val = m_op.compute( input, m_type ).getRealDouble(); if ( val < output.getMinValue() ) output.setReal( output.getMinValue() ); else if ( val > output.getMaxValue() ) output.setReal( output.getMaxValue() ); else output.setReal( val ); return output; }
@Override public final T compute( Iterable< T > input, T output ) { double val = m_op.compute( input, m_type ).getRealDouble(); if ( val < output.getMinValue() ) output.setReal( output.getMinValue() ); else if ( val > output.getMaxValue() ) output.setReal( output.getMaxValue() ); else output.setReal( val ); return output; }
@Override public void compute(T in, T out) { if ((minMax - in.getRealDouble()) <= out.getMinValue()) { out.setReal(out.getMinValue()); } else if ((minMax - in.getRealDouble()) >= out.getMaxValue()) { out.setReal(out.getMaxValue()); } else out.setReal(minMax - in.getRealDouble()); } });
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; }
private < T extends RealType< T > > T maxValue( final T one ) { if ( one instanceof Unsigned128BitType ) // NB: Max value for Unsigned128BitType, is not returned with required precision by one.getMaxValue(). return ( T ) new Unsigned128BitType( 0xffffffffffffffffL, 0xffffffffffffffffL ); final T maxValue = one.copy(); maxValue.mul( one.getMaxValue() ); return maxValue; }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void initialize() { maxVal = Util.getTypeFromInterval(in()).createVariable(); maxVal.setReal(maxVal.getMaxValue()); if (f == null) { f = new OutOfBoundsConstantValueFactory<>(maxVal); } imgCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, Img.class, in(), maxVal.createVariable()); if (out() == null) setOutput(createOutput(in())); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void initialize() { maxVal = Util.getTypeFromInterval(in()).createVariable(); maxVal.setReal(maxVal.getMaxValue()); imgCreator = (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class, Img.class, in(), maxVal.createVariable()); dilateComputer = Hybrids.binaryCF(ops(), Ops.Morphology.Dilate.class, out(), in1(), in2(), false); erodeComputer = Hybrids.binaryCF(ops(), Ops.Morphology.Erode.class, out(), in1(), in2(), false); }