04 - 替换vtkDataObject中的GetPipelineInformation 和GetExecutive 方法 VTK 6.0 迁移

VTK6 引入了许多不兼容的变。其中之一是删除vtkDataObject中所有有关管道的方法。其中的两个方法就是GetPipelineInformation() 和 GetExecutive()。这些方法被移到vtkAlgorithm 和vtkExecutive类中。

例子1

 


vtkDataObject* dobj = algorithm->GetOutput();
vtkExecutive* exec = dobj->GetExecutive();

替换成:

vtkExecutive* exec = algorithm->GetExecutive();

例子2

vtkDataObject* dobj = algorithm->GetOutput();
vtkInformation* info = dobj->GetPipelineInformation();

替换成:

algorithm->GetExecutive()->GetOutputInformation(0 /* port number */);

 

 


 

posted on 2013-07-02 20:49  |残阳|露  阅读(425)  评论(0编辑  收藏  举报

导航