*/
public IIOMetadata getImageMetadata( int imageIndex, final String metadataFormat ) throws IOException {
IIOMetadata metadata;
synchronized (metadataMap) {
if (!metadataMap.containsKey(imageIndex)) {
metadata = new HDF4TeraScanImageMetadata(this, imageIndex);
metadataMap.put(imageIndex, metadata);
} else {
metadata = (UnidataImageMetadata) metadataMap.get(imageIndex);
if (metadata == null) {
metadata = new HDF4TeraScanImageMetadata(this, imageIndex);
metadataMap.put(imageIndex, metadata);
}
}
}
return metadata;