Package gov.nih.mipav.model.file
Class FileJSON
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileJSON
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanDOCUMENT ME!private FileDOCUMENT ME!private StringDOCUMENT ME!private FileInfoJSONDOCUMENT ME!private FileInfoJSONprivate StringDOCUMENT ME!private ModelImage[]DOCUMENT ME!private ModelLUT[]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
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
-
endianess
private boolean endianessDOCUMENT ME! -
file
DOCUMENT ME! -
fileDir
DOCUMENT ME! -
fileInfo
DOCUMENT ME! -
fileInfoCopy
-
fileName
DOCUMENT ME! -
image
DOCUMENT ME! -
LUT
DOCUMENT ME!
-
-
Constructor Details
-
FileJSON
JSON 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. -
getModelLUTArray
returns LUT if defined.- Returns:
- the LUT if defined else it is null
-
readImage
reads the JSON file header and data.- Returns:
- DOCUMENT ME!
- Throws:
IOException- if there is an error reading the file
-
readLine
readLine() - reads a line of the file and strips comments indicated by the # symbol.- Returns:
- the line read in
- Throws:
IOException- if there is an error reading the file
-