Package gov.nih.mipav.model.file
Class FileMagnetomVision
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileMagnetomVision
Class that reads Siemens Magnetom Vision files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDOCUMENT ME!private FileDOCUMENT ME!private FileInfoMagnetomVisionDOCUMENT ME!private StringDOCUMENT ME!private int[]DOCUMENT ME!private float[]DOCUMENT ME!private int[]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
ConstructorsConstructorDescriptionFileMagnetomVision(String fileName, String fileDir) Magnetom Vision reader/writer constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes random access file.voidfinalize()Prepares this class for cleanup.Get the file info generated by reading in the magnetom vision file.Returns null.booleanLooks for the string "MAGNETOM VISION" in image header ID.Reads the Magnetom file header and data.voidreadImage(short[] buffer) Reads a slice of data at a time and stores the results in the buffer.voidsetFileName(String fName) Accessor that sets the file name and allocates new FileInfo, File and RandomAccess file objects.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
-
fileDir
DOCUMENT ME! -
fileHeader
DOCUMENT ME! -
fileInfo
DOCUMENT ME! -
fileName
DOCUMENT ME! -
imgExtents
private int[] imgExtentsDOCUMENT ME! -
imgResols
private float[] imgResolsDOCUMENT ME! -
orient
private int[] orientDOCUMENT ME!
-
-
Constructor Details
-
FileMagnetomVision
Magnetom Vision 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. -
close
Closes random access file.- Throws:
IOException- DOCUMENT ME!
-
getFileInfo
Get the file info generated by reading in the magnetom vision file.- Returns:
- The file info.
-
getModelLUT
Returns null.- Returns:
- null.
-
isMagnetomVision
Looks for the string "MAGNETOM VISION" in image header ID. If present, the image is a Siemens Magnetom Vision format.- Returns:
- boolean true if the string "MAGNETOM VISION" was found in the image header.
- Throws:
IOException- Indicates error reading the file
-
readHeader
Reads the Magnetom file header and data.- Returns:
- Returns an object containing the file info.
- Throws:
IOException- if there is an error reading the file
-
readImage
Reads a slice of data at a time and stores the results in the buffer.- Parameters:
buffer- Buffer where the image is stored- Throws:
IOException- if there is an error reading the file
-
setFileName
Accessor that sets the file name and allocates new FileInfo, File and RandomAccess file objects.- Parameters:
fName- File name.- Throws:
IOException- if there is an error constructing the files.
-