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 SummaryFields Modifier and Type Field Description private intbufferSizeDOCUMENT ME!private byte[]byteBufferDOCUMENT ME!private shortbyteFormatif 1 data is UBYTE, otherwise data is SHORT.private intcolor1LUT1 color status.private intcolor2LUT2 color status.private intdataTypeDOCUMENT ME!private shorteditednot used in disk files.private java.io.FilefileDOCUMENT ME!private java.lang.StringfileDirDOCUMENT ME!private intfileIDalways set to 12345 in BioRad pic files.private FileInfoBioRadfileInfoDOCUMENT ME!private FileInfoBioRadfileInfoCopyprivate java.lang.StringfileNameDOCUMENT ME!private java.lang.StringfNameDOCUMENT ME!private ModelImageimageDOCUMENT ME!private float[]imgBufferDOCUMENT ME!private int[]imgExtentsDOCUMENT ME!private shortlensInteger part of the lens magnification.private floatmagFactormagnification factor.private shortmergedmerged format.private byte[]nameDOCUMENT ME!private intnotesif 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.private shortramp1Maxprivate shortramp1Minprivate shortramp2MaxLUT2 ramp max.private shortramp2MinLUT2 ramp min.private booleanreadAgainDOCUMENT ME!private intxDimDOCUMENT ME!private intyDimDOCUMENT ME!private intzDimDOCUMENT ME!- 
Fields inherited from class gov.nih.mipav.model.file.FileBaseBIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE
 
- 
 - 
Constructor SummaryConstructors Constructor Description FileBioRad(java.lang.String fileName, java.lang.String fileDir)reader/writer constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinalize()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.ModelImagereadImage(boolean one)reads the BioRad pic file header and data.- 
Methods inherited from class gov.nih.mipav.model.file.FileBaseaddProgressChangeListener, 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- 
bufferSizeprivate int bufferSize DOCUMENT ME!
 - 
byteBufferprivate byte[] byteBuffer DOCUMENT ME!
 - 
byteFormatprivate short byteFormat if 1 data is UBYTE, otherwise data is SHORT.
 - 
color1private int color1 LUT1 color status.
 - 
color2private int color2 LUT2 color status.
 - 
dataTypeprivate int dataType DOCUMENT ME!
 - 
editedprivate short edited not used in disk files.
 - 
fileprivate java.io.File file DOCUMENT ME!
 - 
fileDirprivate java.lang.String fileDir DOCUMENT ME!
 - 
fileIDprivate int fileID always set to 12345 in BioRad pic files.
 - 
fileInfoprivate FileInfoBioRad fileInfo DOCUMENT ME!
 - 
fileInfoCopyprivate FileInfoBioRad fileInfoCopy 
 - 
fileNameprivate java.lang.String fileName DOCUMENT ME!
 - 
fNameprivate java.lang.String fName DOCUMENT ME!
 - 
imageprivate ModelImage image DOCUMENT ME!
 - 
imgBufferprivate float[] imgBuffer DOCUMENT ME!
 - 
imgExtentsprivate int[] imgExtents DOCUMENT ME!
 - 
lensprivate short lens Integer part of the lens magnification.
 - 
magFactorprivate float magFactor magnification factor.
 - 
mergedprivate short merged merged format.
 - 
nameprivate byte[] name DOCUMENT ME!
 - 
notesprivate int notes if 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.
 - 
ramp1Maxprivate short ramp1Max 
 - 
ramp1Minprivate short ramp1Min 
 - 
ramp2Maxprivate short ramp2Max LUT2 ramp max.
 - 
ramp2Minprivate short ramp2Min LUT2 ramp min.
 - 
readAgainprivate boolean readAgain DOCUMENT ME!
 - 
xDimprivate int xDim DOCUMENT ME!
 - 
yDimprivate int yDim DOCUMENT ME!
 - 
zDimprivate int zDim DOCUMENT ME!
 
- 
 - 
Method Detail- 
finalizepublic void finalize() Prepares this class for cleanup. Calls thefinalizemethod for existing elements, closes any open files and sets other elements tonull.
 - 
readImagepublic 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
 
 - 
readBufferprivate void readBuffer(int slice, float[] buffer) throws java.io.IOExceptionReads a slice of data at a time and stores the results in the buffer.- Parameters:
- slice- into the file
- buffer- buffer where the info is stored
- Throws:
- java.io.IOException- if there is an error reading the file
 
 
- 
 
-