Package gov.nih.mipav.model.file
Class FileVista
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileVista
-
public class FileVista extends FileBase
- Author:
- pandyan Vista format reader and writer Spec: http://static.cbs.mpg.de/lipsia/START/index3.html 2/1/2011
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
EXTENSIONS
The extensions of VISTA file.private java.lang.String
fileDir
file name and file dirprivate FileInfoVista
fileInfo
FileInfo Vistaprivate java.lang.String
fileName
file name and file dirprivate ModelImage
image
imageprivate long
offset
offset to image data-
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 FileVista(java.lang.String fileName, java.lang.String fileDir)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileInfoVista
getFileInfo()
boolean
readHeader(java.lang.String imageFileName, java.lang.String fileDir)
reads the headerModelImage
readImage()
reads the imageboolean
writeHeader(ModelImage image, FileRaw rawFile, java.util.ArrayList<javax.swing.JTextField> vistaParamFields)
writes the headervoid
writeImage(ModelImage image, FileWriteOptions options, java.util.ArrayList<javax.swing.JTextField> vistaParamFields)
writes the image-
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
-
EXTENSIONS
public static final java.lang.String[] EXTENSIONS
The extensions of VISTA file.
-
fileInfo
private FileInfoVista fileInfo
FileInfo Vista
-
offset
private long offset
offset to image data
-
image
private ModelImage image
image
-
fileName
private java.lang.String fileName
file name and file dir
-
fileDir
private java.lang.String fileDir
file name and file dir
-
-
Method Detail
-
readHeader
public boolean readHeader(java.lang.String imageFileName, java.lang.String fileDir) throws java.io.IOException
reads the header- Parameters:
imageFileName
-fileDir
-- Returns:
- boolean - if header could be read
- Throws:
java.io.IOException
-
readImage
public ModelImage readImage() throws java.io.IOException, java.lang.OutOfMemoryError
reads the image- Returns:
- Throws:
java.io.IOException
java.lang.OutOfMemoryError
-
getFileInfo
public FileInfoVista getFileInfo()
-
writeHeader
public boolean writeHeader(ModelImage image, FileRaw rawFile, java.util.ArrayList<javax.swing.JTextField> vistaParamFields) throws java.io.IOException
writes the header- Parameters:
image
-rawFile
-vistaParamFields
-- Returns:
- Throws:
java.io.IOException
-
writeImage
public void writeImage(ModelImage image, FileWriteOptions options, java.util.ArrayList<javax.swing.JTextField> vistaParamFields) throws java.io.IOException
writes the image- Parameters:
image
-options
-vistaParamFields
-- Throws:
java.io.IOException
-
-