Package gov.nih.mipav.model.file
Class FileOME
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileOME
DOCUMENT ME!
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classPrivate class used by the parser to parse the XML file. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe directory where the xml header and raw image data file are located.private FileInfoOMEThe info for the image file.private StringThe name of the xml image header file.private ModelImageThe image to read or write.private StringThe name of the raw image data file.private ModelLUTThe image's lut.private booleanWhether to show a progress bar while processing the file.private booleanWhether the image has a lut already.private static final StringThe W3C XML schema.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 TypeMethodDescriptionbooleanreadHeader(String headerFileName, String headerFileDir) Read the image XML header.Reads an XML image file by reading the XML header then making a FileRaw to read the image for all filenames in the file list.Methods inherited from class gov.nih.mipav.model.file.FileBase
addProgressChangeListener, bytesToDouble, bytesToFloat, bytesToInt, bytesToShort, doubleToBytes, finalize, 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
-
W3C_XML_SCHEMA
The W3C XML schema.- See Also:
-
fileDir
The directory where the xml header and raw image data file are located. -
fileInfo
The info for the image file. -
fileName
The name of the xml image header file. -
image
The image to read or write. -
imageFileName
The name of the raw image data file. -
LUT
The image's lut. -
showProgress
private boolean showProgressWhether to show a progress bar while processing the file. -
usesLUT
private boolean usesLUTWhether the image has a lut already. One is generated if this variable is false.
-
-
Constructor Details
-
FileOME
Constructs new file object.- Parameters:
fName- File name.fDir- File directory.show- Flag for showing the progress bar.
-
-
Method Details
-
readHeader
Read the image XML header.- Parameters:
headerFileName- the header file nameheaderFileDir- the directory the header file is in- Returns:
- true if successful, false otherwise
- Throws:
IOException- if there is an error reading the header file from disk
-
readImage
Reads an XML image file by reading the XML header then making a FileRaw to read the image for all filenames in the file list. Only the one file directory (currently) supported.- Returns:
- The image.
- Throws:
IOException- if there is an error reading the fileOutOfMemoryError- if there is not enough memory available to read in the image- See Also:
-