All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.mianalysis.mia.process.math.Indexer Maven / Gradle / Ivy

Go to download

ModularImageAnalysis (MIA) is an ImageJ plugin which provides a modular framework for assembling image and object analysis workflows. Detected objects can be transformed, filtered, measured and related. Analysis workflows are batch-enabled by default, allowing easy processing of high-content datasets.

There is a newer version: 1.6.12
Show newest version
package io.github.mianalysis.mia.process.math;

/**
 * Multidimensional indexing
 * Created by sc13967 on 15/08/2016.
 */

public class Indexer {
    private int[] dim;
    private int[] dim_m;

    public Indexer(int[] dim) {
        this.dim = dim;
        dim_m = new int[this.dim.length];

        dim_m[0] = 1;
        for (int i=1;i= dim[i]) {
                return -1;

            }
        }

        //Adding each coordinate (multiplied by the relevant dimension) to ind
        int ind = 0;
        for (int i=0;i indexerSize) return null;

        int[] coord = new int[dim_m.length];
        coord[0] = ind%dim_m[1];
        for (int i=1;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy