it.geosolutions.imageio.plugins.hdf4
Class BaseHDF4ImageReader

Object
  extended by ImageReader
      extended by BaseImageReader
          extended by BaseHDF4ImageReader
Direct Known Subclasses:
HDF4APSImageReader, HDF4ImageReaderProxy, HDF4TeraScanImageReader

public abstract class BaseHDF4ImageReader
extends BaseImageReader


Nested Class Summary
protected  class BaseHDF4ImageReader.HDF4DatasetWrapper
           
 
Field Summary
protected static Logger LOGGER
           
protected  BaseNetCDFImageReader reader
           
 
Fields inherited from class ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
Constructor Summary
protected BaseHDF4ImageReader(ImageReaderSpi originatingProvider)
           
 
Method Summary
 void dispose()
           
protected  NetCDFUtilities.KeyValuePair getAttribute(int imageIndex, int attributeIndex)
           
protected  String getAttributeAsString(int imageIndex, String attributeName)
           
protected  String getAttributeAsString(int imageIndex, String attributeName, boolean isUnsigned)
           
protected abstract  BaseHDF4ImageReader.HDF4DatasetWrapper getDatasetWrapper(int imageIndex)
           
protected  NetCDFUtilities.KeyValuePair getGlobalAttribute(int attributeIndex)
           
 int getHeight(int imageIndex)
           
 IIOMetadata getImageMetadata(int imageIndex)
           
 IIOMetadata getImageMetadata(int imageIndex, String metadataFormat)
           
 Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
           
 IIOMetadata getStreamMetadata()
           
 int getTileHeight(int imageIndex)
           
 int getTileWidth(int imageIndex)
           
 int getWidth(int imageIndex)
           
protected  void initialize()
          Simple initialization method
protected abstract  void initializeProfile()
          Additional initialization for a specific HDF "Profile".
 BufferedImage read(int imageIndex, ImageReadParam param)
           
protected  BufferedImage read2DVariable(int imageIndex, ImageReadParam param)
           
 void setInput(Object input)
           
 void setInput(Object input, boolean seekForwardOnly)
           
 void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
           
 
Methods inherited from class BaseImageReader
checkImageIndex, getNumImages, setNumImages
 
Methods inherited from class ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setLocale
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected final BaseNetCDFImageReader reader

LOGGER

protected static final Logger LOGGER
Constructor Detail

BaseHDF4ImageReader

protected BaseHDF4ImageReader(ImageReaderSpi originatingProvider)
Method Detail

getDatasetWrapper

protected abstract BaseHDF4ImageReader.HDF4DatasetWrapper getDatasetWrapper(int imageIndex)

getImageTypes

public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
                                           throws IOException
Specified by:
getImageTypes in class ImageReader
Throws:
IOException

initializeProfile

protected abstract void initializeProfile()
                                   throws IOException
Additional initialization for a specific HDF "Profile". Depending on the HDF data producer, the originating file has a proper data/metadata structure. For this reason, a specific initialization should be implemented for each different HDF "Profile". As an instance, the Automated Processing System (APS) produces HDF files having a different structure with respect to the HDF structure of a file produced by TIROS Operational Vertical Sounder (TOVS).

Throws:
Exception
IOException

initialize

protected void initialize()
                   throws IOException
Simple initialization method

Throws:
IOException

dispose

public void dispose()
Overrides:
dispose in class BaseImageReader
See Also:
GDALImageReader.dispose()

setInput

public void setInput(Object input,
                     boolean seekForwardOnly,
                     boolean ignoreMetadata)
Overrides:
setInput in class ImageReader

getStreamMetadata

public IIOMetadata getStreamMetadata()
                              throws IOException
Specified by:
getStreamMetadata in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.getStreamMetadata()

getGlobalAttribute

protected NetCDFUtilities.KeyValuePair getGlobalAttribute(int attributeIndex)
                                                   throws IOException
Throws:
IOException
See Also:
it.geosolutions.imageio.plugins.hdf4.HDF4ImageReader#getGlobalAttribute(int)

getAttributeAsString

protected String getAttributeAsString(int imageIndex,
                                      String attributeName)
See Also:
it.geosolutions.imageio.plugins.hdf4.HDF4ImageReader#getAttributeAsString(int, java.lang.String)

getAttributeAsString

protected String getAttributeAsString(int imageIndex,
                                      String attributeName,
                                      boolean isUnsigned)
See Also:
it.geosolutions.imageio.plugins.hdf4.HDF4ImageReader#getAttributeAsString(int, java.lang.String, boolean)

getAttribute

protected NetCDFUtilities.KeyValuePair getAttribute(int imageIndex,
                                                    int attributeIndex)
                                             throws IOException
Throws:
IOException
See Also:
it.geosolutions.imageio.plugins.hdf4.HDF4ImageReader#getAttribute(int, int)

setInput

public void setInput(Object input,
                     boolean seekForwardOnly)
Overrides:
setInput in class ImageReader

setInput

public void setInput(Object input)
Overrides:
setInput in class ImageReader

getWidth

public int getWidth(int imageIndex)
             throws IOException
Specified by:
getWidth in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.getWidth(int)

getHeight

public int getHeight(int imageIndex)
              throws IOException
Specified by:
getHeight in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.getHeight(int)

getTileHeight

public int getTileHeight(int imageIndex)
                  throws IOException
Overrides:
getTileHeight in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.getTileHeight(int)

getTileWidth

public int getTileWidth(int imageIndex)
                 throws IOException
Overrides:
getTileWidth in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.getTileWidth(int)

read2DVariable

protected BufferedImage read2DVariable(int imageIndex,
                                       ImageReadParam param)
                                throws IOException
Throws:
IOException

read

public BufferedImage read(int imageIndex,
                          ImageReadParam param)
                   throws IOException
Specified by:
read in class ImageReader
Throws:
IOException
See Also:
GDALImageReader.read(int, javax.imageio.ImageReadParam)

getImageMetadata

public IIOMetadata getImageMetadata(int imageIndex)
                             throws IOException
Specified by:
getImageMetadata in class ImageReader
Throws:
IOException
See Also:
ImageReader.getImageMetadata(int)

getImageMetadata

public IIOMetadata getImageMetadata(int imageIndex,
                                    String metadataFormat)
                             throws IOException
Throws:
IOException


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.