Java Array Normalize normalizeVoxelDimensions(final double[] voxelDimensions)

Here you can find the source of normalizeVoxelDimensions(final double[] voxelDimensions)

Description

normalize Voxel Dimensions

License

Open Source License

Declaration

public static double[] normalizeVoxelDimensions(final double[] voxelDimensions) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double[] normalizeVoxelDimensions(final double[] voxelDimensions) {
        final double[] normalizedVoxelDimensions = new double[voxelDimensions.length];
        double voxelDimensionsMinValue = Double.MAX_VALUE;
        for (int d = 0; d < normalizedVoxelDimensions.length; d++)
            voxelDimensionsMinValue = Math.min(voxelDimensions[d], voxelDimensionsMinValue);
        for (int d = 0; d < normalizedVoxelDimensions.length; d++)
            normalizedVoxelDimensions[d] = voxelDimensions[d] / voxelDimensionsMinValue;
        return normalizedVoxelDimensions;
    }/*from   w w  w  . j  a  v  a2s  .  c  o m*/
}

Related

  1. normalizeVector(final double[] v)
  2. normalizeVector(float[] samples)
  3. normalizeVectorMax(double[] input)
  4. normalizeVectorMaxMin(float[] samples)
  5. normalizeVectors(float[][] vectors, boolean maxMin)
  6. normalizeWith(double[] arr, double v)
  7. normalizeZscore(double[] x)
  8. normBySortedPointersInverse(double[] d, int[] pointers)
  9. normData(double[] data)