Example #1
0
  public static <T extends ImageBase> CreateSyntheticOverheadView<T> createOverhead(
      ImageDataType<T> imageType) {

    Class classType = imageType.getDataType().getImageClass();

    switch (imageType.getFamily()) {
      case SINGLE_BAND:
        {
          InterpolatePixel interp = FactoryInterpolation.bilinearPixel(classType);
          return new CreateSyntheticOverheadViewS(interp);
        }

      case MULTI_SPECTRAL:
        return new CreateSyntheticOverheadViewMS(
            TypeInterpolate.BILINEAR, imageType.getNumBands(), classType);

      default:
        throw new IllegalArgumentException(imageType.getFamily() + " is not supported");
    }
  }