Package gov.nih.mipav.model.file
Class FileBioRad
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileBioRad
-
public class FileBioRad extends FileBase
Reads BioRaD pic file format.
-
-
Field Summary
Fields Modifier and Type Field Description private int
bufferSize
DOCUMENT ME!private byte[]
byteBuffer
DOCUMENT ME!private short
byteFormat
if 1 data is UBYTE, otherwise data is SHORT.private int
color1
LUT1 color status.private int
color2
LUT2 color status.private int
dataType
DOCUMENT ME!private short
edited
not used in disk files.private java.io.File
file
DOCUMENT ME!private java.lang.String
fileDir
DOCUMENT ME!private int
fileID
always set to 12345 in BioRad pic files.private FileInfoBioRad
fileInfo
DOCUMENT ME!private FileInfoBioRad
fileInfoCopy
private java.lang.String
fileName
DOCUMENT ME!private java.lang.String
fName
DOCUMENT ME!private ModelImage
image
DOCUMENT ME!private float[]
imgBuffer
DOCUMENT ME!private int[]
imgExtents
DOCUMENT ME!private short
lens
Integer part of the lens magnification.private float
magFactor
magnification factor.private short
merged
merged format.private byte[]
name
DOCUMENT ME!private int
notes
if 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.private short
ramp1Max
private short
ramp1Min
private short
ramp2Max
LUT2 ramp max.private short
ramp2Min
LUT2 ramp min.private boolean
readAgain
DOCUMENT ME!private int
xDim
DOCUMENT ME!private int
yDim
DOCUMENT ME!private int
zDim
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 FileBioRad(java.lang.String fileName, java.lang.String fileDir)
reader/writer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Prepares this class for cleanup.private void
readBuffer(int slice, float[] buffer)
Reads a slice of data at a time and stores the results in the buffer.ModelImage
readImage(boolean one)
reads the BioRad pic file header and data.-
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 Detail
-
bufferSize
private int bufferSize
DOCUMENT ME!
-
byteBuffer
private byte[] byteBuffer
DOCUMENT ME!
-
byteFormat
private short byteFormat
if 1 data is UBYTE, otherwise data is SHORT.
-
color1
private int color1
LUT1 color status.
-
color2
private int color2
LUT2 color status.
-
dataType
private int dataType
DOCUMENT ME!
-
edited
private short edited
not used in disk files.
-
file
private java.io.File file
DOCUMENT ME!
-
fileDir
private java.lang.String fileDir
DOCUMENT ME!
-
fileID
private int fileID
always set to 12345 in BioRad pic files.
-
fileInfo
private FileInfoBioRad fileInfo
DOCUMENT ME!
-
fileInfoCopy
private FileInfoBioRad fileInfoCopy
-
fileName
private java.lang.String fileName
DOCUMENT ME!
-
fName
private java.lang.String fName
DOCUMENT ME!
-
image
private ModelImage image
DOCUMENT ME!
-
imgBuffer
private float[] imgBuffer
DOCUMENT ME!
-
imgExtents
private int[] imgExtents
DOCUMENT ME!
-
lens
private short lens
Integer part of the lens magnification.
-
magFactor
private float magFactor
magnification factor.
-
merged
private short merged
merged format.
-
name
private byte[] name
DOCUMENT ME!
-
notes
private int notes
if 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.
-
ramp1Max
private short ramp1Max
-
ramp1Min
private short ramp1Min
-
ramp2Max
private short ramp2Max
LUT2 ramp max.
-
ramp2Min
private short ramp2Min
LUT2 ramp min.
-
readAgain
private boolean readAgain
DOCUMENT ME!
-
xDim
private int xDim
DOCUMENT ME!
-
yDim
private int yDim
DOCUMENT ME!
-
zDim
private int zDim
DOCUMENT ME!
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for cleanup. Calls thefinalize
method for existing elements, closes any open files and sets other elements tonull
.
-
readImage
public ModelImage readImage(boolean one) throws java.io.IOException
reads the BioRad pic file header and data.- Parameters:
one
- DOCUMENT ME!- Returns:
- returns a black and white image
- Throws:
java.io.IOException
- if there is an error reading the file
-
readBuffer
private void readBuffer(int slice, float[] buffer) throws java.io.IOException
Reads a slice of data at a time and stores the results in the buffer.- Parameters:
slice
- into the filebuffer
- buffer where the info is stored- Throws:
java.io.IOException
- if there is an error reading the file
-
-