[vtkusers] how to derive vtkPloyDataAlgorithm class
WangQ
wangq1979 at outlook.com
Sat Jan 2 17:30:09 EST 2016
Dear Norman,
Thanks for the explanation. Please allow me sometime to digest, and I will get back to here if anything get me confused.
Regards,
Chiang
> Date: Sat, 2 Jan 2016 05:11:23 -0700
> From: juch at zhaw.ch
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] how to derive vtkPloyDataAlgorithm class
>
> Hi Chiang
>
> Happy new year to you too.
>
> I'd go by example. Have a look at vtkClipPolyData.cxx, which derives from
> vtkPolyDataAlgorithm. In essence, only vtkPolyDataAlgorithm::RequestData()
> has to be overridden by the subclass, that's where all the functionality of
> an algorithm is supposed to go.
>
> The input and output data is contained in generic containers that are passed
> as function arguments.
>
>
> inputVector represents what you feed to the algorithm, typically by using
> vtkAlgorithm::SetInputConnection(), vtkAlgorithm::SetInputData(),
> vtkAlgorithm::GetOutputPort(), etc. You are supposed to access the data in
> the following way.
>
>
> You have the chance to notify the progress by calling
> vtkAlgorithm::UpdateProgress().
> You can check if the user requested the termination of an algorithm by
> checking the value of vtkAlgorithm::GetAbortExecute().
>
> Besides that, make sure to first carefully read through the documentation of
> vtkPolyDataAlgorithm
> <http://www.vtk.org/doc/nightly/html/classvtkPolyDataAlgorithm> and
> vtkAlgorithm <http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html> .
> The implementation of the vtkAlgorithm.cxx
> <https://github.com/Kitware/VTK/blob/master/Common/ExecutionModel/vtkAlgorithm.cxx>
> and vtkPolyDataAlgorithm.cxx
> <https://github.com/Kitware/VTK/blob/master/Common/ExecutionModel/vtkPolyDataAlgorithm.cxx>
> may also serve as reference.
>
> I hope this helped.
> Norman
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/how-to-derive-vtkPloyDataAlgorithm-class-tp5735719p5735730.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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160103/b59169b5/attachment.html>
More information about the vtkusers
mailing list