Package gov.nih.mipav.model.file
Class FileVista
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileVista
- Author:
- pandyan Vista format reader and writer Spec: http://static.cbs.mpg.de/lipsia/START/index3.html 2/1/2011
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]The extensions of VISTA file.private Stringfile name and file dirprivate FileInfoVistaFileInfo Vistaprivate Stringfile name and file dirprivate ModelImageimageprivate longoffset to image dataFields 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 imageFileName, String fileDir) reads the headerreads the imagebooleanwriteHeader(ModelImage image, FileRaw rawFile, ArrayList<JTextField> vistaParamFields) writes the headervoidwriteImage(ModelImage image, FileWriteOptions options, ArrayList<JTextField> vistaParamFields) writes the imageMethods 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
-
EXTENSIONS
The extensions of VISTA file. -
fileInfo
FileInfo Vista -
offset
private long offsetoffset to image data -
image
image -
fileName
file name and file dir -
fileDir
file name and file dir
-
-
Constructor Details
-
FileVista
constructor- Parameters:
fileName-fileDir-
-
-
Method Details
-
readHeader
reads the header- Parameters:
imageFileName-fileDir-- Returns:
- boolean - if header could be read
- Throws:
IOException
-
readImage
reads the image- Returns:
- Throws:
IOExceptionOutOfMemoryError
-
getFileInfo
-
writeHeader
public boolean writeHeader(ModelImage image, FileRaw rawFile, ArrayList<JTextField> vistaParamFields) throws IOException writes the header- Parameters:
image-rawFile-vistaParamFields-- Returns:
- Throws:
IOException
-
writeImage
public void writeImage(ModelImage image, FileWriteOptions options, ArrayList<JTextField> vistaParamFields) throws IOException writes the image- Parameters:
image-options-vistaParamFields-- Throws:
IOException
-