当前位置: 首页>>代码示例>>Java>>正文


Java MultiLevelModel.getLevelCount方法代码示例

本文整理汇总了Java中com.bc.ceres.glevel.MultiLevelModel.getLevelCount方法的典型用法代码示例。如果您正苦于以下问题:Java MultiLevelModel.getLevelCount方法的具体用法?Java MultiLevelModel.getLevelCount怎么用?Java MultiLevelModel.getLevelCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bc.ceres.glevel.MultiLevelModel的用法示例。


在下文中一共展示了MultiLevelModel.getLevelCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DefaultReprojectionSettingsProvider

import com.bc.ceres.glevel.MultiLevelModel; //导入方法依赖的package包/类
DefaultReprojectionSettingsProvider(ImageGeometry imageGeometry) {
    Band firstBand = sourceProduct.getBandGroup().get(0);
    MultiLevelModel sourceModel = firstBand.getMultiLevelModel();
    MultiLevelModel targetModel = targetProduct.createMultiLevelModel();
    Reproject reprojection = new Reproject(targetModel.getLevelCount());
    defaultReprojectionSettings = new ReprojectionSettings(null, sourceModel, imageGeometry);
    defaultReprojectionSettings.setTargetModel(targetModel);
    defaultReprojectionSettings.setReprojection(reprojection);
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:10,代码来源:S2tbxReprojectionOp.java

示例2: adjustImageToModelTransform

import com.bc.ceres.glevel.MultiLevelModel; //导入方法依赖的package包/类
public static RenderedImage adjustImageToModelTransform(final MultiLevelImage image, MultiLevelModel model) {
    MultiLevelModel actualModel = model;
    if (model.getLevelCount() > image.getModel().getLevelCount()) {
        actualModel = new DefaultMultiLevelModel(image.getModel().getLevelCount(), model.getImageToModelTransform(0),
                                                 image.getWidth(), image.getHeight());
    }
    final AbstractMultiLevelSource source = new AbstractMultiLevelSource(actualModel) {
        @Override
        protected RenderedImage createImage(int level) {
            return image.getImage(level);
        }
    };
    return new DefaultMultiLevelImage(source);
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:15,代码来源:S2ResamplerUtils.java

示例3: reprojectSourceRaster

import com.bc.ceres.glevel.MultiLevelModel; //导入方法依赖的package包/类
private void reprojectSourceRaster(RasterDataNode sourceRaster) {
    final ReprojectionSettings reprojectionSettings = reprojectionSettingsProvider.getReprojectionSettings(sourceRaster);
    final int targetDataType;
    MultiLevelImage sourceImage;
    if (sourceRaster.isScalingApplied()) {
        targetDataType = sourceRaster.getGeophysicalDataType();
        sourceImage = sourceRaster.getGeophysicalImage();
    } else {
        targetDataType = sourceRaster.getDataType();
        sourceImage = sourceRaster.getSourceImage();
    }
    final Number targetNoDataValue = getTargetNoDataValue(sourceRaster, targetDataType);
    final Rectangle imageRect = reprojectionSettings.getImageGeometry().getImageRect();
    final Band targetBand = new Band(sourceRaster.getName(), targetDataType, (int) imageRect.getWidth(), (int) imageRect.getHeight());
    targetProduct.addBand(targetBand);
    targetBand.setLog10Scaled(sourceRaster.isLog10Scaled());
    targetBand.setNoDataValue(targetNoDataValue.doubleValue());
    targetBand.setNoDataValueUsed(targetBand.getRasterWidth() == targetProduct.getSceneRasterWidth() &&
            targetBand.getRasterHeight() == targetProduct.getSceneRasterHeight());
    targetBand.setDescription(sourceRaster.getDescription());
    targetBand.setUnit(sourceRaster.getUnit());
    GeoCoding bandGeoCoding = reprojectionSettings.getGeoCoding();
    if (bandGeoCoding != null) {
        targetBand.setGeoCoding(bandGeoCoding);
    }
    GeoCoding sourceGeoCoding = null;
    if (orthorectify && sourceRaster.canBeOrthorectified()) {
        sourceGeoCoding = createOrthorectifier(sourceRaster);
    } else {
        sourceGeoCoding = sourceRaster.getGeoCoding();
    }
    final String exp = sourceRaster.getValidMaskExpression();
    if (exp != null) {
        sourceImage = createNoDataReplacedImage(sourceRaster, targetNoDataValue);
    }

    final Interpolation resampling = getResampling(targetBand);
    MultiLevelModel targetModel = reprojectionSettings.getTargetModel();
    if (targetModel == null) {
        targetModel = targetBand.getMultiLevelModel();
        reprojectionSettings.setTargetModel(targetModel);
    }
    Reproject reprojection = reprojectionSettings.getReprojection();
    if (reprojection == null) {
        reprojection = new Reproject(targetModel.getLevelCount());
        reprojectionSettings.setReprojection(reprojection);
    }
    MultiLevelImage projectedImage = createProjectedImage(sourceGeoCoding, sourceImage, reprojectionSettings.getSourceModel(),
            targetBand, resampling, targetModel, reprojection);
    if (mustReplaceNaN(sourceRaster, targetDataType, targetNoDataValue.doubleValue())) {
        projectedImage = createNaNReplacedImage(projectedImage, targetModel, targetNoDataValue.doubleValue());
    }
    if (targetBand.isLog10Scaled()) {
        projectedImage = createLog10ScaledImage(projectedImage);
    }
    targetBand.setSourceImage(projectedImage);

    /*
    * Flag and index codings
    */
    if (sourceRaster instanceof Band) {
        final Band sourceBand = (Band) sourceRaster;
        ProductUtils.copySpectralBandProperties(sourceBand, targetBand);
        final FlagCoding sourceFlagCoding = sourceBand.getFlagCoding();
        final IndexCoding sourceIndexCoding = sourceBand.getIndexCoding();
        if (sourceFlagCoding != null) {
            final String flagCodingName = sourceFlagCoding.getName();
            final FlagCoding destFlagCoding = targetProduct.getFlagCodingGroup().get(flagCodingName);
            targetBand.setSampleCoding(destFlagCoding);
        } else if (sourceIndexCoding != null) {
            final String indexCodingName = sourceIndexCoding.getName();
            final IndexCoding destIndexCoding = targetProduct.getIndexCodingGroup().get(indexCodingName);
            targetBand.setSampleCoding(destIndexCoding);
        }
    }
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:77,代码来源:S2tbxReprojectionOp.java

示例4: getSourceLevel

import com.bc.ceres.glevel.MultiLevelModel; //导入方法依赖的package包/类
private int getSourceLevel(MultiLevelModel sourceModel, int targetLevel) {
    int maxSourceLevel = sourceModel.getLevelCount() - 1;
    return maxSourceLevel < targetLevel ? maxSourceLevel : targetLevel;
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:5,代码来源:S2tbxReprojectionOp.java

示例5: getLevel

import com.bc.ceres.glevel.MultiLevelModel; //导入方法依赖的package包/类
private int getLevel(MultiLevelModel multiLevelModel) {
    if (rasterLevel < multiLevelModel.getLevelCount()) {
        return rasterLevel;
    }
    return ImageLayer.getLevel(multiLevelModel, currentView.getViewport());
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:7,代码来源:SpectrumTopComponent.java


注:本文中的com.bc.ceres.glevel.MultiLevelModel.getLevelCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。