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);