public class SaveFile
extends java.lang.Object
Constructor and Description |
---|
SaveFile() |
Modifier and Type | Method and Description |
---|---|
static void |
SaveFileExtension(float[][][] imageSamples,
int[] QComponentsBits,
java.lang.String imageFile,
int[] imageGeometry)
This functions saves the image samples to an image file with the format specified by its extension.
|
private static void |
SaveFileFormat(float[][][] imageSamples,
java.lang.String imageFile,
int format)
Saves image samples using specified format using JAI.
|
private static void |
SaveFileRaw(float[][][] imageSamples,
java.lang.String imageFile,
int sampleType,
int byteOrder)
Saves image samples in raw data.
|
public static void SaveFileExtension(float[][][] imageSamples, int[] QComponentsBits, java.lang.String imageFile, int[] imageGeometry) throws WarningException
imageSamples
- the image samplesQComponentsBits
- the bit depth of each image componentimageFile
- the name fileimageGeometry
- image geometry needed in the case that the output file is raw or imgWarningException
- when the file can not be savedprivate static void SaveFileFormat(float[][][] imageSamples, java.lang.String imageFile, int format) throws WarningException
imageSamples
- a 3D float array that contains image samplesimageFile
- file name where raw data will be storedformat
- format type to save image. The value indicates the following:WarningException
- when the file cannot be saved (incorrect number of components, file format unrecognized, etc.)private static void SaveFileRaw(float[][][] imageSamples, java.lang.String imageFile, int sampleType, int byteOrder) throws WarningException
imageSamples
- a 3D float array that contains image samplesimageFile
- file name where raw data will be storedsampleType
- an integer representing the class of image samples type. Samples types can be:
byteOrder
- 0 if BIG_ENDIAN, 1 if LITTLE_ENDIANWarningException
- when the file cannot be saved (incorrect number of components, file format unrecognized, etc.)
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)