Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.gui.viewer.lookuptable
Class LUTFactory  view LUTFactory download LUTFactory.java

java.lang.Object
  extended byorg.modama.gui.viewer.lookuptable.LUTFactory

public class LUTFactory
extends java.lang.Object

takes a LUTProperties object, and creates at lut from it


Field Summary
static int LIN
          constant for linear rendering
static int LOG
          constant for logarithmic rendering
 
Constructor Summary
LUTFactory()
           
 
Method Summary
static LookupTableJAI render(LUTProperties props, int type)
          renders a JAI LookupTable from a LUTProperties object with offset = 0 and length = 0x10000
static LookupTableJAI render(LUTProperties props, int type, int offset, int length)
          renders a JAI LookupTable from a LUTProperties object with same scale as length
static LookupTableJAI render(LUTProperties props, int type, int offset, int length, double scale)
          renders a JAI LookupTable from a LUTProperties object with the given size, offset and length give the size of the array of the LUT, scale a logical value of the range, that doesnt matter for linear rendering but it is important for logarithmic rendering, the caluclation for logarithmic luts works as follows: double d -> the index we calculate to get the color from the LUTProperties int i -> the index (pixelvalue/intensity in the original image) for which we want a color if( i <= offset ) d = 0; else if( i >= offset + length ) d = 1; else if( linear ) d = (i - offset) / length; if( logarithmic ) d = ln ( ((i - offset) / length) * scale ) / ln(scale); props.calcColor( d )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIN

public static final int LIN
constant for linear rendering

See Also:
Constant Field Values

LOG

public static final int LOG
constant for logarithmic rendering

See Also:
Constant Field Values
Constructor Detail

LUTFactory

public LUTFactory()
Method Detail

render

public static LookupTableJAI render(LUTProperties props,
                                    int type)
renders a JAI LookupTable from a LUTProperties object with offset = 0 and length = 0x10000


render

public static LookupTableJAI render(LUTProperties props,
                                    int type,
                                    int offset,
                                    int length)
renders a JAI LookupTable from a LUTProperties object with same scale as length


render

public static LookupTableJAI render(LUTProperties props,
                                    int type,
                                    int offset,
                                    int length,
                                    double scale)
renders a JAI LookupTable from a LUTProperties object with the given size, offset and length give the size of the array of the LUT, scale a logical value of the range, that doesnt matter for linear rendering but it is important for logarithmic rendering, the caluclation for logarithmic luts works as follows: double d -> the index we calculate to get the color from the LUTProperties int i -> the index (pixelvalue/intensity in the original image) for which we want a color if( i <= offset ) d = 0; else if( i >= offset + length ) d = 1; else if( linear ) d = (i - offset) / length; if( logarithmic ) d = ln ( ((i - offset) / length) * scale ) / ln(scale); props.calcColor( d )