Package gov.nih.mipav.model.file
Class FileCZI
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileCZI
-
public class FileCZI extends FileBase
File written using Zeiss Release Version 1.1 for ZEN 2012
-
-
Field Summary
Fields Modifier and Type Field Description private static intBgr192ComplexFloatA triple of 2 x 4 byte IEE float, representing real and imaginary part of a complex number, for the color channels blue, green, and redprivate static intBgr248 bit triples, representing the color channels blue, green, and redprivate static intBgr4816 bit triples, representing the color channels blue, green, and redprivate static intBgr96FloatTriple of 4 byte IEEE float, representing the color channels blue, green, and redprivate static intBgra328 bit triples followed by an alpha (transparency) channelprivate booleanendianessprivate java.io.FilefileDOCUMENT ME!private java.lang.StringfileDirDOCUMENT ME!private FileInfoCZIfileInfoDOCUMENT ME!private java.lang.StringfileNameDOCUMENT ME!private static intGray1616 bit unsignedprivate static intGray3232 bit integer [planned]private static intGray32Float32 bit IEEE floatprivate static intGray64Double precision floating point [planned]private static intGray64ComplexFloat2 x 4 byte IEEE float, representing the real and imaginary part of a complex numberprivate static intGray88 bit unsignedprivate ModelImageimageDOCUMENT ME!private int[]imageExtentsDOCUMENT ME!private float[]imgBufferDOCUMENT ME!private float[]imgResolsDOCUMENT ME!private static intJpegXrFileprivate static intJpgFileprivate static intLZWprivate static intUncompressed-
Fields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE
-
-
Constructor Summary
Constructors Constructor Description FileCZI(java.lang.String fileName, java.lang.String fileDir)LIFF reader/writer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinalize()Prepares this class for cleanup.FileInfoBasegetFileInfo()Accessor that returns the file info.float[]getImageBuffer()Accessor that returns the image buffer.private java.lang.StringreadCString()ModelImagereadImage(boolean multiFile, boolean one)Reads the CZI header.-
Methods inherited from class gov.nih.mipav.model.file.FileBase
addProgressChangeListener, bytesToDouble, bytesToFloat, bytesToInt, bytesToShort, doubleToBytes, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, floatToBytes, getBufferDouble, getBufferFloat, getBufferInt, getBufferLong, getBufferShort, getBufferUShort, getDataType, getDouble, getFloat, getInt, getLong, getProgressChangeListeners, getRaFile, getSignedShort, getString, getUInt, getUnsignedByte, getUnsignedShort, intToBytes, isBigEndian, isProgressBarVisible, linkProgress, longToBytes, readDouble, readFloat, readInt, readLong, readShort, readString, readUnsignedShort, removeProgressChangeListener, setBigEndian, setBufferFloat, setBufferInt, setBufferLong, setBufferShort, setBufferString, setDataType, setEndianess, shortToBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort
-
-
-
-
Field Detail
-
Gray8
private static final int Gray8
8 bit unsigned- See Also:
- Constant Field Values
-
Gray16
private static final int Gray16
16 bit unsigned- See Also:
- Constant Field Values
-
Gray32Float
private static final int Gray32Float
32 bit IEEE float- See Also:
- Constant Field Values
-
Bgr24
private static final int Bgr24
8 bit triples, representing the color channels blue, green, and red- See Also:
- Constant Field Values
-
Bgr48
private static final int Bgr48
16 bit triples, representing the color channels blue, green, and red- See Also:
- Constant Field Values
-
Bgr96Float
private static final int Bgr96Float
Triple of 4 byte IEEE float, representing the color channels blue, green, and red- See Also:
- Constant Field Values
-
Bgra32
private static final int Bgra32
8 bit triples followed by an alpha (transparency) channel- See Also:
- Constant Field Values
-
Gray64ComplexFloat
private static final int Gray64ComplexFloat
2 x 4 byte IEEE float, representing the real and imaginary part of a complex number- See Also:
- Constant Field Values
-
Bgr192ComplexFloat
private static final int Bgr192ComplexFloat
A triple of 2 x 4 byte IEE float, representing real and imaginary part of a complex number, for the color channels blue, green, and red- See Also:
- Constant Field Values
-
Gray32
private static final int Gray32
32 bit integer [planned]- See Also:
- Constant Field Values
-
Gray64
private static final int Gray64
Double precision floating point [planned]- See Also:
- Constant Field Values
-
Uncompressed
private static final int Uncompressed
- See Also:
- Constant Field Values
-
LZW
private static final int LZW
- See Also:
- Constant Field Values
-
JpgFile
private static final int JpgFile
- See Also:
- Constant Field Values
-
JpegXrFile
private static final int JpegXrFile
- See Also:
- Constant Field Values
-
file
private java.io.File file
DOCUMENT ME!
-
fileDir
private java.lang.String fileDir
DOCUMENT ME!
-
fileInfo
private FileInfoCZI fileInfo
DOCUMENT ME!
-
fileName
private java.lang.String fileName
DOCUMENT ME!
-
image
private ModelImage image
DOCUMENT ME!
-
imageExtents
private int[] imageExtents
DOCUMENT ME!
-
imgBuffer
private float[] imgBuffer
DOCUMENT ME!
-
imgResols
private float[] imgResols
DOCUMENT ME!
-
endianess
private final boolean endianess
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for cleanup. Calls thefinalizemethod for existing elements, closes any open files and sets other elements tonull.
-
getFileInfo
public FileInfoBase getFileInfo()
Accessor that returns the file info.- Returns:
- FileInfoBase containing the file info
-
getImageBuffer
public float[] getImageBuffer()
Accessor that returns the image buffer.- Returns:
- buffer of image.
-
readImage
public ModelImage readImage(boolean multiFile, boolean one) throws java.io.IOException
Reads the CZI header. This method then opens a Model of an image.- Parameters:
multiFile-trueif a set of files each containing a separate 2D image is presentfalseif one file with either a 2D image or a stack of 2D imagesone-trueif only want to read in one image of the 3D set- Returns:
- returns the image
- Throws:
java.io.IOException- if there is an error reading the file
-
readCString
private java.lang.String readCString() throws java.io.IOException- Throws:
java.io.IOException
-
-