Package gov.nih.mipav.model.file
Class FilePGM
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FilePGM
-
public class FilePGM extends FileBase
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
file
DOCUMENT ME!private java.lang.String
fileDir
DOCUMENT ME!private FileInfoPGM
fileInfo
DOCUMENT ME!private java.lang.String
fileName
DOCUMENT ME!private ModelImage
image
DOCUMENT ME!private ViewJProgressBar
progressBar
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 Constructor Description FilePGM(java.lang.String fName, java.lang.String fDir)
File Portable Greymap Utilities reader/writer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelImage
readImage()
private java.lang.String
readLine()
readLine() - reads a line of the file and strips comments indicated by the # symbol.private java.lang.String[]
retrieveValues(java.lang.String inString)
DOCUMENT ME!-
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 Detail
-
file
private java.io.File file
DOCUMENT ME!
-
fileDir
private java.lang.String fileDir
DOCUMENT ME!
-
fileInfo
private FileInfoPGM fileInfo
DOCUMENT ME!
-
fileName
private java.lang.String fileName
DOCUMENT ME!
-
image
private ModelImage image
DOCUMENT ME!
-
progressBar
private ViewJProgressBar progressBar
DOCUMENT ME!
-
-
Method Detail
-
readImage
public ModelImage readImage() throws java.io.IOException
- Throws:
java.io.IOException
-
readLine
private java.lang.String readLine() throws java.io.IOException
readLine() - reads a line of the file and strips comments indicated by the # symbol.- Returns:
- the line read in
- Throws:
java.io.IOException
- if there is an error reading the file
-
retrieveValues
private java.lang.String[] retrieveValues(java.lang.String inString)
DOCUMENT ME!- Parameters:
inString
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
-