Package gov.nih.mipav.model.file
Class FileSVS
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileSVS
-
public class FileSVS 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
,FileInfoSVS
,FileRaw
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileSVS.BitInputStream
class
FileSVS.BitSwapInputStream
static interface
FileSVS.BitSwapTable
private class
FileSVS.Index
Simple class to store image offsets and bytes located at the offset.class
FileSVS.IntFilterInputStream
class
FileSVS.JPEGACInputStream
class
FileSVS.JPEGBitInputStream
class
FileSVS.JPEGComponentInputStream
static interface
FileSVS.JPEGConstants
class
FileSVS.JPEGDCInputStream
class
FileSVS.JPEGDCTInputStream
class
FileSVS.JPEGFastDCTInputStream
class
FileSVS.JPEGHuffmanInputStream
class
FileSVS.JPEGInputStream
class
FileSVS.ModHuffmanInputStream
static interface
FileSVS.ModHuffmanTable
class
FileSVS.ModModREADInputStream
class
FileSVS.ModREADInputStream
static interface
FileSVS.ModREADTable
class
FileSVS.RLEBitInputStream
class
FileSVS.TIFFYCbCrInputStream
static class
FileSVS.Type
Tiff Types.
-
Field Summary
Fields Modifier and Type Field Description private float
aperture
private byte[]
artist
DOCUMENT ME!static int
ARTIST
DOCUMENT ME!static int
BAD_FAX_LINES
private int
badFaxLines
static int
BITS_PER_SAMPLE
DOCUMENT ME!private int
bitsLeft
private int[]
bitsPerSample
private float
brightness
private byte[]
byteBuffer
DOCUMENT ME!private int
CbReferenceBlack
private int
CbReferenceWhite
private byte[]
characterCode
private boolean
chunky
DOCUMENT ME!static int
CLEAN_FAX_DATA
private short
cleanFaxData
static int
COLOR_MAP
DOCUMENT ME!private int
colorSpace
static 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 packedstatic int
CONSECUTIVE_BAD_FAX_LINES
private int
consecutiveBadFaxLines
private short
contrast
private byte[]
copyright
static int
COPYRIGHT
private int
CrReferenceBlack
private int
CrReferenceWhite
private int
currentRecognizedCode
private short
customRendered
private short
darkHalftone
private java.util.Vector<FileSVS.Index>[]
dataOffsets
static int
DATE_TIME
DOCUMENT ME!private byte[]
dateTime
DOCUMENT ME!private byte[]
dateTimeDigitized
private byte[]
dateTimeOriginal
private float
digitalZoomRatio
static int
DOCUMENT_NAME
private byte[]
documentName
static int
DOT_RANGE
private boolean
doTIFFOrientation
private double[]
doubleBuffer
DOCUMENT ME!private boolean
endianess
DOCUMENT ME!static int
EXIFIFD
static int
EXIFTAG_APERTURE_VALUE
static int
EXIFTAG_BRIGHTNESS_VALUE
static int
EXIFTAG_COLOR_SPACE
static int
EXIFTAG_CONTRAST
static int
EXIFTAG_CUSTOM_RENDERED
static int
EXIFTAG_DATE_TIME_DIGITIZED
static int
EXIFTAG_DATE_TIME_ORIGINAL
static int
EXIFTAG_DIGITAL_ZOOM_RATIO
static int
EXIFTAG_EXIF_VERSION
static int
EXIFTAG_EXPOSURE_BIAS_VALUE
static int
EXIFTAG_EXPOSURE_MODE
static int
EXIFTAG_EXPOSURE_PROGRAM
static int
EXIFTAG_EXPOSURE_TIME
static int
EXIFTAG_FILE_SOURCE
static int
EXIFTAG_FLASH
static int
EXIFTAG_FLASHPIX_VERSION
static int
EXIFTAG_FNUMBER
static int
EXIFTAG_FOCAL_LENGTH
static int
EXIFTAG_FOCAL_PLANE_RESOLUTION_UNIT
static int
EXIFTAG_FOCAL_PLANE_X_RESOLUTION
static int
EXIFTAG_FOCAL_PLANE_Y_RESOLUTION
static int
EXIFTAG_GAIN_CONTROL
static int
EXIFTAG_ISO_SPEED_RATINGS
static int
EXIFTAG_LIGHT_SOURCE
static int
EXIFTAG_MAKER_NOTE
static int
EXIFTAG_MAX_APERTURE_VALUE
static int
EXIFTAG_METERING_MODE
static int
EXIFTAG_PIXEL_X_DIMENSION
static int
EXIFTAG_PIXEL_Y_DIMENSION
static int
EXIFTAG_SATURATION
static int
EXIFTAG_SCENE_CAPTURE_TYPE
static int
EXIFTAG_SCENE_TYPE
static int
EXIFTAG_SENSING_METHOD
static int
EXIFTAG_SHARPNESS
static int
EXIFTAG_SHUTTER_SPEED_VALUE
static int
EXIFTAG_USER_COMMENT
static int
EXIFTAG_WHITE_BALANCE
private byte[]
exifVersion
private float
exposureBias
private short
exposureMode
private short
exposureProgram
private float
exposureTime
static int
EXTRA_SAMPLES
private short[]
extraSamples
private boolean
fax3Compression
private boolean
fax4Compression
private java.io.File
file
The file...private java.lang.String
fileDir
File directory.private FileInfoSVS
fileInfo
File Info.private long
fileLength
private java.lang.String
fileName
File name.private FilePackBit
filePB
DOCUMENT ME!private FileRawChunk
fileRW
DOCUMENT ME!private int
fileSource
static int
FILL_ORDER
private int
fillOrder
private byte[]
firstChar
private short
flash
private byte[]
flashPixVersion
private AlgorithmFlip
flipAlgo
private boolean
flipHorizontal
private boolean
flipVertical
private float
fNumber
private float
focalLength
private short
focalPlaneResolutionUnit
private float
focalPlaneXResolution
private float
focalPlaneYResolution
private boolean
foundTag43314
DOCUMENT ME!private short
gainControl
static int
GDAL_METADATA
private byte[]
gdalMetadata
private boolean
group3_2D_Coding
private boolean
group3Fillbits
private boolean
group3Uncompressed
private boolean
group4Uncompressed
static int
HALFTONE_HINTS
private boolean
haveChangedPhotometricTo1
private boolean
haveLZWInit
private boolean
haveMultiSpectraImage
private boolean
haveResolutionUnit
private boolean
haveRowsPerStrip
private boolean
haveTileLength
private boolean
haveTileOffsets
private boolean
haveTileWidth
private boolean
haveZResolution
static int
HOST_COMPUTER
DOCUMENT ME!private byte[]
hostComputer
DOCUMENT ME!static int
ICC_PROFILE
private int[]
IFDoffsets
DOCUMENT ME!private ModelImage
image
DOCUMENT ME!static int
IMAGE_DESCRIPTION
DOCUMENT ME!static int
IMAGE_LENGTH
DOCUMENT ME!static int
IMAGE_SOURCE_DATA
static int
IMAGE_WIDTH
DOCUMENT ME!private byte[]
imageDescription
DOCUMENT ME!private int
imageSlice
DOCUMENT ME!private float[]
imgBuffer
DOCUMENT ME!private float[]
imgResols
DOCUMENT ME!static int
INFO
static int
INK_NAMES
static int
INK_SET
private byte[]
inkNames
private int
inkSet
private boolean
interchangeXY
static int
IPTC
private boolean
isBW10
private boolean
isBW12
private boolean
isBW14
private boolean
isBW2
private boolean
isBW24
private boolean
isBW4
private boolean
isBW6
private boolean
isCIELAB
private boolean
isCMYK
private boolean
isLogL
private boolean
isLogLuv
private short[]
isoSpeedRatings
private boolean
isRGB10
private boolean
isRGB12
private boolean
isRGB14
private boolean
isRGB2
private boolean
isRGB24UINTtoFLOAT
private boolean
isRGB32UINTtoFLOAT
private boolean
isRGB4
private boolean
isRGBA
private boolean
isYCbCr
static int
JPEG_TABLES
private boolean
jpeg2000Compression
private boolean
jpegCompression
private byte[]
jpegTables
static int
LABELS
private short[]
length
private short
lightHalftone
private short
lightSource
private float
LumaBlue
private float
LumaGreen
private float
LumaRed
private ModelLUT
LUT
DOCUMENT ME!private int
LUTOffset
DOCUMENT ME!static int
LUTS
private boolean
lzwCompression
DOCUMENT ME!static int
MAGIC_NUMBER
private byte[]
make
static int
MAKE
private byte[]
makerNote
static int
MAX_IFD_LENGTH
DOCUMENT ME!static int
MAX_SAMPLE_VALUE
DOCUMENT ME!private float
maxAperture
private int
maxAvailableEntry
private short
maxCode
static int
META_DATA
static int
META_DATA_BYTE_COUNTS
Adobe Tiff Tagsprivate int[]
metaDataCounts
private short
meteringMode
static int
MIN_SAMPLE_VALUE
DOCUMENT ME!private byte[]
model
static int
MODEL
static int
MODEL_PIXEL_SCALE
static int
MODEL_TIEPOINT
private boolean
modHuffmanCompression
private short
nBits
private long
nBitsMask
private short
nDirEntries
DOCUMENT ME!private boolean
negInterchangeXY
static int
NEW_SUBFILE_TYPE
Tiff Tags.private boolean
newLZW
private int[]
next
private long
nextBits
private long
nextData
private int
nextFreeEntry
static int
ORIENTATION
DOCUMENT ME!static int
OVERLAY
private boolean
packBit
Pack Bit: true if the read data file has pack bit compression.static int
PAGE_NAME
static int
PAGE_NUMBER
private byte[]
pageName
static int
PHOTO_INTERP
DOCUMENT ME!static int
PHOTOSHOP
static int
PLANAR_CONFIG
DOCUMENT ME!private int
predictor
DOCUMENT ME!static int
PREDICTOR
DOCUMENT ME!private int
previousRecognizedCode
static int
RANGES
static int
REFERENCE_BLACK_WHITE
static int
RESOLUTION_UNIT
DOCUMENT ME!private long
restart
static int
ROI
private boolean
rotate180
private AlgorithmRotate
rotateAlgo
private boolean
rotateMinus90
private boolean
rotatePlus90
static int
ROWS_PER_STRIP
DOCUMENT ME!private int
rowsPerStrip
DOCUMENT ME!static int
SAMPLE_FORMAT
DOCUMENT ME!static int
SAMPLES_PER_PIXEL
DOCUMENT ME!private int
samplesPerPixel
DOCUMENT ME!private short
saturation
private short
sceneCaptureType
private int
sceneType
private short
sensingMethod
private boolean
SGILog24Compression
private boolean
SGILogCompression
private short
sharpness
private float
shutterSpeed
private double[]
sliceBufferDouble
DOCUMENT ME!private float[]
sliceBufferFloat
DOCUMENT ME!private byte[]
software
DOCUMENT ME!static int
SOFTWARE
DOCUMENT ME!static int
STONITS
Sample value to Nits, where Nits is the photometric unit for luminance, also written candelas/meter**2.private java.lang.String
str
DOCUMENT ME!static int
STRIP_BYTE_COUNTS
DOCUMENT ME!static int
STRIP_OFFSETS
DOCUMENT ME!static int
SUBFILE_TYPE
static int
SUBIFDS
private boolean
suppressProgressBar
static int
T4OPTIONS
static int
T6OPTIONS
private FileSVS.JPEGInputStream
tableStream
private short
threshholding
static int
THRESHHOLDING
private boolean
ThunderScanCompression
static int
TILE_BYTE_COUNTS
DOCUMENT ME!static int
TILE_LENGTH
DOCUMENT ME!static int
TILE_OFFSETS
DOCUMENT ME!static int
TILE_WIDTH
DOCUMENT ME!private int[]
tileByteCounts
DOCUMENT ME!private int
tileByteNumber
DOCUMENT ME!private int
tileLength
DOCUMENT ME!private int
tileMaxByteCount
DOCUMENT ME!private int
tileOffsetNumber
DOCUMENT ME!private long[]
tileOffsets
DOCUMENT ME!private int
tilesAcross
DOCUMENT ME!private int
tilesDown
DOCUMENT ME!private int
tilesPerImage
DOCUMENT ME!private int
tilesPerSlice
DOCUMENT ME!private long[]
tileTemp
DOCUMENT ME!private int
tileWidth
DOCUMENT ME!private double
tRes
DOCUMENT ME!static int
TRESOLUTION
DOCUMENT ME!private ViewUserInterface
UI
private byte[]
userComment
private byte[]
value
private VOIVector
VOIs
private short
whiteBalance
private int
xDim
DOCUMENT ME!static int
XMP
private float
xPosition
static int
XPOSITION
static int
XRESOLUTION
DOCUMENT ME!static int
YCBCR_COEFFICIENTS
static int
YCBCR_POSITIONING
static int
YCBCR_SUBSAMPLING
private int
YCbCrPositioning
private int
YCbCrSubsampleHoriz
private int
YCbCrSubsampleVert
private int
yDim
DOCUMENT ME!private float
yPosition
static int
YPOSITION
private int
YReferenceBlack
private int
YReferenceWhite
static int
YRESOLUTION
DOCUMENT ME!private boolean
zlibCompression
TIFF files.private java.util.zip.Inflater
zlibDecompresser
private double
zRes
DOCUMENT ME!static int
ZRESOLUTION
EchoTech 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 FileSVS(java.lang.String fileName, java.lang.String fileDir)
SVS reader/writer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
CIELABtoRGB(float[] buffer)
private int
copyin(byte[] imgdata, FileSVS.ModHuffmanInputStream is, int width, boolean invert)
private void
decodeROI(byte[] buffer)
private int
fax34Decompresser(byte[] dataOut, byte[] dataIn)
private void
fax34Init()
void
finalize()
Prepares this class for cleanup.private FileSVS.ModHuffmanInputStream
getDecoder(java.io.InputStream is)
FileInfoBase
getFileInfo()
Accessor that returns the file info.float[]
getImageBuffer()
Accessor that returns the image buffer.ModelLUT
getModelLUT()
Rreturns LUT if defined.private int
getSegment(float[] array, float[] seg, int index)
private int
jpegDecompresser(byte[] dataOut, byte[] dataIn, int rowsToDo)
private int
LogL16Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
private int
LogLuv24Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
private int
LogLuv32Decompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
private void
LZWDecompresser(byte[] inData, int bytesToRead, byte[] outData, int startingRow, int rowsToDo, int bytesToGeneratePerRow)
Method to decode LZW compressed data.private int
modHuffmanDecompresser(byte[] dataOut, byte[] dataIn)
private boolean
openIFD(FileInfoSVS fileInfo)
Reads and decodes IFDs (Image File Directory).private void
readBuffer(int slice, float[] buffer)
Reads a slice of data at a time and stores the results in the buffer.private void
readDoubleBuffer(int slice, double[] buffer)
Reads a slice of data at a time and stores the results in the buffer.ModelImage
readImage(boolean multiFile, boolean one)
Reads the Tiff header which indicates endianess, the TIFF magic number, and the offset in bytes of the first IFD.ModelImage
readLeicaSeries(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 int
readMH(byte[] imgdata, int off, java.io.InputStream is, int width)
private void
readTileBuffer(int slice, float[] buffer)
Reads a slice of data at a time and stores the results in the buffer.void
setFileDir(java.lang.String fDir)
Accessor to set the file dir (used when reading TIFF multiFile).void
setFileName(java.lang.String fName)
Accessor to set the file name (used when reading TIFF multiFile).void
setSuppressProgressBar(boolean suppressProgressBar)
void
setTIFFOrientation(boolean doTIFFOrientation)
private int
ThunderScanDecompresser(byte[] dataOut, byte[] dataIn, int bytesToRead, int rowsToDo)
private void
writeColorMap(int location)
Writes color map to the TIFF file.private void
writeHeader()
Writes TIFF starting file header.private void
writeIFD(int tag, FileSVS.Type type, int count, int value, int value2)
Writes one 12 byte IFD entry.private void
writeIFDs(ModelImage image, int imageOffset, int nextIFD, int index, int theStripCount, boolean writePackBit)
Writes one IFD (Image File Directory).void
writeImage(ModelImage image, ModelLUT LUT, FileWriteOptions options)
This method writes a tiff image file.private void
YCbCrtoRGB(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<FileSVS.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 FileInfoSVS 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
-
jpeg2000Compression
private boolean jpeg2000Compression
-
jpegTables
private byte[] jpegTables
-
tableStream
private FileSVS.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
-
-
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
.
-
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
-true
if a set of files each containing a separate 2D image is presentfalse
if one file with either a 2D image or a stack of 2D imagesone
-true
if 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.IOException
Method 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, FileSVS.ModHuffmanInputStream is, int width, boolean invert) throws java.io.IOException
- Throws:
java.io.IOException
-
getDecoder
private FileSVS.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(FileInfoSVS 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.IOException
Reads 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.IOException
Reads 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.IOException
Reads 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.IOException
Writes 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.IOException
Writes TIFF starting file header.- Throws:
java.io.IOException
- DOCUMENT ME!
-
writeIFD
private void writeIFD(int tag, FileSVS.Type type, int count, int value, int value2) throws java.io.IOException
Writes 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!
-
-