Package adams.data.jai
Class JAIHelper
- java.lang.Object
-
- adams.data.jai.JAIHelper
-
public class JAIHelper extends Object
Helper class for JAI operations.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description JAIHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
disableMediaLib()
Disables the "java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image" exception.static javax.media.jai.RenderedOp
read(File file)
Loads the specified file.static javax.media.jai.RenderedOp
read(String file)
Loads the specified file.static BufferedImageContainer
toBufferedImageContainer(AbstractImageContainer cont)
Creates aBufferedImageContainer
container if necessary, otherwise it just casts the object.
-
-
-
Method Detail
-
disableMediaLib
public static void disableMediaLib()
Disables the "java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image" exception.
Taken from here
-
read
public static javax.media.jai.RenderedOp read(File file)
Loads the specified file.- Parameters:
file
- the file to load- Returns:
- the image
-
read
public static javax.media.jai.RenderedOp read(String file)
Loads the specified file.- Parameters:
file
- the file to load- Returns:
- the image
-
toBufferedImageContainer
public static BufferedImageContainer toBufferedImageContainer(AbstractImageContainer cont)
Creates aBufferedImageContainer
container if necessary, otherwise it just casts the object.- Parameters:
cont
- the cont to cast/convert- Returns:
- the casted/converted container
-
-