public class FileDirectory extends Object
| Constructor and Description |
|---|
FileDirectory()
Constructor, for writing TIFF files
|
FileDirectory(Rasters rasters)
Constructor, for writing TIFF files
|
FileDirectory(SortedSet<FileDirectoryEntry> entries,
ByteReader reader)
Constructor, for reading TIFF files
|
FileDirectory(SortedSet<FileDirectoryEntry> entries,
ByteReader reader,
boolean cacheData)
Constructor, for reading TIFF files
|
FileDirectory(SortedSet<FileDirectoryEntry> entries,
Rasters rasters)
Constructor, for writing TIFF files
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(FileDirectoryEntry entry)
Add an entry
|
FileDirectoryEntry |
get(FieldTagType fieldTagType)
Get a file directory entry from the field tag type
|
List<Integer> |
getBitsPerSample()
Get the bits per sample
|
List<Integer> |
getColorMap()
Get the color map
|
Integer |
getCompression()
Get the compression
|
CompressionDecoder |
getDecoder()
Get the compression decoder
|
Set<FileDirectoryEntry> |
getEntries()
Get the file directory entries
|
Map<FieldTagType,FileDirectoryEntry> |
getFieldTagTypeMapping()
Get the field tag type to file directory entry mapping
|
FieldType |
getFieldTypeForSample(int sampleIndex)
Get the field type for the sample
|
Number |
getImageHeight()
Get the image height
|
Number |
getImageWidth()
Get the image width
|
Integer |
getMaxBitsPerSample()
Get the max bits per sample
|
Integer |
getMaxSampleFormat()
Get the max sample format
|
Integer |
getPhotometricInterpretation()
Get the photometric interpretation
|
Integer |
getPlanarConfiguration()
Get the planar configuration
|
ByteReader |
getReader()
Get the byte reader
|
Integer |
getResolutionUnit()
Get the resolution unit
|
Number |
getRowsPerStrip()
Get the rows per strip
|
List<Integer> |
getSampleFormat()
Get the sample format
|
Integer |
getSamplesPerPixel()
Get the samples per pixel
|
List<Number> |
getStripByteCounts()
Get the strip byte counts
|
List<Number> |
getStripOffsets()
Get the strip offsets
|
List<Number> |
getTileByteCounts()
Get the tile byte counts
|
Number |
getTileHeight()
Get the tile height
|
List<Long> |
getTileOffsets()
Get the tile offsets
|
Number |
getTileWidth()
Get the tile width
|
Rasters |
getWriteRasters()
Get the rasters for writing a TIFF file
|
List<Long> |
getXResolution()
Get the x resolution
|
List<Long> |
getYResolution()
Get the y resolution
|
boolean |
isTiled()
Is this a tiled image
|
int |
numEntries()
Get the number of entries
|
Rasters |
readInterleavedRasters()
Read the rasters as interleaved
|
Rasters |
readInterleavedRasters(ImageWindow window)
Read the rasters as interleaved
|
Rasters |
readInterleavedRasters(ImageWindow window,
int[] samples)
Read the rasters as interleaved
|
Rasters |
readInterleavedRasters(int[] samples)
Read the rasters as interleaved
|
Rasters |
readRasters()
Read the rasters
|
Rasters |
readRasters(boolean sampleValues,
boolean interleaveValues)
Read the rasters
|
Rasters |
readRasters(ImageWindow window)
Read the rasters
|
Rasters |
readRasters(ImageWindow window,
boolean sampleValues,
boolean interleaveValues)
Read the rasters
|
Rasters |
readRasters(ImageWindow window,
int[] samples)
Read the rasters
|
Rasters |
readRasters(ImageWindow window,
int[] samples,
boolean sampleValues,
boolean interleaveValues)
Read the rasters
|
Rasters |
readRasters(int[] samples)
Read the rasters
|
Rasters |
readRasters(int[] samples,
boolean sampleValues,
boolean interleaveValues)
Read the rasters
|
void |
setBitsPerSample(int bitsPerSample)
Set a single value bits per sample
|
void |
setBitsPerSample(List<Integer> bitsPerSample)
Set the bits per sample
|
void |
setCache(boolean cacheData)
Set whether to cache tiles.
|
void |
setColorMap(int colorMap)
Set a single value color map
|
void |
setColorMap(List<Integer> colorMap)
Set the color map
|
void |
setCompression(int compression)
Set the compression
|
void |
setImageHeight(int height)
Set the image height
|
void |
setImageHeightAsLong(long height)
Set the image height
|
void |
setImageWidth(int width)
Set the image width
|
void |
setImageWidthAsLong(long width)
Set the image width
|
void |
setPhotometricInterpretation(int photometricInterpretation)
Set the photometric interpretation
|
void |
setPlanarConfiguration(int planarConfiguration)
Set the planar configuration
|
void |
setResolutionUnit(int resolutionUnit)
Set the resolution unit
|
void |
setRowsPerStrip(int rowsPerStrip)
Set the rows per strip
|
void |
setRowsPerStripAsLong(long rowsPerStrip)
Set the rows per strip
|
void |
setSampleFormat(int sampleFormat)
Set a single value sample format
|
void |
setSampleFormat(List<Integer> sampleFormat)
Set the sample format
|
void |
setSamplesPerPixel(int samplesPerPixel)
Set the samples per pixel
|
void |
setStripByteCounts(int stripByteCount)
Set a single value strip byte count
|
void |
setStripByteCounts(List<Integer> stripByteCounts)
Set the strip byte counts
|
void |
setStripByteCounts(long stripByteCount)
Set a single value strip byte count
|
void |
setStripByteCountsAsLongs(List<Long> stripByteCounts)
Set the strip byte counts
|
void |
setStripOffsets(int stripOffset)
Set a single value strip offset
|
void |
setStripOffsets(List<Integer> stripOffsets)
Set the strip offsets
|
void |
setStripOffsets(long stripOffset)
Set a single value strip offset
|
void |
setStripOffsetsAsLongs(List<Long> stripOffsets)
Set the strip offsets
|
void |
setTileByteCounts(int tileByteCount)
Set a single value tile byte count
|
void |
setTileByteCounts(List<Integer> tileByteCounts)
Set the tile byte counts
|
void |
setTileByteCounts(long tileByteCount)
Set a single value tile byte count
|
void |
setTileByteCountsAsLongs(List<Long> tileByteCounts)
Set the tile byte counts
|
void |
setTileHeight(int tileHeight)
Set the tile height
|
void |
setTileHeightAsLong(long tileHeight)
Set the tile height
|
void |
setTileOffsets(List<Long> tileOffsets)
Set the tile offsets
|
void |
setTileOffsets(long tileOffset)
Set a single value tile offset
|
void |
setTileWidth(int tileWidth)
Set the tile width
|
void |
setTileWidthAsLong(long tileWidth)
Set the tile width
|
void |
setWriteRasters(Rasters rasters)
Set the rasters for writing a TIFF file
|
void |
setXResolution(List<Long> xResolution)
Set the x resolution
|
void |
setXResolution(long xResolution)
Set a single value x resolution
|
void |
setYResolution(List<Long> yResolution)
Set the y resolution
|
void |
setYResolution(long yResolution)
Set a single value y resolution
|
long |
size()
Size in bytes of the Image File Directory (all contiguous)
|
long |
sizeWithValues()
Size in bytes of the image file directory including entry values (not
contiguous bytes)
|
public FileDirectory(SortedSet<FileDirectoryEntry> entries, ByteReader reader)
entries - file directory entriesreader - TIFF file byte readerpublic FileDirectory(SortedSet<FileDirectoryEntry> entries, ByteReader reader, boolean cacheData)
entries - file directory entriesreader - TIFF file byte readercacheData - true to cache tiles and stripspublic FileDirectory()
public FileDirectory(Rasters rasters)
rasters - image rasters to writepublic FileDirectory(SortedSet<FileDirectoryEntry> entries, Rasters rasters)
entries - file directory entriesrasters - image rasters to writepublic void addEntry(FileDirectoryEntry entry)
entry - file directory entrypublic void setCache(boolean cacheData)
cacheData - true to cache tiles and stripspublic ByteReader getReader()
public boolean isTiled()
public CompressionDecoder getDecoder()
public int numEntries()
public FileDirectoryEntry get(FieldTagType fieldTagType)
fieldTagType - field tag typepublic Set<FileDirectoryEntry> getEntries()
public Map<FieldTagType,FileDirectoryEntry> getFieldTagTypeMapping()
public Number getImageWidth()
public void setImageWidth(int width)
width - image widthpublic void setImageWidthAsLong(long width)
width - image widthpublic Number getImageHeight()
public void setImageHeight(int height)
height - image heightpublic void setImageHeightAsLong(long height)
height - image heightpublic List<Integer> getBitsPerSample()
public void setBitsPerSample(List<Integer> bitsPerSample)
bitsPerSample - bits per samplepublic void setBitsPerSample(int bitsPerSample)
bitsPerSample - bits per samplepublic Integer getMaxBitsPerSample()
public Integer getCompression()
public void setCompression(int compression)
compression - compressionpublic Integer getPhotometricInterpretation()
public void setPhotometricInterpretation(int photometricInterpretation)
photometricInterpretation - photometric interpretationpublic void setStripOffsets(List<Integer> stripOffsets)
stripOffsets - strip offsetspublic void setStripOffsetsAsLongs(List<Long> stripOffsets)
stripOffsets - strip offsetspublic void setStripOffsets(int stripOffset)
stripOffset - strip offsetpublic void setStripOffsets(long stripOffset)
stripOffset - strip offsetpublic Integer getSamplesPerPixel()
public void setSamplesPerPixel(int samplesPerPixel)
samplesPerPixel - samples per pixelpublic Number getRowsPerStrip()
public void setRowsPerStrip(int rowsPerStrip)
rowsPerStrip - rows per strippublic void setRowsPerStripAsLong(long rowsPerStrip)
rowsPerStrip - rows per strippublic List<Number> getStripByteCounts()
public void setStripByteCounts(List<Integer> stripByteCounts)
stripByteCounts - strip byte countspublic void setStripByteCountsAsLongs(List<Long> stripByteCounts)
stripByteCounts - strip byte countspublic void setStripByteCounts(int stripByteCount)
stripByteCount - strip byte countpublic void setStripByteCounts(long stripByteCount)
stripByteCount - strip byte countpublic void setXResolution(List<Long> xResolution)
xResolution - x resolutionpublic void setXResolution(long xResolution)
xResolution - x resolutionpublic void setYResolution(List<Long> yResolution)
yResolution - y resolutionpublic void setYResolution(long yResolution)
yResolution - y resolutionpublic Integer getPlanarConfiguration()
public void setPlanarConfiguration(int planarConfiguration)
planarConfiguration - planar configurationpublic Integer getResolutionUnit()
public void setResolutionUnit(int resolutionUnit)
resolutionUnit - resolution unitpublic void setColorMap(List<Integer> colorMap)
colorMap - color mappublic void setColorMap(int colorMap)
colorMap - color mappublic Number getTileWidth()
public void setTileWidth(int tileWidth)
tileWidth - tile widthpublic void setTileWidthAsLong(long tileWidth)
tileWidth - tile widthpublic Number getTileHeight()
public void setTileHeight(int tileHeight)
tileHeight - tile heightpublic void setTileHeightAsLong(long tileHeight)
tileHeight - tile heightpublic void setTileOffsets(List<Long> tileOffsets)
tileOffsets - tile offsetspublic void setTileOffsets(long tileOffset)
tileOffset - tile offsetpublic List<Number> getTileByteCounts()
public void setTileByteCounts(List<Integer> tileByteCounts)
tileByteCounts - tile byte countspublic void setTileByteCountsAsLongs(List<Long> tileByteCounts)
tileByteCounts - tile byte countspublic void setTileByteCounts(int tileByteCount)
tileByteCount - tile byte countpublic void setTileByteCounts(long tileByteCount)
tileByteCount - tile byte countpublic void setSampleFormat(List<Integer> sampleFormat)
sampleFormat - sample formatpublic void setSampleFormat(int sampleFormat)
sampleFormat - sample formatpublic Integer getMaxSampleFormat()
public Rasters getWriteRasters()
public void setWriteRasters(Rasters rasters)
rasters - image rasterspublic Rasters readRasters()
public Rasters readInterleavedRasters()
public Rasters readRasters(ImageWindow window)
window - image windowpublic Rasters readInterleavedRasters(ImageWindow window)
window - image windowpublic Rasters readRasters(int[] samples)
samples - pixel samples to readpublic Rasters readInterleavedRasters(int[] samples)
samples - pixel samples to readpublic Rasters readRasters(ImageWindow window, int[] samples)
window - image windowsamples - pixel samples to readpublic Rasters readInterleavedRasters(ImageWindow window, int[] samples)
window - image windowsamples - pixel samples to readpublic Rasters readRasters(boolean sampleValues, boolean interleaveValues)
sampleValues - true to read results per sampleinterleaveValues - true to read results as interleavedpublic Rasters readRasters(ImageWindow window, boolean sampleValues, boolean interleaveValues)
window - image windowsampleValues - true to read results per sampleinterleaveValues - true to read results as interleavedpublic Rasters readRasters(int[] samples, boolean sampleValues, boolean interleaveValues)
samples - pixel samples to readsampleValues - true to read results per sampleinterleaveValues - true to read results as interleavedpublic Rasters readRasters(ImageWindow window, int[] samples, boolean sampleValues, boolean interleaveValues)
window - image windowsamples - pixel samples to readsampleValues - true to read results per sampleinterleaveValues - true to read results as interleavedpublic FieldType getFieldTypeForSample(int sampleIndex)
sampleIndex - sample indexpublic long size()
public long sizeWithValues()
Copyright © 2016 National Geospatial-Intelligence Agency. All rights reserved.