|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.geosolutions.imageio.plugins.nitronitf.ImageIOUtils
public class ImageIOUtils
Method Summary | |
---|---|
static boolean |
canDisplay(BufferedImage image)
|
static void |
centerWindow(Window w)
|
static ColorModel |
createGrayscaleColorModel(boolean invert)
|
static void |
doubleToByteBuffer(double[] doubleData,
byte[] byteData,
int pixelStride,
int numBands)
Converts the float data to byte data, and sets the values in the byteData buffer |
static double[] |
findMinAndMax(double[] buffer,
int pixelStride,
int numBands)
|
static float[] |
findMinAndMax(float[] buffer,
int pixelStride,
int numBands)
|
static int[] |
findMinAndMax(short[] buffer,
int pixelStride,
int numBands)
|
static void |
floatToByteBuffer(float[] floatData,
byte[] byteData,
int pixelStride,
int numBands)
Converts the float data to byte data, and sets the values in the byteData buffer |
static List<File> |
getFiles(String[] filesOrDirs,
String[] extensions)
Returns a list of Files contained in the given String array of files or directories. |
static ImageReader |
getImageReader(File file)
Returns an ImageReader given the input file |
static ImageReader |
getImageReader(String filename)
Returns an ImageReader given the input filename |
static ImageReader |
getImageReader(String format,
Object input)
Returns an ImageReader given the format, and sets the input source |
static ImageWriter |
getImageWriter(File file)
Returns an ImageWriter given the input file |
static ImageWriter |
getImageWriter(String filename)
Returns an ImageWriter given the output filename |
static String |
getPackageName(Class clazz)
|
static void |
main(String[] args)
|
static WritableRaster |
makeGenericBandedWritableRaster(int numElems,
int numLines,
int numBands,
int dataType)
Returns a generic banded WritableRaster |
static WritableRaster |
makeGenericPixelInterleavedWritableRaster(int numElems,
int numLines,
int numBands,
int dataType)
Returns a generic pixel interleaved WritableRaster |
static int |
makeUnsigned(byte b)
Turns a signed byte into an unsigned one. |
static BufferedImage |
rasterToBufferedImage(Raster raster,
ImageTypeSpecifier imageType)
Utility method for creating a BufferedImage from a source raster Currently only Float->Byte and Byte->Byte are supported. |
static void |
shortToByteBuffer(short[] shortData,
byte[] byteData,
int pixelStride,
int numBands)
Converts the float data to byte data, and sets the values in the byteData buffer |
static JFrame |
showImage(BufferedImage image,
String title)
|
static JFrame |
showImage(BufferedImage image,
String title,
boolean fitToScreen)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ImageReader getImageReader(String filename) throws IOException
filename
-
IOException
public static ImageReader getImageReader(File file) throws IOException
file
-
IOException
public static ImageReader getImageReader(String format, Object input) throws IOException
file
-
IOException
public static ImageWriter getImageWriter(String filename) throws IOException
filename
-
IOException
public static ImageWriter getImageWriter(File file) throws IOException
file
-
IOException
public static String getPackageName(Class clazz)
public static boolean canDisplay(BufferedImage image)
public static List<File> getFiles(String[] filesOrDirs, String[] extensions)
filesOrDirs
- extensions
-
public static JFrame showImage(BufferedImage image, String title)
public static JFrame showImage(BufferedImage image, String title, boolean fitToScreen)
public static void centerWindow(Window w)
public static ColorModel createGrayscaleColorModel(boolean invert)
public static float[] findMinAndMax(float[] buffer, int pixelStride, int numBands)
public static double[] findMinAndMax(double[] buffer, int pixelStride, int numBands)
public static int[] findMinAndMax(short[] buffer, int pixelStride, int numBands)
public static WritableRaster makeGenericBandedWritableRaster(int numElems, int numLines, int numBands, int dataType)
numElems
- numLines
- bandOffsets
- dataType
-
public static WritableRaster makeGenericPixelInterleavedWritableRaster(int numElems, int numLines, int numBands, int dataType)
numElems
- numLines
- bandOffsets
- dataType
-
public static void floatToByteBuffer(float[] floatData, byte[] byteData, int pixelStride, int numBands)
floatData
- byteData
- public static void doubleToByteBuffer(double[] doubleData, byte[] byteData, int pixelStride, int numBands)
doubleData
- byteData
- public static void shortToByteBuffer(short[] shortData, byte[] byteData, int pixelStride, int numBands)
shortData
- byteData
- public static BufferedImage rasterToBufferedImage(Raster raster, ImageTypeSpecifier imageType)
UnsupportedOperationException
if the conversion is not supported.
raster
- imageType
-
public static int makeUnsigned(byte b)
b
- The byte to read
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |