Example usage for org.apache.commons.lang3.mutable MutableLong intValue

List of usage examples for org.apache.commons.lang3.mutable MutableLong intValue

Introduction

In this page you can find the example usage for org.apache.commons.lang3.mutable MutableLong intValue.

Prototype

@Override
public int intValue() 

Source Link

Document

Returns the value of this MutableLong as an int.

Usage

From source file:de.biomedical_imaging.ij.steger.Convol.java

public void convolve_gauss(float[] image, float[] k, int width, int height, double sigma, int deriv_type) {
    double[] hr = null, hc = null;
    double[] maskr, maskc;
    MutableLong nr = new MutableLong(), nc = new MutableLong();
    float[] h;/*from   w ww  .  j av a 2  s .  com*/

    h = new float[(width * height)];

    switch (deriv_type) {
    case LinesUtil.DERIV_R:
        hr = compute_gauss_mask_1(nr, sigma);
        hc = compute_gauss_mask_0(nc, sigma);
        break;
    case LinesUtil.DERIV_C:
        hr = compute_gauss_mask_0(nr, sigma);
        hc = compute_gauss_mask_1(nc, sigma);
        break;
    case LinesUtil.DERIV_RR:
        hr = compute_gauss_mask_2(nr, sigma);
        hc = compute_gauss_mask_0(nc, sigma);
        break;
    case LinesUtil.DERIV_RC:
        hr = compute_gauss_mask_1(nr, sigma);
        hc = compute_gauss_mask_1(nc, sigma);
        break;
    case LinesUtil.DERIV_CC:
        hr = compute_gauss_mask_0(nr, sigma);
        hc = compute_gauss_mask_2(nc, sigma);
        break;
    }

    maskr = hr;// + nr; Wird ersetzt in den eigentlichen Funktionen, indem ich z.B. in convolve_rows_gauss immer beim Zugriff auf mask n dazuaddiere
    maskc = hc;// + nc;

    convolve_rows_gauss(image, maskr, nr.intValue(), h, width, height);
    convolve_cols_gauss(h, maskc, nc.intValue(), k, width, height);

}