ImageManager { public static MultiLevelModel getMultiLevelModel(RasterDataNode rasterDataNode) { if (rasterDataNode.isSourceImageSet()) { return rasterDataNode.getSourceImage().getModel(); } return createMultiLevelModel(rasterDataNode); } ImageManager(); static ImageManager getInstance(); synchronized void dispose(); static MultiLevelModel getMultiLevelModel(RasterDataNode rasterDataNode); static AffineTransform getImageToModelTransform(GeoCoding geoCoding); static CoordinateReferenceSystem getModelCrs(GeoCoding geoCoding); PlanarImage getSourceImage(RasterDataNode rasterDataNode, int level); PlanarImage getValidMaskImage(final RasterDataNode rasterDataNode, int level); PlanarImage getGeophysicalImage(RasterDataNode rasterDataNode, int level); static ImageLayout createSingleBandedImageLayout(RasterDataNode rasterDataNode); static ImageLayout createSingleBandedImageLayout(RasterDataNode rasterDataNode, int dataBufferType); static ImageLayout createSingleBandedImageLayout(int dataBufferType,
                                                            int width,
                                                            int height,
                                                            int tileWidth,
                                                            int tileHeight); static ImageLayout createSingleBandedImageLayout(int dataBufferType,
                                                            int sourceWidth,
                                                            int sourceHeight,
                                                            Dimension tileSize,
                                                            ResolutionLevel level); static ImageLayout createSingleBandedImageLayout(int dataBufferType,
                                                            Point sourcePos,
                                                            int sourceWidth,
                                                            int sourceHeight,
                                                            Dimension tileSize,
                                                            ResolutionLevel level); static int getDataBufferType(int productDataType); static int getProductDataType(int dataBufferType); static Dimension getPreferredTileSize(Product product); RenderedImage createColoredBandImage(RasterDataNode[] rasterDataNodes,
                                                ImageInfo imageInfo,
                                                int level); static MultiLevelModel createMultiLevelModel(ProductNode productNode); RenderedImage getMaskImage(final Product product, final String expression, int level); MultiLevelImage getMaskImage(final String expression, final Product product); void clearMaskImageCache(Product product); ImageInfo getImageInfo(RasterDataNode[] rasters); void prepareImageInfos(RasterDataNode[] rasterDataNodes, ProgressMonitor pm); int getStatisticsLevel(RasterDataNode raster, int levelCount); PlanarImage createColoredMaskImage(Product product, String expression, Color color, boolean invertMask,
                                              int level); static PlanarImage createColoredMaskImage(Color color, RenderedImage alphaImage, boolean invertAlpha); static PlanarImage createColoredMaskImage(RenderedImage maskImage, Color color, double opacity); static PlanarImage createColoredMaskImage(Color color, RenderedImage alphaImage, RenderingHints hints); static MultiLevelImage createMaskedGeophysicalImage(final RasterDataNode node, Number maskValue); static RenderedImage createFormatOp(RenderedImage image, int dataType); static Color[] createColorPalette(ImageInfo imageInfo); static Color computeColor(ImageInfo imageInfo, Double rasterValue); static final ImageCRS DEFAULT_IMAGE_CRS; }
@Test public void testGetMultiLevelModel() throws Exception { MultiLevelModel mlm1, mlm2; final Product p = new Product("P", "T", 10960, 10960); final Band b1 = p.addBand("B1", "0"); final Band b2 = p.addBand("B2", ProductData.TYPE_FLOAT32); mlm1 = ImageManager.getMultiLevelModel(b1); mlm2 = ImageManager.getMultiLevelModel(b2); assertEquals(0, p.getNumResolutionsMax()); assertEquals(7, mlm1.getLevelCount()); assertEquals(7, mlm2.getLevelCount()); p.setNumResolutionsMax(3); b1.getSourceImage(); mlm1 = ImageManager.getMultiLevelModel(b1); mlm2 = ImageManager.getMultiLevelModel(b2); assertEquals(3, p.getNumResolutionsMax()); assertEquals(3, mlm1.getLevelCount()); assertEquals(3, mlm2.getLevelCount()); }