Documentation of 'jhplot.utils.ColorPixel' Java class.
ColorPixel
jhplot.utils

Class ColorPixel



  • public class ColorPixelextends Object
    Static methods which help to convert colors and vectors with pixels. They are helpful to integrate ImageJ API with ScaVi API. The methods allows to convert pixel colors (integer) into the usual (R,G,B). Also conversion of arrays is supported.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ColorPixel() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static ColorgetColor(int c)
      Return color from pixel color (integer compact value representing color in the ImageJ representation).
      static ArrayList<P0I>getP0I(int[] c)
      Get array list with (R,G,B) from list of pixels.
      static intgetPixel(Color c)
      Convert color into compact integer representation of pixel.
      static int[]getPixel(int[] red, int[] green, int[] blue)
      Convert arrays with R,G,B into a pixel color as in ImageJ.
      static intgetPixel(int red, int green, int blue)
      Convert color (red,green,blue) into compact integer representation of pixel.
      static PNIgetPNI(int[] c)
      Get array list with (R,G,B) from list of pixels.
      static int[]getRGB(int c)
      Get (R,G,B) from a pixel color.
      static ArrayList<int[]>getRGB(int[] c)
      Get array list with (R,G,B) from list of pixels.
    • Constructor Detail

      • ColorPixel

        public ColorPixel()
    • Method Detail

      • getColor

        public static Color getColor(int c)
        Return color from pixel color (integer compact value representing color in the ImageJ representation).
        Parameters:
        c - pixel color in compact representation
        Returns:
        java color
      • getRGB

        public static int[] getRGB(int c)
        Get (R,G,B) from a pixel color.
        Parameters:
        c - pixel color
        Returns:
        (R,G,B) of this pixel.
      • getRGB

        public static ArrayList<int[]> getRGB(int[] c)
        Get array list with (R,G,B) from list of pixels. The array has dimension 3 and contains 3 arrays with (R,G,B).
        Parameters:
        c - pixel color
        Returns:
        array with 3 elements. Each is an array with (R,G,B).
      • getP0I

        public static ArrayList<P0I> getP0I(int[] c)
        Get array list with (R,G,B) from list of pixels. The array has size 3, and each object is P0D keeping R,G,B color.
        Parameters:
        c - pixel color
        Returns:
        array with 3 elements. Each is an array with (R,G,B).
      • getPNI

        public static PNI getPNI(int[] c)
        Get array list with (R,G,B) from list of pixels. The array has size 3, and each object is P0D keeping R,G,B color.
        Parameters:
        c - pixel color
        Returns:
        array with 3 elements. Each is an array with (R,G,B).
      • getPixel

        public static int getPixel(Color c)
        Convert color into compact integer representation of pixel.
        Parameters:
        c - color
        Returns:
        integer representing a pixel.
      • getPixel

        public static int getPixel(int red,                           int green,                           int blue)
        Convert color (red,green,blue) into compact integer representation of pixel.
        Parameters:
        red - Red
        green - Green
        blue - Blue
        Returns:
        integer representing a pixel.
      • getPixel

        public static int[] getPixel(int[] red,                             int[] green,                             int[] blue)
        Convert arrays with R,G,B into a pixel color as in ImageJ. All arrays should have the same length.
        Parameters:
        red - array with red (0-255)
        green - array with green
        blue - array with blue
        Returns:
        pixel array color in compact form.

DMelt 2.7 © DataMelt by jWork.ORG