zoukankan      html  css  js  c++  java
  • ossim中改变图像处理的块大小

    ossim中默认图像处理的块大小是64*64,如果要修改为自定义大小,可以使用rspfImageSourceSequencer进行修改,具体方式如下:

    vector<ossim_uint32> outBandList;
    outBandList.push_back(1);
    ossimBandSelector* theBandSelector = new ossimBandSelector;
    theBandSelector->connectMyInputTo(0, handler);
    theBandSelector->setOutputBandList(outBandList);

    filter->connectMyInputTo(0,theBandSelector);

    ossimImageFileWriter* writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimString("tiff_strip"));
    writer->setFilename(strOutFile);
    writer->connectMyInputTo(filter);

    ossimImageSourceSequencer* theImageSourceSequencer = new ossimImageSourceSequencer;
    theImageSourceSequencer->setTileSize(ossimIpt(1024,1024));
    writer->changeSequencer(theImageSourceSequencer);

    ossimStdOutProgress progress(0, true);
    writer->addListener(&progress);

    //writer->setTileSize(ossimIpt(1024,1024));

    writer->execute();
    writer->removeListener(&progress);

  • 相关阅读:
    自动化运维-ansible
    Linux中安装wget命令
    Celery
    SQLAlchemy
    非关系型数据库--MongoDB
    Flask框架
    Redis
    公钥与私钥
    win10 文件扩展名的更改
    if 和 elif 的区别
  • 原文地址:https://www.cnblogs.com/loongfee/p/2795642.html
Copyright © 2011-2022 走看看