Package gov.nih.mipav.model.file
Class FileMATLAB
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileMATLAB
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int[](package private) int[]private FileDOCUMENT ME!private StringDOCUMENT ME!private FileInfoMATLABDOCUMENT ME!private FileInfoMATLABprivate StringDOCUMENT ME!private longprivate booleanprivate booleanprivate ModelImageDOCUMENT ME!private ModelImageprivate int[]DOCUMENT ME!private float[]DOCUMENT ME!private float[]DOCUMENT ME!private ModelLUTDOCUMENT ME!private FileInfoMATLABprivate FileInfoMATLABprivate ModelImageprivate ModelImageprivate intprivate static final intCompressed Dataprivate static final intIEEE 754 double formatprivate static final int16-bit, signedprivate static final int32-bit signedprivate static final int64-bit, signedprivate static final int8 bit, signedprivate static final intMATLAB ARRAYprivate static final intIEEE 754 single formatprivate static final int16-bit, unsignedprivate static final int32-bit, unsignedprivate static final int64-bit, unsignedprivate static final int8 bit, unsignedprivate static final intUnicode UTF-16 Encoded Character Dataprivate static final intUnicode UTF-32 Encoded Character Dataprivate static final intUnicode UTF-8 Encoded Character Dataprivate static final byteCell arrayprivate static final byteCharacter arrayprivate static final byteDouble precision arrayprivate static final byte16-bit, signed integerprivate static final byte32-bit, signed integerprivate static final byte64-bit, signed integerprivate static final byte8-bit, signed integerprivate static final byteObjectprivate static final byteSingle precision arrayprivate static final byteSparse arrayprivate static final byteStructureprivate static final byte16-bit, unsigned integerprivate static final byte32-bit, unsigned integerprivate static final byte64-bit, unsigned integerprivate static final byte8-bit, unsigned integerprivate int(package private) boolean(package private) booleanprivate ViewJFrameImageprivate ViewJFrameImageprivate ViewJFrameImageprivate InflaterFields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for cleanup.Accessor that returns the file info.float[]Accessor that returns the image buffer.Rreturns LUT if defined.private StringreadImage(boolean multiFile, boolean one) Reads the MATLAB header.voidsetFileName(String fName) Accessor to set the file name (used for reading COR multiFile).voidvoidwriteImage(ModelImage image, FileWriteOptions options) Writes a MATLAB format type image.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 Details
-
miINT8
private static final int miINT88 bit, signed- See Also:
-
miUINT8
private static final int miUINT88 bit, unsigned- See Also:
-
miINT16
private static final int miINT1616-bit, signed- See Also:
-
miUINT16
private static final int miUINT1616-bit, unsigned- See Also:
-
miINT32
private static final int miINT3232-bit signed- See Also:
-
miUINT32
private static final int miUINT3232-bit, unsigned- See Also:
-
miSINGLE
private static final int miSINGLEIEEE 754 single format- See Also:
-
miDOUBLE
private static final int miDOUBLEIEEE 754 double format- See Also:
-
miINT64
private static final int miINT6464-bit, signed- See Also:
-
miUINT64
private static final int miUINT6464-bit, unsigned- See Also:
-
miMATRIX
private static final int miMATRIXMATLAB ARRAY- See Also:
-
miCOMPRESSED
private static final int miCOMPRESSEDCompressed Data- See Also:
-
miUTF8
private static final int miUTF8Unicode UTF-8 Encoded Character Data- See Also:
-
miUTF16
private static final int miUTF16Unicode UTF-16 Encoded Character Data- See Also:
-
miUTF32
private static final int miUTF32Unicode UTF-32 Encoded Character Data- See Also:
-
mxCELL_CLASS
private static final byte mxCELL_CLASSCell array- See Also:
-
mxSTRUCT_CLASS
private static final byte mxSTRUCT_CLASSStructure- See Also:
-
mxOBJECT_CLASS
private static final byte mxOBJECT_CLASSObject- See Also:
-
mxCHAR_CLASS
private static final byte mxCHAR_CLASSCharacter array- See Also:
-
mxSPARSE_CLASS
private static final byte mxSPARSE_CLASSSparse array- See Also:
-
mxDOUBLE_CLASS
private static final byte mxDOUBLE_CLASSDouble precision array- See Also:
-
mxSINGLE_CLASS
private static final byte mxSINGLE_CLASSSingle precision array- See Also:
-
mxINT8_CLASS
private static final byte mxINT8_CLASS8-bit, signed integer- See Also:
-
mxUINT8_CLASS
private static final byte mxUINT8_CLASS8-bit, unsigned integer- See Also:
-
mxINT16_CLASS
private static final byte mxINT16_CLASS16-bit, signed integer- See Also:
-
mxUINT16_CLASS
private static final byte mxUINT16_CLASS16-bit, unsigned integer- See Also:
-
mxINT32_CLASS
private static final byte mxINT32_CLASS32-bit, signed integer- See Also:
-
mxUINT32_CLASS
private static final byte mxUINT32_CLASS32-bit, unsigned integer- See Also:
-
mxINT64_CLASS
private static final byte mxINT64_CLASS64-bit, signed integer- See Also:
-
mxUINT64_CLASS
private static final byte mxUINT64_CLASS64-bit, unsigned integer- See Also:
-
file
DOCUMENT ME! -
fileDir
DOCUMENT ME! -
fileInfo
DOCUMENT ME! -
fileInfo2
-
maskFileInfo
-
maskFileInfo2
-
fileName
DOCUMENT ME! -
image
DOCUMENT ME! -
imageExtents
private int[] imageExtentsDOCUMENT ME! -
imgBuffer
private float[] imgBufferDOCUMENT ME! -
imgResols
private float[] imgResolsDOCUMENT ME! -
LUT
DOCUMENT ME! -
zlibDecompresser
-
image2
-
vFrame2
-
maskImage
-
vmFrame
-
maskImage2
-
vmFrame2
-
filePointer
private long filePointer -
maximumNonZeroElements
private int maximumNonZeroElements -
haveNumericArrayCharacter
private boolean haveNumericArrayCharacter -
numberCharacterClasses
private int numberCharacterClasses -
haveImported
private boolean haveImported -
f
-
v
-
extentsf
int[] extentsf -
extentsv
int[] extentsv -
readf
boolean readf -
readv
boolean readv
-
-
Constructor Details
-
FileMATLAB
LIFF reader/writer constructor.- Parameters:
fileName- file namefileDir- file directory- Throws:
IOException- if there is an error making the file
-
-
Method Details
-
finalize
public void finalize()Prepares this class for cleanup. Calls thefinalizemethod for existing elements, closes any open files and sets other elements tonull. -
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.
-
getModelLUT
Rreturns LUT if defined.- Returns:
- the LUT if defined else it is null
-
setfv
-
readImage
Reads the MATLAB header.- 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:
IOException- if there is an error reading the file
-
readCString
- Throws:
IOException
-
setFileName
Accessor to set the file name (used for reading COR multiFile).- Parameters:
fName- file name of image to read.
-
writeImage
Writes a MATLAB format type image.- Parameters:
image- Image model of data to write.options- options such as starting and ending slices and times- Throws:
IOException- if there is an error writing the file
-