Package gov.nih.mipav.model.file
Class FileTMG
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileTMG
DOCUMENT ME!
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!private booleanDOCUMENT ME!private FileDOCUMENT ME!private StringDOCUMENT ME!private FileInfoTMGDOCUMENT ME!private StringDOCUMENT ME!private ModelImageDOCUMENT ME!private int[]DOCUMENT ME!private ModelLUTDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private byte[]DOCUMENT ME!Fields 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.returns LUT if defined.private voidreadBuffer(int slice, float[] buffer) Reads a slice of data at a time and stores the results in the buffer.reads the TMG file header and data.private StringreadStr()DOCUMENT ME!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
-
dataType
private int dataTypeDOCUMENT ME! -
endianess
private boolean endianessDOCUMENT ME! -
file
DOCUMENT ME! -
fileDir
DOCUMENT ME! -
fileInfo
DOCUMENT ME! -
fileName
DOCUMENT ME! -
image
DOCUMENT ME! -
imgExtents
private int[] imgExtentsDOCUMENT ME! -
LUT
DOCUMENT ME! -
rangeX
private int rangeXDOCUMENT ME! -
rangeY
private int rangeYDOCUMENT ME! -
sBuffer
private byte[] sBufferDOCUMENT ME!
-
-
Constructor Details
-
FileTMG
TMG 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. -
getModelLUT
returns LUT if defined.- Returns:
- the LUT if defined else it is null
-
readImage
reads the TMG file header and data.- Returns:
- DOCUMENT ME!
- Throws:
IOException- if there is an error reading the file
-
readBuffer
Reads a slice of data at a time and stores the results in the buffer.- Parameters:
slice- offset into the file stored in the dataOffset arraybuffer- buffer where the info is stored- Throws:
IOException- if there is an error reading the file
-
readStr
DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
IOException- DOCUMENT ME!
-