GreyscaleImagePreparer (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.dataAccess.mapTile
Class GreyscaleImagePreparer

    java.lang.Object
      com.bbn.openmap.dataAccess.mapTile.GreyscaleImagePreparer

All Implemented Interfaces:
  TileImagePreparer

    public class GreyscaleImagePreparer

extends java.lang.Object
implements TileImagePreparer

Creates Grey-scale map tile images.

Author:
  dietrick

Constructor Summary
`GreyscaleImagePreparer()`

Method Summary
`void` | `prepareForEmptyTile(MapTileFactory factory)` Overriding the method that creates empty tiles for places with no coverage.
`java.awt.image.BufferedImage` | `preprocessImage(java.awt.Image origImage, int imageWidth, int imageHeight)` Method called to manipulate provided image in some way, returning modified image.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GreyscaleImagePreparer

    public GreyscaleImagePreparer()

Method Detail

### prepareForEmptyTile

    public void prepareForEmptyTile(MapTileFactory factory)

  Overriding the method that creates empty tiles for places with no coverage. We need to set the no-coverage attributes for the EmptyTileHandler (if it's a SimpleEmptyTileHandler) to null, so it doesn't create empty tiles when it's beyond the coverage zoom level limit. Those tiles are normally returned as clear, but in the conversion to greyscale they turn black.

  Specified by:
    `prepareForEmptyTile` in interface `TileImagePreparer`
  Parameters:
    `factory` - callback object to find EmptyTileHandler.

### preprocessImage

    public java.awt.image.BufferedImage preprocessImage(java.awt.Image origImage,
                                                        int imageWidth,
                                                        int imageHeight)
                                                 throws java.lang.InterruptedException

  Description copied from interface: `TileImagePreparer`
  Method called to manipulate provided image in some way, returning modified image.

  Specified by:
    `preprocessImage` in interface `TileImagePreparer`
  Parameters:
    `origImage` - Any java Image
    `imageWidth` - pixel width
    `imageHeight` - pixel height
  Returns:
    BufferedImage with any changes necessary.
  Throws:
    `java.lang.InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details