zoukankan      html  css  js  c++  java
  • 08

    VTK6 引入了许多不兼容的变。其中之一是删除vtkDataObject中所有有关管道的方法。其中之一就是SetWholeExtent()。SetWholeExtent()方法先前被用来管理结构话数据的所有可能的元数据片数,但是不能被正确的用来设置结构话数据的extent。

    例子1


    在output information中,我们可以简单的替换成WHOLE_EXTENT()设置。

    int vtkMyReader::RequestInformation(vtkInformation*, vtkInformationVector**, 
           vtkInformationVector* outInfoVec)
    {
       vtkImageData* image = this->GetOutput();
       int wext[6] = {0, 10, 0, 10, 0, 10};
       image->SetWholeExtent(wext);
       return 1;
    }

    替换成:

    int vtkMyReader::RequestInformation(vtkInformation*, vtkInformationVector**, 
           vtkInformationVector* outInfoVec)
    {
       vtkInformation* outInfo = outInfoVec->GetInformationObject(0);
       int wext[6] = {0, 10, 0, 10, 0, 10};
       outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wext, 6);
       return 1;
    }

    例子2


    下面这种,可以安全的移除。

    int wext[6] = {0, 10, 0, 10, 0, 10};
    image->SetExtent(wext);
    image->SetWholeExtent(wext);

     替换成:

    int wext[6] = {0, 10, 0, 10, 0, 10};
    image->SetExtent(wext);
  • 相关阅读:
    bzoj3996
    bzoj3157 3516
    bzoj1937
    bzoj1532
    bzoj3572
    bzoj1453
    bzoj3205
    bzoj2595
    关于高斯消元解决xor问题的总结
    linux查找和替换命令
  • 原文地址:https://www.cnblogs.com/ankier/p/3168743.html
Copyright © 2011-2022 走看看