Java Pixel Convert To pixels2Molecules(float[] pixels, int width, int height)

Here you can find the source of pixels2Molecules(float[] pixels, int width, int height)

Description

pixels Molecules

License

Open Source License

Declaration

public static float[][] pixels2Molecules(float[] pixels, int width,
            int height) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2013 Jay Unruh, Stowers Institute for Medical Research.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ******************************************************************************/

public class Main {
    public static float[][] pixels2Molecules(float[] pixels, int width,
            int height) {
        float[][] mols = new float[width][height - 1];
        for (int i = 0; i < (height - 1); i++) {
            for (int j = 0; j < width; j++) {
                mols[j][i] = pixels[j + (i + 1) * width];
            }/*from  w  w w .  ja  v a2s. co m*/
        }
        return mols;
    }
}

Related

  1. pixel2logical_size(float l, float zoom)
  2. pixel2WidthUnits(int pxs)
  3. pixels2angle(double pixels)
  4. pixelsToCm(float pixels)
  5. pixelsToInches(int sizeInPixels, int dpi)
  6. pixelsToPoint(int pixels, int dpi)
  7. PixelsToPoints(float value, int dpi)