[vtkusers] question about vtkAlgorithm::Update()

dizou di_zou at yahoo.com
Fri Jan 22 12:47:35 EST 2010


Ok thanks, the Update() in vtkStreamingDemandDrivenPipeline is being called.

Francois Bertel wrote:
> 
> Hello,
> 
> vtkExecutive is an abstract class, Update() is overridden in concrete
> subclasses. See the class hierarchy here:
> http://www.vtk.org/doc/nightly/html/classvtkExecutive.html
> 
> On Fri, Jan 22, 2010 at 9:24 AM, dizou <di_zou at yahoo.com> wrote:
>>
>> vtkAlgorithm::Update() executes the following code:
>>
>> this->GetExecutive()->Update();
>>
>> So I looked at vtkExecutive::Update(). This is the code for
>> vtkExecutive::Update():
>>
>>  if (this->Algorithm->GetNumberOfOutputPorts())
>>    {
>>    return this->Update(0);
>>    }
>>  return this->Update(-1);
>>
>> So vtkExecutive::Update(int) is:
>>
>> int vtkExecutive::Update(int)
>> {
>>  vtkErrorMacro("This class does not implement Update.");
>>  return 0;
>> }
>>
>> So does this mean that vtkAlgorithm::Update() will always have a return
>> value of 0? So what exactly does vtkAlgorithm::Update() end up doing?
>>
>> this->Algorithm->GetNumberOfOutputPorts() returns 1
>>
>> This is the code I have:
>>
>> Geo = vtkGeometryFilter()
>> Geo.SetInput(XReader.GetOutputDataObject(0))
>> Normals = vtkPolyDataNormals()
>> Normals.SetInput(Geo.GetOutput())
>> Normals.Update()
>>
>> I get this error message when I get to Normals.Update():
>> The instruction at "***" referenced memory at "***". The memory could not
>> be
>> "read"
>>
>> XReader.GetOutputDataObject(0) and Geo.GetOutput() all produce valid
>> output.
>> --
>> View this message in context:
>> http://old.nabble.com/question-about-vtkAlgorithm%3A%3AUpdate%28%29-tp27263416p27263416.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> 
> 
> 
> -- 
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                       | Clifton Park NY 12065, USA
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 

-- 
View this message in context: http://old.nabble.com/question-about-vtkAlgorithm%3A%3AUpdate%28%29-tp27263416p27277344.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list