Package gov.nih.mipav.model.file
Class FileBioRad
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileBioRad
Reads BioRaD pic file format.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!private byte[]DOCUMENT ME!private shortif 1 data is UBYTE, otherwise data is SHORT.private intLUT1 color status.private intLUT2 color status.private intDOCUMENT ME!private shortnot used in disk files.private FileDOCUMENT ME!private StringDOCUMENT ME!private intalways set to 12345 in BioRad pic files.private FileInfoBioRadDOCUMENT ME!private FileInfoBioRadprivate StringDOCUMENT ME!private StringDOCUMENT ME!private ModelImageDOCUMENT ME!private float[]DOCUMENT ME!private int[]DOCUMENT ME!private shortInteger part of the lens magnification.private floatmagnification factor.private shortmerged format.private byte[]DOCUMENT ME!private intif 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.private shortprivate shortprivate shortLUT2 ramp max.private shortLUT2 ramp min.private booleanDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for cleanup.private voidreadBuffer(int slice, float[] buffer) Reads a slice of data at a time and stores the results in the buffer.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 Details
-
bufferSize
private int bufferSizeDOCUMENT ME! -
byteBuffer
private byte[] byteBufferDOCUMENT ME! -
byteFormat
private short byteFormatif 1 data is UBYTE, otherwise data is SHORT. -
color1
private int color1LUT1 color status. -
color2
private int color2LUT2 color status. -
dataType
private int dataTypeDOCUMENT ME! -
edited
private short editednot used in disk files. -
file
DOCUMENT ME! -
fileDir
DOCUMENT ME! -
fileID
private int fileIDalways set to 12345 in BioRad pic files. -
fileInfo
DOCUMENT ME! -
fileInfoCopy
-
fileName
DOCUMENT ME! -
fName
DOCUMENT ME! -
image
DOCUMENT ME! -
imgBuffer
private float[] imgBufferDOCUMENT ME! -
imgExtents
private int[] imgExtentsDOCUMENT ME! -
lens
private short lensInteger part of the lens magnification. -
magFactor
private float magFactormagnification factor. -
merged
private short mergedmerged format. -
name
private byte[] nameDOCUMENT ME! -
notes
private int notesif 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 ramp2MaxLUT2 ramp max. -
ramp2Min
private short ramp2MinLUT2 ramp min. -
readAgain
private boolean readAgainDOCUMENT ME! -
xDim
private int xDimDOCUMENT ME! -
yDim
private int yDimDOCUMENT ME! -
zDim
private int zDimDOCUMENT ME!
-
-
Constructor Details
-
FileBioRad
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. -
readImage
reads the BioRad pic file header and data.- Parameters:
one- DOCUMENT ME!- Returns:
- returns a black and white image
- Throws:
IOException- if there is an error reading the file
-
readBuffer
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:
IOException- if there is an error reading the file
-