omeis.providers.re
Class ColorsFactory

java.lang.Object
  extended by omeis.providers.re.ColorsFactory

public class ColorsFactory
extends Object

Utility class to determine the color usually associated to a specified channel depending on its emission wavelength.

Since:
OME2.2
Version:
2.2 (Internal version: $Revision$ $Date: 2005/07/05 16:13:52 $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk,
Andrea Falconi      a.falconi@dundee.ac.uk

Field Summary
static int ALPHA_INDEX
          Index of the red component of a color.
static int BLUE_INDEX
          Index of the red component of a color.
static int GREEN_INDEX
          Index of the red component of a color.
static int RED_INDEX
          Index of the red component of a color.
 
Constructor Summary
ColorsFactory()
           
 
Method Summary
static int[] getColor(int index, ome.model.core.Channel channel)
          Determines the color usually associated to the specified wavelength.
static int[] getColor(int index, ome.model.core.Channel channel, ome.model.core.LogicalChannel lc)
          Determines the color usually associated to the specified wavelength.
static boolean hasEmissionData(ome.model.core.LogicalChannel lc)
          Returns true if the channel has emission metadata, false otherwise.
static int[] newBlueColor()
          Creates a new Blue Color object.
static int[] newGreenColor()
          Creates a new Green Color object.
static int[] newGreyColor()
          Creates a new Grey Color object.
static int[] newRedColor()
          Creates a new Red Color object.
static int[] newWhiteColor()
          Creates a new White Color object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RED_INDEX

public static final int RED_INDEX
Index of the red component of a color.

See Also:
Constant Field Values

GREEN_INDEX

public static final int GREEN_INDEX
Index of the red component of a color.

See Also:
Constant Field Values

BLUE_INDEX

public static final int BLUE_INDEX
Index of the red component of a color.

See Also:
Constant Field Values

ALPHA_INDEX

public static final int ALPHA_INDEX
Index of the red component of a color.

See Also:
Constant Field Values
Constructor Detail

ColorsFactory

public ColorsFactory()
Method Detail

getColor

public static int[] getColor(int index,
                             ome.model.core.Channel channel)
Determines the color usually associated to the specified wavelength.

Parameters:
index - The channel index.
channel - The channel to determine the color for.
Returns:
A color.

getColor

public static int[] getColor(int index,
                             ome.model.core.Channel channel,
                             ome.model.core.LogicalChannel lc)
Determines the color usually associated to the specified wavelength.

Parameters:
index - The channel index.
channel - The channel to determine the color for.
lc - The entity hosting information about the emission etc.
Returns:
A color.

hasEmissionData

public static boolean hasEmissionData(ome.model.core.LogicalChannel lc)
Returns true if the channel has emission metadata, false otherwise.

Parameters:
lc - The channel to handle.
Returns:
See above.

newRedColor

public static int[] newRedColor()
Creates a new Red Color object.

Returns:
An RGBA array representation of the color Red.

newGreenColor

public static int[] newGreenColor()
Creates a new Green Color object.

Returns:
An RGBA array representation of the color Green.

newBlueColor

public static int[] newBlueColor()
Creates a new Blue Color object.

Returns:
An RGBA array representation of the color Blue.

newGreyColor

public static int[] newGreyColor()
Creates a new Grey Color object.

Returns:
An RGBA array representation of the color Blue.

newWhiteColor

public static int[] newWhiteColor()
Creates a new White Color object.

Returns:
An RGBA array representation of the color Blue.


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.