<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Yes, of course, it is in RequestData()<br><br><hr id="stopSpelling">Date: Sat, 20 Feb 2010 10:28:37 -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>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="ecxgmail_quote">On Sat, Feb 20, 2010 at 5:08 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>
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>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">berk.geveci@kitware.com</a><br>To: <a href="mailto:stan1313@hotmail.fr">stan1313@hotmail.fr</a><br>
CC: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><div><div></div><div class="h5"><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>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 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></div></div><hr>Windows 7 : Trouvez le PC qui vous convient! <a href="http://clk.atdmt.com/FRM/go/181574577/direct/01/">Découvrez notre offre ! </a></div>
</blockquote></div><br>                                            <br /><hr />Discute avec tes amis partout, grâce à Messenger sur ton mobile. <a href='http://www.messengersurvotremobile.com/' target='_new'>Cliquez ici !</a></body>
</html>