Where is the code? In RequestData()?<br><br>GetFieldData() != GetPointData() + GetCellData()<br><br>FieldData is a set of arrays associated with the whole data object and not necessarily with points or cells. This may be some meta-data like integral of pressure for example. Or anything else your heart desires :-)<br>
<br>-berk<br><br><div class="gmail_quote">On Sat, Feb 20, 2010 at 5:08 AM, Fred Fred <span dir="ltr">&lt;<a href="mailto:stan1313@hotmail.fr">stan1313@hotmail.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
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-&gt;GetInformationObject(0);<br>
  vtkDataSet *output = vtkDataSet::SafeDownCast(outInfo-&gt;Get(vtkDataObject::DATA_OBJECT()));<br><br>  // pass all associated data to output dataset<br>  output-&gt;CopyStructure(this-&gt;input);<br>  output-&gt;GetPointData()-&gt;PassData(this-&gt;input-&gt;GetPointData());<br>
  output-&gt;GetFieldData()-&gt;PassData(this-&gt;input-&gt;GetFieldData());<br><br>and another question: is GetFieldData() the same as GetPointData() + GetCellData() ?<br><br><hr>Date: Fri, 19 Feb 2010 06:38:50 -0500<br>
Subject: Re: [Paraview] Instanciating an unknown type<br>From: <a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a><br>To: <a href="mailto:stan1313@hotmail.fr" target="_blank">stan1313@hotmail.fr</a><br>
CC: <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><div><div></div><div class="h5"><br><br>vtkDataSet* output = input-&gt;NewInstance();<br><br>vtkDataSetAlgorithm::RequestDataObject() already does this though. You shouldn&#39;t need to. See that method for details.<br>
<br>-berk<br><br><div>On Fri, Feb 19, 2010 at 6:35 AM, Fred Fred <span dir="ltr">&lt;<a href="mailto:stan1313@hotmail.fr" target="_blank">stan1313@hotmail.fr</a>&gt;</span> wrote:<br>
<blockquote 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-&gt;IsA(&quot;vtkPolyData&quot;) 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/" target="_blank">Cliquez ici !</a></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>                                               <br></div></div><hr>Windows 7 : Trouvez le PC qui vous convient! <a href="http://clk.atdmt.com/FRM/go/181574577/direct/01/" target="_blank">Découvrez notre offre ! </a></div>
</blockquote></div><br>