<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Right, vtkDataSetAlgorithm::RequestDataObject() seems to do the job but now I have another problem: the point data are no longer copied to the output.<br>Here is my code, what is wrong?<br><br> // get the output<br> vtkInformation *outInfo = outputVector->GetInformationObject(0);<br> vtkDataSet *output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));<br><br> // pass all associated data to output dataset<br> output->CopyStructure(this->input);<br> output->GetPointData()->PassData(this->input->GetPointData());<br> output->GetFieldData()->PassData(this->input->GetFieldData());<br><br>and another question: is GetFieldData() the same as GetPointData() + GetCellData() ?<br><br><hr id="stopSpelling">Date: Fri, 19 Feb 2010 06:38:50 -0500<br>Subject: Re: [Paraview] Instanciating an unknown type<br>From: berk.geveci@kitware.com<br>To: stan1313@hotmail.fr<br>CC: paraview@paraview.org<br><br>vtkDataSet* output = input->NewInstance();<br><br>vtkDataSetAlgorithm::RequestDataObject() already does this though. You shouldn't need to. See that method for details.<br><br>-berk<br><br><div class="ecxgmail_quote">On Fri, Feb 19, 2010 at 6:35 AM, Fred Fred <span dir="ltr"><<a href="mailto:stan1313@hotmail.fr">stan1313@hotmail.fr</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="padding-left: 1ex;">
<div>
My problem is as follow: I am writing a vtkDataSetAlgorithm filter and I need to create the ouput dataset, which must be of the same type as the input.<br>Is there a one-line way to do it, ie avoiding if (input->IsA("vtkPolyData") output=vtkPolyData::New(); else if ... ?<br>
<br>                                            <br><hr>Avec Internet Explorer, surfez en toute discrétion sur internet <a href="http://clk.atdmt.com/FRM/go/182932252/direct/01/">Cliquez ici !</a></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>                                            <br /><hr />Windows 7 : Trouvez le PC qui vous convient! <a href='http://clk.atdmt.com/FRM/go/181574577/direct/01/' target='_new'>Découvrez notre offre ! </a></body>
</html>