Available in LEADTOOLS Medical Imaging toolkits.
LevelLUTLength example for Visual J++
This example writes out the number of entries in the LUT.
edit1.setText( Integer.toString( LEAD1.getLevelLUTLength() ) );