<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear Norman,<div><br></div><div>Thanks for the explanation. Please allow me sometime to digest, and I will get back to here if anything get me confused.</div><div><br></div><div>Regards,</div><div><br></div><div>Chiang<br><br><div>> Date: Sat, 2 Jan 2016 05:11:23 -0700<br>> From: juch@zhaw.ch<br>> To: vtkusers@vtk.org<br>> Subject: Re: [vtkusers] how to derive vtkPloyDataAlgorithm class<br>> <br>> Hi Chiang<br>> <br>> Happy new year to you too.<br>> <br>> I'd go by example. Have a look at vtkClipPolyData.cxx, which derives from<br>> vtkPolyDataAlgorithm. In essence, only vtkPolyDataAlgorithm::RequestData()<br>> has to be overridden by the subclass, that's where all the functionality of<br>> an algorithm is supposed to go. <br>> <br>> The input and output data is contained in generic containers that are passed<br>> as function arguments.<br>> <br>> <br>> inputVector represents what you feed to the algorithm, typically by using<br>> vtkAlgorithm::SetInputConnection(), vtkAlgorithm::SetInputData(),<br>> vtkAlgorithm::GetOutputPort(), etc. You are supposed to access the data in<br>> the following way.<br>> <br>> <br>> You have the chance to notify the progress by calling<br>> vtkAlgorithm::UpdateProgress().<br>> You can check if the user requested the termination of an algorithm by<br>> checking the value of vtkAlgorithm::GetAbortExecute().<br>> <br>> Besides that, make sure to first carefully read through the documentation of <br>> vtkPolyDataAlgorithm<br>> <http://www.vtk.org/doc/nightly/html/classvtkPolyDataAlgorithm> and <br>> vtkAlgorithm <http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html> .<br>> The implementation of the vtkAlgorithm.cxx<br>> <https://github.com/Kitware/VTK/blob/master/Common/ExecutionModel/vtkAlgorithm.cxx> <br>> and vtkPolyDataAlgorithm.cxx<br>> <https://github.com/Kitware/VTK/blob/master/Common/ExecutionModel/vtkPolyDataAlgorithm.cxx> <br>> may also serve as reference.<br>> <br>> I hope this helped.<br>> Norman<br>> <br>> <br>> <br>> --<br>> View this message in context: http://vtk.1045678.n5.nabble.com/how-to-derive-vtkPloyDataAlgorithm-class-tp5735719p5735730.html<br>> Sent from the VTK - Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>> <br>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> <br>> Search the list archives at: http://markmail.org/search/?q=vtkusers<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> http://public.kitware.com/mailman/listinfo/vtkusers<br></div></div> </div></body>
</html>