Package gov.nih.mipav.model.file
Class FileTiff
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileTiff
-
public class FileTiff extends FileBase
Tagged Image File Format (TIFF 6.0) reader/ writer. Note that although EchoTech has a tResolution field, there is no provision for 4D in TIFF. Almost all of the FAX decompression code, modified Huffman decompression code, and JPEG decompression code was taken from the free software at the website http://www.mms-computing.co.uk/uk/co/mmscomputing/imageio/tiff ThunderScan decompression code was obtained by porting C++ code from tif_thunder.c in tif-4.0.0.alpha\libtiff. 16 bit integer data with SGILogCompression and photometric = CIE Log2(L)was obtained by porting LogL16Decode in tif_luv.c in tif-4.0.0.alpha\libtiff. 32 bit integer data with SGILogCompression and photometric = CIE Log2(L) (u', v') was obtained by porting LogLuvDecode32, LogL16toY, LogLuv32toXYZ, and XYZtoRGB24 in tif_luv.c in tif-4.0.0.alpha\libtiff. 24 bit integer data with SGILog24Compression and photometric = CIE Log2(L) (u', v') was obtained by porting LogLuvDecode24, LogLuv24toXYZ, LogL10toY, uv_decode and XYZtoRGB24 in tif_luv.h and uvcode.h in tif-4.0.0.alpha\libtiff. The current port of the LogLuv color compression is not ideal for the MIPAV system. off_l16.tif, a grayscale picture of an office with a view out a much brighter window, preserves the wide range of pixels both inside the darker office and outside the brighter window when converted to short in MIPAV. However, when 24 bit SGILog24Compression off_luv24 and 32 bit SGILogCompression off_luv32 are converted to ARGB in MIPAV only the darker view inside the office is adequately represented. The brighter view thru the window is mostly saturated, so a transformation to ARGB_USHORT which preserves the window information is really needed. Note that compression = 7 for new JPEG has been implemented, but compression = 6 for deprecated JPEG has not been implemented. libtiff does have a 46 page file tif_ojpeg which reads in old JPEG, but even porting this would not be sufficient since the tif_ojpeg.c file interfaces with Release 6B of the independent JPEG library written by the Independent JPEG group. LZW compression code was obtained by porting code from tif_lzw.c in tif-4.0.0.alpha\libtiff except for the final section on the Horizontal Differencing Predictor which comes from the Sun Microsystems file TIFFLZWDecoder.java. Originally TIFFLZWDecoder.java was used, but it could not handle old-style LZW code, such as with libtiff library file quad-lzw.tif. Note that the tif reader will not work properly for some files with different tag values for different slices. For example, the libtiff file dscf0013.tif, which has slice 1 with 640 by 480 pixels and 15 rows per strip and slice 2 with 160 by 120 pixels and 120 rows per strip, will not be read in properly. The libtiff file text.tif with 4 bits per sample and thunderscan compression in the first slice and 1 bit per sample and no compression in the second slice will not be read in properly. You can make an excellent CMYK file from an RGB file, but you can only make a mediocre RGB file from a CMYK file. The gamut of RGB colorspace is significantly larger than the gamut of CMYK colorspace. When you convert from RGB to CMYK, you are throwing away a lot of data, and you can't get it back.- Version:
- 1.0 Feb 29, 2000
- Author:
- Matthew J. McAuliffe, Ph.D., William Gandler
- See Also:
FileIO,FileInfoTiff,FileRaw
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFileTiff.BitInputStreamclassFileTiff.BitSwapInputStreamstatic interfaceFileTiff.BitSwapTableprivate classFileTiff.IndexSimple class to store image offsets and bytes located at the offset.classFileTiff.IntFilterInputStreamclassFileTiff.JPEGACInputStreamclassFileTiff.JPEGBitInputStreamclassFileTiff.JPEGComponentInputStreamstatic interfaceFileTiff.JPEGConstantsclassFileTiff.JPEGDCInputStreamclassFileTiff.JPEGDCTInputStreamclassFileTiff.JPEGFastDCTInputStreamclassFileTiff.JPEGHuffmanInputStreamclassFileTiff.JPEGInputStreamclassFileTiff.ModHuffmanInputStreamstatic interfaceFileTiff.ModHuffmanTableclassFileTiff.ModModREADInputStreamclassFileTiff.ModREADInputStreamstatic interfaceFileTiff.ModREADTableclassFileTiff.RLEBitInputStreamclassFileTiff.TIFFYCbCrInputStreamstatic classFileTiff.TypeTiff Types.
-
Field Summary
Fields Modifier and Type Field Description private floatapertureprivate byte[]artistDOCUMENT ME!static intARTISTDOCUMENT ME!static intBAD_FAX_LINESprivate intbadFaxLinesstatic intBITS_PER_SAMPLEDOCUMENT ME!private intbitsLeftprivate int[]bitsPerSampleprivate floatbrightnessprivate byte[]byteBufferDOCUMENT ME!private intCbReferenceBlackprivate intCbReferenceWhiteprivate intchannelsprivate byte[]characterCodeprivate booleanchunkyDOCUMENT ME!static intCLEAN_FAX_DATAprivate shortcleanFaxDatastatic intCOLOR_MAPDOCUMENT ME!private intcolorSpacestatic intCOMPRESSIONCompression: 1 = no compression 2 = modified huffman 3 = CCITT-T4(FAX3) 4 = CCITT-T6(FAX4) 5 = LZW 6 = old JPEG 7 = JPEG 8 or 32946 = zlib 32773 = packbits 32809 = thunderscan RLE. 34676 = SGI Log Luminance RLE 34677 = SGI Log 24-bit packedstatic intCONSECUTIVE_BAD_FAX_LINESprivate intconsecutiveBadFaxLinesprivate shortcontrastprivate byte[]copyrightstatic intCOPYRIGHTprivate intCrReferenceBlackprivate intCrReferenceWhiteprivate intcurrentRecognizedCodeprivate shortcustomRenderedprivate shortdarkHalftoneprivate java.util.Vector<FileTiff.Index>[]dataOffsetsstatic intDATE_TIMEDOCUMENT ME!private byte[]dateTimeDOCUMENT ME!private byte[]dateTimeDigitizedprivate byte[]dateTimeOriginalprivate floatdigitalZoomRatiostatic intDOCUMENT_NAMEprivate byte[]documentNamestatic intDOT_RANGEprivate booleandoTIFFOrientationprivate double[]doubleBufferDOCUMENT ME!private booleanendianessDOCUMENT ME!static intEXIFIFDstatic intEXIFTAG_APERTURE_VALUEstatic intEXIFTAG_BRIGHTNESS_VALUEstatic intEXIFTAG_COLOR_SPACEstatic intEXIFTAG_CONTRASTstatic intEXIFTAG_CUSTOM_RENDEREDstatic intEXIFTAG_DATE_TIME_DIGITIZEDstatic intEXIFTAG_DATE_TIME_ORIGINALstatic intEXIFTAG_DIGITAL_ZOOM_RATIOstatic intEXIFTAG_EXIF_VERSIONstatic intEXIFTAG_EXPOSURE_BIAS_VALUEstatic intEXIFTAG_EXPOSURE_MODEstatic intEXIFTAG_EXPOSURE_PROGRAMstatic intEXIFTAG_EXPOSURE_TIMEstatic intEXIFTAG_FILE_SOURCEstatic intEXIFTAG_FLASHstatic intEXIFTAG_FLASHPIX_VERSIONstatic intEXIFTAG_FNUMBERstatic intEXIFTAG_FOCAL_LENGTHstatic intEXIFTAG_FOCAL_PLANE_RESOLUTION_UNITstatic intEXIFTAG_FOCAL_PLANE_X_RESOLUTIONstatic intEXIFTAG_FOCAL_PLANE_Y_RESOLUTIONstatic intEXIFTAG_GAIN_CONTROLstatic intEXIFTAG_ISO_SPEED_RATINGSstatic intEXIFTAG_LIGHT_SOURCEstatic intEXIFTAG_MAKER_NOTEstatic intEXIFTAG_MAX_APERTURE_VALUEstatic intEXIFTAG_METERING_MODEstatic intEXIFTAG_PIXEL_X_DIMENSIONstatic intEXIFTAG_PIXEL_Y_DIMENSIONstatic intEXIFTAG_SATURATIONstatic intEXIFTAG_SCENE_CAPTURE_TYPEstatic intEXIFTAG_SCENE_TYPEstatic intEXIFTAG_SENSING_METHODstatic intEXIFTAG_SHARPNESSstatic intEXIFTAG_SHUTTER_SPEED_VALUEstatic intEXIFTAG_USER_COMMENTstatic intEXIFTAG_WHITE_BALANCEprivate byte[]exifVersionprivate floatexposureBiasprivate shortexposureModeprivate shortexposureProgramprivate floatexposureTimestatic intEXTRA_SAMPLESprivate short[]extraSamplesprivate booleanfax3Compressionprivate booleanfax4Compressionprivate java.io.FilefileThe file...private java.lang.StringfileDirFile directory.private FileInfoTifffileInfoFile Info.private longfileLengthprivate java.lang.StringfileNameFile name.private FilePackBitfilePBDOCUMENT ME!private FileRawChunkfileRWDOCUMENT ME!private intfileSourcestatic intFILL_ORDERprivate intfillOrderprivate byte[]firstCharprivate shortflashprivate byte[]flashPixVersionprivate AlgorithmFlipflipAlgoprivate booleanflipHorizontalprivate booleanflipVerticalprivate floatfNumberprivate floatfocalLengthprivate shortfocalPlaneResolutionUnitprivate floatfocalPlaneXResolutionprivate floatfocalPlaneYResolutionprivate booleanfoundTag43314DOCUMENT ME!private intframesprivate shortgainControlstatic intGDAL_METADATAprivate byte[]gdalMetadataprivate booleangroup3_2D_Codingprivate booleangroup3Fillbitsprivate booleangroup3Uncompressedprivate booleangroup4Uncompressedstatic intHALFTONE_HINTSprivate booleanhave3DColorprivate booleanhave4DColorprivate booleanhaveChangedPhotometricTo1private booleanhaveLZWInitprivate booleanhaveMultiSpectraImageprivate booleanhaveResolutionUnitprivate booleanhaveRowsPerStripprivate booleanhaveTileLengthprivate booleanhaveTileOffsetsprivate booleanhaveTileWidthprivate booleanhaveZResolutionstatic intHOST_COMPUTERDOCUMENT ME!private byte[]hostComputerDOCUMENT ME!static intICC_PROFILEprivate int[]IFDoffsetsDOCUMENT ME!private ModelImageimageDOCUMENT ME!static intIMAGE_DESCRIPTIONDOCUMENT ME!static intIMAGE_LENGTHDOCUMENT ME!static intIMAGE_SOURCE_DATAstatic intIMAGE_WIDTHDOCUMENT ME!private byte[]imageDescriptionDOCUMENT ME!private intimageSliceDOCUMENT ME!private float[]imgBufferDOCUMENT ME!private float[]imgResolsDOCUMENT ME!static intINFOstatic intINK_NAMESstatic intINK_SETprivate byte[]inkNamesprivate intinkSetprivate booleaninterchangeXYstatic intIPTCprivate booleanisBW10private booleanisBW12private booleanisBW14private booleanisBW2private booleanisBW24private booleanisBW4private booleanisBW6private booleanisCIELABprivate booleanisCMYKprivate booleanisLogLprivate booleanisLogLuvprivate short[]isoSpeedRatingsprivate booleanisRGB10private booleanisRGB12private booleanisRGB14private booleanisRGB2private booleanisRGB24UINTtoFLOATprivate booleanisRGB32UINTtoFLOATprivate booleanisRGB4private booleanisRGBAprivate booleanisYCbCrstatic intJPEG_TABLESprivate booleanjpegCompressionprivate byte[]jpegTablesstatic intLABELSprivate short[]lengthprivate shortlightHalftoneprivate shortlightSourceprivate floatLumaBlueprivate floatLumaGreenprivate floatLumaRedprivate ModelLUTLUTDOCUMENT ME!private intLUTOffsetDOCUMENT ME!static intLUTSprivate booleanlzwCompressionDOCUMENT ME!static intMAGIC_NUMBERprivate byte[]makestatic intMAKEprivate byte[]makerNotestatic intMAX_IFD_LENGTHDOCUMENT ME!static intMAX_SAMPLE_VALUEDOCUMENT ME!private floatmaxApertureprivate intmaxAvailableEntryprivate shortmaxCodestatic intMETA_DATAstatic intMETA_DATA_BYTE_COUNTSAdobe Tiff Tagsprivate int[]metaDataCountsprivate shortmeteringModestatic intMIN_SAMPLE_VALUEDOCUMENT ME!private byte[]modelstatic intMODELstatic intMODEL_PIXEL_SCALEstatic intMODEL_TIEPOINTprivate booleanmodHuffmanCompressionprivate shortnBitsprivate longnBitsMaskprivate shortnDirEntriesDOCUMENT ME!private booleannegInterchangeXYstatic intNEW_SUBFILE_TYPETiff Tags.private booleannewLZWprivate int[]nextprivate longnextBitsprivate longnextDataprivate intnextFreeEntrystatic intORIENTATIONDOCUMENT ME!static intOVERLAYprivate booleanpackBitPack Bit: true if the read data file has pack bit compression.static intPAGE_NAMEstatic intPAGE_NUMBERprivate byte[]pageNamestatic intPHOTO_INTERPDOCUMENT ME!static intPHOTOSHOPstatic intPLANAR_CONFIGDOCUMENT ME!private intpredictorDOCUMENT ME!static intPREDICTORDOCUMENT ME!private intpreviousRecognizedCodestatic intRANGESstatic intREFERENCE_BLACK_WHITEstatic intRESOLUTION_UNITDOCUMENT ME!private longrestartstatic intROIprivate booleanrotate180private AlgorithmRotaterotateAlgoprivate booleanrotateMinus90private booleanrotatePlus90static intROWS_PER_STRIPDOCUMENT ME!private introwsPerStripDOCUMENT ME!static intSAMPLE_FORMATDOCUMENT ME!static intSAMPLES_PER_PIXELDOCUMENT ME!private intsamplesPerPixelDOCUMENT ME!private shortsaturationprivate shortsceneCaptureTypeprivate intsceneTypeprivate shortsensingMethodprivate booleanSGILog24Compressionprivate booleanSGILogCompressionprivate shortsharpnessprivate floatshutterSpeedprivate double[]sliceBufferDoubleDOCUMENT ME!private float[]sliceBufferFloatDOCUMENT ME!private intslicesprivate byte[]softwareDOCUMENT ME!static intSOFTWAREDOCUMENT ME!static intSTONITSSample value to Nits, where Nits is the photometric unit for luminance, also written candelas/meter**2.private java.lang.StringstrDOCUMENT ME!static intSTRIP_BYTE_COUNTSDOCUMENT ME!static intSTRIP_OFFSETSDOCUMENT ME!static intSUBFILE_TYPEstatic intSUBIFDSprivate booleansuppressProgressBarstatic intT4OPTIONSstatic intT6OPTIONSprivate FileTiff.JPEGInputStreamtableStreamprivate shortthreshholdingstatic intTHRESHHOLDINGprivate booleanThunderScanCompressionstatic intTILE_BYTE_COUNTSDOCUMENT ME!static intTILE_LENGTHDOCUMENT ME!static intTILE_OFFSETSDOCUMENT ME!static intTILE_WIDTHDOCUMENT ME!private int[]tileByteCountsDOCUMENT ME!private inttileByteNumberDOCUMENT ME!private inttileLengthDOCUMENT ME!private inttileMaxByteCountDOCUMENT ME!private inttileOffsetNumberDOCUMENT ME!private long[]tileOffsetsDOCUMENT ME!private inttilesAcrossDOCUMENT ME!private inttilesDownDOCUMENT ME!private inttilesPerImageDOCUMENT ME!private inttilesPerSliceDOCUMENT ME!private long[]tileTempDOCUMENT ME!private inttileWidthDOCUMENT ME!private doubletResDOCUMENT ME!static intTRESOLUTIONDOCUMENT ME!private ViewUserInterfaceUIprivate byte[]userCommentprivate byte[]valueprivate VOIVectorVOIsprivate shortwhiteBalanceprivate intxDimDOCUMENT ME!static intXMPprivate floatxPositionstatic intXPOSITIONstatic intXRESOLUTIONDOCUMENT ME!static intYCBCR_COEFFICIENTSstatic intYCBCR_POSITIONINGstatic intYCBCR_SUBSAMPLINGprivate intYCbCrPositioningprivate intYCbCrSubsampleHorizprivate intYCbCrSubsampleVertprivate intyDimDOCUMENT ME!private floatyPositionstatic intYPOSITIONprivate intYReferenceBlackprivate intYReferenceWhitestatic intYRESOLUTIONDOCUMENT ME!private booleanzlibCompressionTIFF files.private java.util.zip.InflaterzlibDecompresserprivate doublezResDOCUMENT ME!static intZRESOLUTIONEchoTech Tiff TAGS.-
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 FileTiff(java.lang.String fileName, java.lang.String fileDir)Tiff reader/writer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidCIELABtoRGB(float[] buffer)private intcopyin(byte[] imgdata, FileTiff.ModHuffmanInputStream is, int width, boolean invert)private voiddecodeROI(byte[] buffer)private intfax34Decompresser(byte[] dataOut, byte[] dataIn)private voidfax34Init()voidfinalize()Prepares this class for cleanup.private FileTiff.ModHuffmanInputStreamgetDecoder(java.io.InputStream is)FileInfoBasegetFileInfo()Accessor that returns the file info.float[]getImageBuffer()Accessor that returns the image buffer.ModelLUTgetModelLUT()Rreturns LUT if defined.private intgetSegment(float[] array, float[] seg, int index)private intjpegDecompresser(byte[] dataOut, byte[] dataIn, int rowsToDo)private intLogL16Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)private intLogLuv24Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)private intLogLuv32Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)private voidLZWDecompresser(byte[] inData, int bytesToRead, byte[] outData, int startingRow, int rowsToDo, int bytesToGeneratePerRow)Method to decode LZW compressed data.private intmodHuffmanDecompresser(byte[] dataOut, byte[] dataIn)private booleanopenIFD(FileInfoTiff fileInfo)Reads and decodes IFDs (Image File Directory).private voidreadBuffer(int slice, float[] buffer)Reads a slice of data at a time and stores the results in the buffer.private voidreadDoubleBuffer(int slice, double[] buffer)Reads a slice of data at a time and stores the results in the buffer.ModelImagereadImage(boolean multiFile, boolean one)Reads the Tiff header which indicates endianess, the TIFF magic number, and the offset in bytes of the first IFD.ModelImagereadLeicaSeries(JDialogLoadLeica.LeicaSeries series)Passed in a LeicaSeries object, this function builds a 2d or 3d reconstruction using the Vector of filenames within the series The vector has been presorted so that all files (whether red - green and then blue, or just grayscale) are read in sequentially to build the ModelImage.private intreadMH(byte[] imgdata, int off, java.io.InputStream is, int width)private voidreadTileBuffer(int slice, float[] buffer)Reads a slice of data at a time and stores the results in the buffer.voidsetFileDir(java.lang.String fDir)Accessor to set the file dir (used when reading TIFF multiFile).voidsetFileName(java.lang.String fName)Accessor to set the file name (used when reading TIFF multiFile).voidsetSuppressProgressBar(boolean suppressProgressBar)voidsetTIFFOrientation(boolean doTIFFOrientation)private intThunderScanDecompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)private voidwriteColorMap(int location)Writes color map to the TIFF file.private voidwriteHeader()Writes TIFF starting file header.private voidwriteIFD(int tag, FileTiff.Type type, int count, int value, int value2)Writes one 12 byte IFD entry.private voidwriteIFDs(ModelImage image, int imageOffset, int nextIFD, int index, int theStripCount, boolean writePackBit)Writes one IFD (Image File Directory).voidwriteImage(ModelImage image, ModelLUT LUT, FileWriteOptions options)This method writes a tiff image file.private voidYCbCrtoRGB(float[] buffer, int[] YBuffer, int[] CbInBuffer, int[] CrInBuffer)-
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
-
NEW_SUBFILE_TYPE
public static final int NEW_SUBFILE_TYPE
Tiff Tags.- See Also:
- Constant Field Values
-
SUBFILE_TYPE
public static final int SUBFILE_TYPE
- See Also:
- Constant Field Values
-
IMAGE_WIDTH
public static final int IMAGE_WIDTH
DOCUMENT ME!- See Also:
- Constant Field Values
-
IMAGE_LENGTH
public static final int IMAGE_LENGTH
DOCUMENT ME!- See Also:
- Constant Field Values
-
BITS_PER_SAMPLE
public static final int BITS_PER_SAMPLE
DOCUMENT ME!- See Also:
- Constant Field Values
-
COMPRESSION
public static final int COMPRESSION
Compression: 1 = no compression 2 = modified huffman 3 = CCITT-T4(FAX3) 4 = CCITT-T6(FAX4) 5 = LZW 6 = old JPEG 7 = JPEG 8 or 32946 = zlib 32773 = packbits 32809 = thunderscan RLE. 34676 = SGI Log Luminance RLE 34677 = SGI Log 24-bit packed- See Also:
- Constant Field Values
-
PHOTO_INTERP
public static final int PHOTO_INTERP
DOCUMENT ME!- See Also:
- Constant Field Values
-
THRESHHOLDING
public static final int THRESHHOLDING
- See Also:
- Constant Field Values
-
FILL_ORDER
public static final int FILL_ORDER
- See Also:
- Constant Field Values
-
DOCUMENT_NAME
public static final int DOCUMENT_NAME
- See Also:
- Constant Field Values
-
IMAGE_DESCRIPTION
public static final int IMAGE_DESCRIPTION
DOCUMENT ME!- See Also:
- Constant Field Values
-
MAKE
public static final int MAKE
- See Also:
- Constant Field Values
-
MODEL
public static final int MODEL
- See Also:
- Constant Field Values
-
STRIP_OFFSETS
public static final int STRIP_OFFSETS
DOCUMENT ME!- See Also:
- Constant Field Values
-
ORIENTATION
public static final int ORIENTATION
DOCUMENT ME!- See Also:
- Constant Field Values
-
SAMPLES_PER_PIXEL
public static final int SAMPLES_PER_PIXEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
ROWS_PER_STRIP
public static final int ROWS_PER_STRIP
DOCUMENT ME!- See Also:
- Constant Field Values
-
STRIP_BYTE_COUNTS
public static final int STRIP_BYTE_COUNTS
DOCUMENT ME!- See Also:
- Constant Field Values
-
MIN_SAMPLE_VALUE
public static final int MIN_SAMPLE_VALUE
DOCUMENT ME!- See Also:
- Constant Field Values
-
MAX_SAMPLE_VALUE
public static final int MAX_SAMPLE_VALUE
DOCUMENT ME!- See Also:
- Constant Field Values
-
XRESOLUTION
public static final int XRESOLUTION
DOCUMENT ME!- See Also:
- Constant Field Values
-
YRESOLUTION
public static final int YRESOLUTION
DOCUMENT ME!- See Also:
- Constant Field Values
-
PLANAR_CONFIG
public static final int PLANAR_CONFIG
DOCUMENT ME!- See Also:
- Constant Field Values
-
PAGE_NAME
public static final int PAGE_NAME
- See Also:
- Constant Field Values
-
XPOSITION
public static final int XPOSITION
- See Also:
- Constant Field Values
-
YPOSITION
public static final int YPOSITION
- See Also:
- Constant Field Values
-
T4OPTIONS
public static final int T4OPTIONS
- See Also:
- Constant Field Values
-
T6OPTIONS
public static final int T6OPTIONS
- See Also:
- Constant Field Values
-
RESOLUTION_UNIT
public static final int RESOLUTION_UNIT
DOCUMENT ME!- See Also:
- Constant Field Values
-
PAGE_NUMBER
public static final int PAGE_NUMBER
- See Also:
- Constant Field Values
-
SOFTWARE
public static final int SOFTWARE
DOCUMENT ME!- See Also:
- Constant Field Values
-
DATE_TIME
public static final int DATE_TIME
DOCUMENT ME!- See Also:
- Constant Field Values
-
ARTIST
public static final int ARTIST
DOCUMENT ME!- See Also:
- Constant Field Values
-
HOST_COMPUTER
public static final int HOST_COMPUTER
DOCUMENT ME!- See Also:
- Constant Field Values
-
PREDICTOR
public static final int PREDICTOR
DOCUMENT ME!- See Also:
- Constant Field Values
-
COLOR_MAP
public static final int COLOR_MAP
DOCUMENT ME!- See Also:
- Constant Field Values
-
HALFTONE_HINTS
public static final int HALFTONE_HINTS
- See Also:
- Constant Field Values
-
TILE_WIDTH
public static final int TILE_WIDTH
DOCUMENT ME!- See Also:
- Constant Field Values
-
TILE_LENGTH
public static final int TILE_LENGTH
DOCUMENT ME!- See Also:
- Constant Field Values
-
TILE_OFFSETS
public static final int TILE_OFFSETS
DOCUMENT ME!- See Also:
- Constant Field Values
-
TILE_BYTE_COUNTS
public static final int TILE_BYTE_COUNTS
DOCUMENT ME!- See Also:
- Constant Field Values
-
BAD_FAX_LINES
public static final int BAD_FAX_LINES
- See Also:
- Constant Field Values
-
CLEAN_FAX_DATA
public static final int CLEAN_FAX_DATA
- See Also:
- Constant Field Values
-
CONSECUTIVE_BAD_FAX_LINES
public static final int CONSECUTIVE_BAD_FAX_LINES
- See Also:
- Constant Field Values
-
SUBIFDS
public static final int SUBIFDS
- See Also:
- Constant Field Values
-
INK_SET
public static final int INK_SET
- See Also:
- Constant Field Values
-
INK_NAMES
public static final int INK_NAMES
- See Also:
- Constant Field Values
-
DOT_RANGE
public static final int DOT_RANGE
- See Also:
- Constant Field Values
-
EXTRA_SAMPLES
public static final int EXTRA_SAMPLES
- See Also:
- Constant Field Values
-
SAMPLE_FORMAT
public static final int SAMPLE_FORMAT
DOCUMENT ME!- See Also:
- Constant Field Values
-
JPEG_TABLES
public static final int JPEG_TABLES
- See Also:
- Constant Field Values
-
YCBCR_COEFFICIENTS
public static final int YCBCR_COEFFICIENTS
- See Also:
- Constant Field Values
-
YCBCR_SUBSAMPLING
public static final int YCBCR_SUBSAMPLING
- See Also:
- Constant Field Values
-
YCBCR_POSITIONING
public static final int YCBCR_POSITIONING
- See Also:
- Constant Field Values
-
REFERENCE_BLACK_WHITE
public static final int REFERENCE_BLACK_WHITE
- See Also:
- Constant Field Values
-
XMP
public static final int XMP
- See Also:
- Constant Field Values
-
COPYRIGHT
public static final int COPYRIGHT
- See Also:
- Constant Field Values
-
EXIFTAG_EXPOSURE_TIME
public static final int EXIFTAG_EXPOSURE_TIME
- See Also:
- Constant Field Values
-
EXIFTAG_FNUMBER
public static final int EXIFTAG_FNUMBER
- See Also:
- Constant Field Values
-
MODEL_PIXEL_SCALE
public static final int MODEL_PIXEL_SCALE
- See Also:
- Constant Field Values
-
IPTC
public static final int IPTC
- See Also:
- Constant Field Values
-
MODEL_TIEPOINT
public static final int MODEL_TIEPOINT
- See Also:
- Constant Field Values
-
PHOTOSHOP
public static final int PHOTOSHOP
- See Also:
- Constant Field Values
-
EXIFIFD
public static final int EXIFIFD
- See Also:
- Constant Field Values
-
ICC_PROFILE
public static final int ICC_PROFILE
- See Also:
- Constant Field Values
-
EXIFTAG_EXPOSURE_PROGRAM
public static final int EXIFTAG_EXPOSURE_PROGRAM
- See Also:
- Constant Field Values
-
EXIFTAG_ISO_SPEED_RATINGS
public static final int EXIFTAG_ISO_SPEED_RATINGS
- See Also:
- Constant Field Values
-
EXIFTAG_EXIF_VERSION
public static final int EXIFTAG_EXIF_VERSION
- See Also:
- Constant Field Values
-
EXIFTAG_DATE_TIME_ORIGINAL
public static final int EXIFTAG_DATE_TIME_ORIGINAL
- See Also:
- Constant Field Values
-
EXIFTAG_DATE_TIME_DIGITIZED
public static final int EXIFTAG_DATE_TIME_DIGITIZED
- See Also:
- Constant Field Values
-
EXIFTAG_SHUTTER_SPEED_VALUE
public static final int EXIFTAG_SHUTTER_SPEED_VALUE
- See Also:
- Constant Field Values
-
EXIFTAG_APERTURE_VALUE
public static final int EXIFTAG_APERTURE_VALUE
- See Also:
- Constant Field Values
-
EXIFTAG_BRIGHTNESS_VALUE
public static final int EXIFTAG_BRIGHTNESS_VALUE
- See Also:
- Constant Field Values
-
EXIFTAG_EXPOSURE_BIAS_VALUE
public static final int EXIFTAG_EXPOSURE_BIAS_VALUE
- See Also:
- Constant Field Values
-
EXIFTAG_MAX_APERTURE_VALUE
public static final int EXIFTAG_MAX_APERTURE_VALUE
- See Also:
- Constant Field Values
-
EXIFTAG_METERING_MODE
public static final int EXIFTAG_METERING_MODE
- See Also:
- Constant Field Values
-
EXIFTAG_LIGHT_SOURCE
public static final int EXIFTAG_LIGHT_SOURCE
- See Also:
- Constant Field Values
-
EXIFTAG_FLASH
public static final int EXIFTAG_FLASH
- See Also:
- Constant Field Values
-
EXIFTAG_FOCAL_LENGTH
public static final int EXIFTAG_FOCAL_LENGTH
- See Also:
- Constant Field Values
-
EXIFTAG_MAKER_NOTE
public static final int EXIFTAG_MAKER_NOTE
- See Also:
- Constant Field Values
-
EXIFTAG_USER_COMMENT
public static final int EXIFTAG_USER_COMMENT
- See Also:
- Constant Field Values
-
STONITS
public static final int STONITS
Sample value to Nits, where Nits is the photometric unit for luminance, also written candelas/meter**2.- See Also:
- Constant Field Values
-
IMAGE_SOURCE_DATA
public static final int IMAGE_SOURCE_DATA
- See Also:
- Constant Field Values
-
EXIFTAG_FLASHPIX_VERSION
public static final int EXIFTAG_FLASHPIX_VERSION
- See Also:
- Constant Field Values
-
EXIFTAG_COLOR_SPACE
public static final int EXIFTAG_COLOR_SPACE
- See Also:
- Constant Field Values
-
EXIFTAG_PIXEL_X_DIMENSION
public static final int EXIFTAG_PIXEL_X_DIMENSION
- See Also:
- Constant Field Values
-
EXIFTAG_PIXEL_Y_DIMENSION
public static final int EXIFTAG_PIXEL_Y_DIMENSION
- See Also:
- Constant Field Values
-
EXIFTAG_FOCAL_PLANE_X_RESOLUTION
public static final int EXIFTAG_FOCAL_PLANE_X_RESOLUTION
- See Also:
- Constant Field Values
-
EXIFTAG_FOCAL_PLANE_Y_RESOLUTION
public static final int EXIFTAG_FOCAL_PLANE_Y_RESOLUTION
- See Also:
- Constant Field Values
-
EXIFTAG_FOCAL_PLANE_RESOLUTION_UNIT
public static final int EXIFTAG_FOCAL_PLANE_RESOLUTION_UNIT
- See Also:
- Constant Field Values
-
EXIFTAG_SENSING_METHOD
public static final int EXIFTAG_SENSING_METHOD
- See Also:
- Constant Field Values
-
EXIFTAG_FILE_SOURCE
public static final int EXIFTAG_FILE_SOURCE
- See Also:
- Constant Field Values
-
EXIFTAG_SCENE_TYPE
public static final int EXIFTAG_SCENE_TYPE
- See Also:
- Constant Field Values
-
EXIFTAG_CUSTOM_RENDERED
public static final int EXIFTAG_CUSTOM_RENDERED
- See Also:
- Constant Field Values
-
EXIFTAG_EXPOSURE_MODE
public static final int EXIFTAG_EXPOSURE_MODE
- See Also:
- Constant Field Values
-
EXIFTAG_WHITE_BALANCE
public static final int EXIFTAG_WHITE_BALANCE
- See Also:
- Constant Field Values
-
EXIFTAG_DIGITAL_ZOOM_RATIO
public static final int EXIFTAG_DIGITAL_ZOOM_RATIO
- See Also:
- Constant Field Values
-
EXIFTAG_SCENE_CAPTURE_TYPE
public static final int EXIFTAG_SCENE_CAPTURE_TYPE
- See Also:
- Constant Field Values
-
EXIFTAG_GAIN_CONTROL
public static final int EXIFTAG_GAIN_CONTROL
- See Also:
- Constant Field Values
-
EXIFTAG_CONTRAST
public static final int EXIFTAG_CONTRAST
- See Also:
- Constant Field Values
-
EXIFTAG_SATURATION
public static final int EXIFTAG_SATURATION
- See Also:
- Constant Field Values
-
EXIFTAG_SHARPNESS
public static final int EXIFTAG_SHARPNESS
- See Also:
- Constant Field Values
-
GDAL_METADATA
public static final int GDAL_METADATA
- See Also:
- Constant Field Values
-
META_DATA_BYTE_COUNTS
public static final int META_DATA_BYTE_COUNTS
Adobe Tiff Tags- See Also:
- Constant Field Values
-
META_DATA
public static final int META_DATA
- See Also:
- Constant Field Values
-
ZRESOLUTION
public static final int ZRESOLUTION
EchoTech Tiff TAGS.- See Also:
- Constant Field Values
-
TRESOLUTION
public static final int TRESOLUTION
DOCUMENT ME!- See Also:
- Constant Field Values
-
MAX_IFD_LENGTH
public static final int MAX_IFD_LENGTH
DOCUMENT ME!- See Also:
- Constant Field Values
-
MAGIC_NUMBER
public static final int MAGIC_NUMBER
- See Also:
- Constant Field Values
-
INFO
public static final int INFO
- See Also:
- Constant Field Values
-
LABELS
public static final int LABELS
- See Also:
- Constant Field Values
-
RANGES
public static final int RANGES
- See Also:
- Constant Field Values
-
LUTS
public static final int LUTS
- See Also:
- Constant Field Values
-
ROI
public static final int ROI
- See Also:
- Constant Field Values
-
OVERLAY
public static final int OVERLAY
- See Also:
- Constant Field Values
-
artist
private byte[] artist
DOCUMENT ME!
-
byteBuffer
private byte[] byteBuffer
DOCUMENT ME!
-
chunky
private boolean chunky
DOCUMENT ME!
-
dataOffsets
private java.util.Vector<FileTiff.Index>[] dataOffsets
-
dateTime
private byte[] dateTime
DOCUMENT ME!
-
doubleBuffer
private double[] doubleBuffer
DOCUMENT ME!
-
endianess
private boolean endianess
DOCUMENT ME!
-
file
private java.io.File file
The file...
-
fileDir
private java.lang.String fileDir
File directory.
-
fileInfo
private FileInfoTiff fileInfo
File Info.
-
fileName
private java.lang.String fileName
File name.
-
filePB
private FilePackBit filePB
DOCUMENT ME!
-
fileRW
private FileRawChunk fileRW
DOCUMENT ME!
-
foundTag43314
private boolean foundTag43314
DOCUMENT ME!
-
hostComputer
private byte[] hostComputer
DOCUMENT ME!
-
pageName
private byte[] pageName
-
IFDoffsets
private int[] IFDoffsets
DOCUMENT ME!
-
image
private ModelImage image
DOCUMENT ME!
-
imageDescription
private byte[] imageDescription
DOCUMENT ME!
-
make
private byte[] make
-
model
private byte[] model
-
imageSlice
private int imageSlice
DOCUMENT ME!
-
imgBuffer
private float[] imgBuffer
DOCUMENT ME!
-
imgResols
private float[] imgResols
DOCUMENT ME!
-
xPosition
private float xPosition
-
yPosition
private float yPosition
-
LUT
private ModelLUT LUT
DOCUMENT ME!
-
LUTOffset
private int LUTOffset
DOCUMENT ME!
-
lightHalftone
private short lightHalftone
-
darkHalftone
private short darkHalftone
-
extraSamples
private short[] extraSamples
-
lzwCompression
private boolean lzwCompression
DOCUMENT ME!
-
zlibCompression
private boolean zlibCompression
TIFF files.
-
zlibDecompresser
private java.util.zip.Inflater zlibDecompresser
-
nDirEntries
private short nDirEntries
DOCUMENT ME!
-
packBit
private boolean packBit
Pack Bit: true if the read data file has pack bit compression.
-
predictor
private int predictor
DOCUMENT ME!
-
rowsPerStrip
private int rowsPerStrip
DOCUMENT ME!
-
haveRowsPerStrip
private boolean haveRowsPerStrip
-
samplesPerPixel
private int samplesPerPixel
DOCUMENT ME!
-
sliceBufferDouble
private double[] sliceBufferDouble
DOCUMENT ME!
-
sliceBufferFloat
private float[] sliceBufferFloat
DOCUMENT ME!
-
software
private byte[] software
DOCUMENT ME!
-
documentName
private byte[] documentName
-
inkNames
private byte[] inkNames
-
copyright
private byte[] copyright
-
str
private java.lang.String str
DOCUMENT ME!
-
tileByteCounts
private int[] tileByteCounts
DOCUMENT ME!
-
tileByteNumber
private int tileByteNumber
DOCUMENT ME!
-
tileLength
private int tileLength
DOCUMENT ME!
-
tileMaxByteCount
private int tileMaxByteCount
DOCUMENT ME!
-
tileOffsetNumber
private int tileOffsetNumber
DOCUMENT ME!
-
tileOffsets
private long[] tileOffsets
DOCUMENT ME!
-
tilesAcross
private int tilesAcross
DOCUMENT ME!
-
tilesDown
private int tilesDown
DOCUMENT ME!
-
tilesPerImage
private int tilesPerImage
DOCUMENT ME!
-
tilesPerSlice
private int tilesPerSlice
DOCUMENT ME!
-
tileTemp
private long[] tileTemp
DOCUMENT ME!
-
tileWidth
private int tileWidth
DOCUMENT ME!
-
haveTileWidth
private boolean haveTileWidth
-
haveTileLength
private boolean haveTileLength
-
haveTileOffsets
private boolean haveTileOffsets
-
bitsPerSample
private int[] bitsPerSample
-
haveChangedPhotometricTo1
private boolean haveChangedPhotometricTo1
-
tRes
private double tRes
DOCUMENT ME!
-
xDim
private int xDim
DOCUMENT ME!
-
yDim
private int yDim
DOCUMENT ME!
-
fileLength
private long fileLength
-
zRes
private double zRes
DOCUMENT ME!
-
fillOrder
private int fillOrder
-
isCIELAB
private boolean isCIELAB
-
isYCbCr
private boolean isYCbCr
-
isCMYK
private boolean isCMYK
-
LumaRed
private float LumaRed
-
LumaGreen
private float LumaGreen
-
LumaBlue
private float LumaBlue
-
YCbCrSubsampleHoriz
private int YCbCrSubsampleHoriz
-
YCbCrSubsampleVert
private int YCbCrSubsampleVert
-
YCbCrPositioning
private int YCbCrPositioning
-
YReferenceBlack
private int YReferenceBlack
-
YReferenceWhite
private int YReferenceWhite
-
CbReferenceBlack
private int CbReferenceBlack
-
CbReferenceWhite
private int CbReferenceWhite
-
CrReferenceBlack
private int CrReferenceBlack
-
CrReferenceWhite
private int CrReferenceWhite
-
inkSet
private final int inkSet
- See Also:
- Constant Field Values
-
isBW2
private boolean isBW2
-
isBW4
private boolean isBW4
-
isBW6
private boolean isBW6
-
isBW10
private boolean isBW10
-
isBW12
private boolean isBW12
-
isBW14
private boolean isBW14
-
isBW24
private boolean isBW24
-
isRGB2
private boolean isRGB2
-
isRGB4
private boolean isRGB4
-
isRGB10
private boolean isRGB10
-
isRGB12
private boolean isRGB12
-
isRGB14
private boolean isRGB14
-
isRGB24UINTtoFLOAT
private boolean isRGB24UINTtoFLOAT
-
isRGB32UINTtoFLOAT
private boolean isRGB32UINTtoFLOAT
-
fax3Compression
private boolean fax3Compression
-
fax4Compression
private boolean fax4Compression
-
modHuffmanCompression
private boolean modHuffmanCompression
-
group3_2D_Coding
private boolean group3_2D_Coding
-
group3Uncompressed
private boolean group3Uncompressed
-
group3Fillbits
private boolean group3Fillbits
-
group4Uncompressed
private boolean group4Uncompressed
-
haveMultiSpectraImage
private boolean haveMultiSpectraImage
-
jpegCompression
private boolean jpegCompression
-
jpegTables
private byte[] jpegTables
-
tableStream
private FileTiff.JPEGInputStream tableStream
-
ThunderScanCompression
private boolean ThunderScanCompression
-
isLogL
private boolean isLogL
-
isLogLuv
private boolean isLogLuv
-
SGILogCompression
private boolean SGILogCompression
-
SGILog24Compression
private boolean SGILog24Compression
-
exposureTime
private float exposureTime
-
fNumber
private float fNumber
-
exposureProgram
private short exposureProgram
-
isoSpeedRatings
private short[] isoSpeedRatings
-
exifVersion
private byte[] exifVersion
-
dateTimeOriginal
private byte[] dateTimeOriginal
-
dateTimeDigitized
private byte[] dateTimeDigitized
-
exposureBias
private float exposureBias
-
maxAperture
private float maxAperture
-
meteringMode
private short meteringMode
-
lightSource
private short lightSource
-
flash
private short flash
-
focalLength
private float focalLength
-
makerNote
private byte[] makerNote
-
characterCode
private byte[] characterCode
-
userComment
private byte[] userComment
-
flashPixVersion
private byte[] flashPixVersion
-
colorSpace
private int colorSpace
-
fileSource
private int fileSource
-
sceneType
private int sceneType
-
customRendered
private short customRendered
-
exposureMode
private short exposureMode
-
whiteBalance
private short whiteBalance
-
digitalZoomRatio
private float digitalZoomRatio
-
sceneCaptureType
private short sceneCaptureType
-
gainControl
private short gainControl
-
contrast
private short contrast
-
saturation
private short saturation
-
sharpness
private short sharpness
-
shutterSpeed
private float shutterSpeed
-
aperture
private float aperture
-
brightness
private float brightness
-
focalPlaneXResolution
private float focalPlaneXResolution
-
focalPlaneYResolution
private float focalPlaneYResolution
-
focalPlaneResolutionUnit
private short focalPlaneResolutionUnit
-
sensingMethod
private short sensingMethod
-
gdalMetadata
private byte[] gdalMetadata
-
badFaxLines
private int badFaxLines
-
cleanFaxData
private short cleanFaxData
-
consecutiveBadFaxLines
private int consecutiveBadFaxLines
-
threshholding
private short threshholding
-
newLZW
private boolean newLZW
-
haveLZWInit
private boolean haveLZWInit
-
next
private int[] next
-
length
private short[] length
-
value
private byte[] value
-
firstChar
private byte[] firstChar
-
nBits
private short nBits
-
maxCode
private short maxCode
-
nextData
private long nextData
-
nextBits
private long nextBits
-
nBitsMask
private long nBitsMask
-
restart
private long restart
-
bitsLeft
private int bitsLeft
-
currentRecognizedCode
private int currentRecognizedCode
-
previousRecognizedCode
private int previousRecognizedCode
-
nextFreeEntry
private int nextFreeEntry
-
maxAvailableEntry
private int maxAvailableEntry
-
flipHorizontal
private boolean flipHorizontal
-
rotate180
private boolean rotate180
-
flipVertical
private boolean flipVertical
-
interchangeXY
private boolean interchangeXY
-
rotatePlus90
private boolean rotatePlus90
-
negInterchangeXY
private boolean negInterchangeXY
-
rotateMinus90
private boolean rotateMinus90
-
flipAlgo
private AlgorithmFlip flipAlgo
-
rotateAlgo
private AlgorithmRotate rotateAlgo
-
isRGBA
private boolean isRGBA
-
metaDataCounts
private int[] metaDataCounts
-
VOIs
private VOIVector VOIs
-
UI
private final ViewUserInterface UI
-
doTIFFOrientation
private boolean doTIFFOrientation
-
suppressProgressBar
private boolean suppressProgressBar
-
haveResolutionUnit
private boolean haveResolutionUnit
-
haveZResolution
private boolean haveZResolution
-
channels
private int channels
-
slices
private int slices
-
frames
private int frames
-
have4DColor
private boolean have4DColor
-
have3DColor
private boolean have3DColor
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for cleanup. Calls thefinalizemethod for existing elements, closes any open files and sets other elements tonull.
-
setTIFFOrientation
public void setTIFFOrientation(boolean doTIFFOrientation)
- Parameters:
doTIFFOrientation-
-
setSuppressProgressBar
public void setSuppressProgressBar(boolean suppressProgressBar)
- Parameters:
suppressProgressBar-
-
getFileInfo
public FileInfoBase getFileInfo()
Accessor that returns the file info.- Returns:
- FileInfoBase containing the file info
-
getImageBuffer
public float[] getImageBuffer()
Accessor that returns the image buffer.- Returns:
- buffer of image.
-
getModelLUT
public ModelLUT getModelLUT()
Rreturns LUT if defined.- Returns:
- the LUT if defined else it is null
-
readImage
public ModelImage readImage(boolean multiFile, boolean one) throws java.io.IOException
Reads the Tiff header which indicates endianess, the TIFF magic number, and the offset in bytes of the first IFD. It then reads all the IFDs. This method then opens a Model of an image and imports the the images one slice at a time. Image slices are separated by an IFD.- Parameters:
multiFile-trueif a set of files each containing a separate 2D image is presentfalseif one file with either a 2D image or a stack of 2D imagesone-trueif only want to read in one image of the 3D set- Returns:
- returns the image
- Throws:
java.io.IOException- if there is an error reading the file
-
CIELABtoRGB
private void CIELABtoRGB(float[] buffer)
-
YCbCrtoRGB
private void YCbCrtoRGB(float[] buffer, int[] YBuffer, int[] CbInBuffer, int[] CrInBuffer)- Parameters:
buffer-YBuffer-CbInBuffer-CrInBuffer-
-
LZWDecompresser
private void LZWDecompresser(byte[] inData, int bytesToRead, byte[] outData, int startingRow, int rowsToDo, int bytesToGeneratePerRow) throws java.io.IOExceptionMethod to decode LZW compressed data.- Parameters:
inData- The compressed data.bytesToRead- bytes to be read from inDataoutData- Array to return the uncompressed data in.startingRow- First row to be generated from the callrowsToDo- The number of rows the compressed data contains.bytesGeneratedPerRow-- Throws:
java.io.IOException
-
fax34Init
private void fax34Init()
-
modHuffmanDecompresser
private int modHuffmanDecompresser(byte[] dataOut, byte[] dataIn)
-
readMH
private int readMH(byte[] imgdata, int off, java.io.InputStream is, int width) throws java.io.IOException- Throws:
java.io.IOException
-
jpegDecompresser
private int jpegDecompresser(byte[] dataOut, byte[] dataIn, int rowsToDo)
-
LogL16Decompresser
private int LogL16Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
-
LogLuv24Decompresser
private int LogLuv24Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
-
LogLuv32Decompresser
private int LogLuv32Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
-
ThunderScanDecompresser
private int ThunderScanDecompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
-
fax34Decompresser
private int fax34Decompresser(byte[] dataOut, byte[] dataIn)
-
copyin
private int copyin(byte[] imgdata, FileTiff.ModHuffmanInputStream is, int width, boolean invert) throws java.io.IOException- Throws:
java.io.IOException
-
getDecoder
private FileTiff.ModHuffmanInputStream getDecoder(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
readLeicaSeries
public ModelImage readLeicaSeries(JDialogLoadLeica.LeicaSeries series) throws java.io.IOException
Passed in a LeicaSeries object, this function builds a 2d or 3d reconstruction using the Vector of filenames within the series The vector has been presorted so that all files (whether red - green and then blue, or just grayscale) are read in sequentially to build the ModelImage.- Parameters:
series- LeicaSeries series contains leica information for construction- Returns:
- ModelImage a 3d or 2d rgb or grayscale ModelImage
- Throws:
java.io.IOException- DOCUMENT ME!
-
setFileDir
public void setFileDir(java.lang.String fDir)
Accessor to set the file dir (used when reading TIFF multiFile).- Parameters:
fDir- file dir of image to read.
-
setFileName
public void setFileName(java.lang.String fName)
Accessor to set the file name (used when reading TIFF multiFile).- Parameters:
fName- file name of image to read.
-
writeImage
public void writeImage(ModelImage image, ModelLUT LUT, FileWriteOptions options) throws java.io.IOException
This method writes a tiff image file.- Parameters:
image- image model where the data is stored.LUT- LUT to be saved with image if not null.options- options to be used to write out the image- Throws:
java.io.IOException- if there is an error writing the file.
-
openIFD
private boolean openIFD(FileInfoTiff fileInfo) throws java.io.IOException
Reads and decodes IFDs (Image File Directory).- Parameters:
fileInfo- DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
java.io.IOException- if there is an error reading the file
-
decodeROI
private void decodeROI(byte[] buffer)
-
getSegment
private int getSegment(float[] array, float[] seg, int index)
-
readBuffer
private 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- offset into the file stored in the dataOffset arraybuffer- buffer where the info is stored- Throws:
java.io.IOException- if there is an error reading the file
-
readDoubleBuffer
private void readDoubleBuffer(int slice, double[] buffer) throws java.io.IOExceptionReads a slice of data at a time and stores the results in the buffer.- Parameters:
slice- offset into the file stored in the dataOffset arraybuffer- buffer where the info is stored- Throws:
java.io.IOException- if there is an error reading the file
-
readTileBuffer
private void readTileBuffer(int slice, float[] buffer) throws java.io.IOExceptionReads a slice of data at a time and stores the results in the buffer.- Parameters:
slice- image slicebuffer- buffer where the info is stored- Throws:
java.io.IOException- if there is an error reading the file
-
writeColorMap
private void writeColorMap(int location) throws java.io.IOExceptionWrites color map to the TIFF file.- Parameters:
location- Location to write at.- Throws:
java.io.IOException- DOCUMENT ME!
-
writeHeader
private void writeHeader() throws java.io.IOExceptionWrites TIFF starting file header.- Throws:
java.io.IOException- DOCUMENT ME!
-
writeIFD
private void writeIFD(int tag, FileTiff.Type type, int count, int value, int value2) throws java.io.IOExceptionWrites one 12 byte IFD entry.- Parameters:
tag- DOCUMENT ME!type- DOCUMENT ME!count- DOCUMENT ME!value- DOCUMENT ME!value2- DOCUMENT ME!- Throws:
java.io.IOException- DOCUMENT ME!
-
writeIFDs
private void writeIFDs(ModelImage image, int imageOffset, int nextIFD, int index, int theStripCount, boolean writePackBit) throws java.io.IOException
Writes one IFD (Image File Directory). One IFD per image- Parameters:
image- offset to next IFD. If equal to zero then end of imagesimageOffset- DOCUMENT ME!nextIFD- DOCUMENT ME!index- image index for file information.theStripCount- DOCUMENT ME!writePackBit- DOCUMENT ME!- Throws:
java.io.IOException- DOCUMENT ME!
-
-