Yes, of course, it is in RequestData()
Date: Sat, 20 Feb 2010 10:28:37 -0500
Subject: Re: [Paraview] Instanciating an unknown type
From: [email protected]
To: [email protected]
CC: [email protected]
Where is the code? In RequestData()?
GetFieldData() != GetPointData() + GetCellData()
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 :-)
-berk
On Sat, Feb 20, 2010 at 5:08 AM, Fred Fred <[email protected]> wrote:
Right, vtkDataSetAlgorithm::RequestDataObject() seems to do the job but now I
have another problem: the point data are no longer copied to the output.
Here is my code, what is wrong?
// get the output
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkDataSet *output =
vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
// pass all associated data to output dataset
output->CopyStructure(this->input);
output->GetPointData()->PassData(this->input->GetPointData());
output->GetFieldData()->PassData(this->input->GetFieldData());
and another question: is GetFieldData() the same as GetPointData() +
GetCellData() ?
Date: Fri, 19 Feb 2010 06:38:50 -0500
Subject: Re: [Paraview] Instanciating an unknown type
From: [email protected]
To: [email protected]
CC: [email protected]
vtkDataSet* output = input->NewInstance();
vtkDataSetAlgorithm::RequestDataObject() already does this though. You
shouldn't need to. See that method for details.
-berk
On Fri, Feb 19, 2010 at 6:35 AM, Fred Fred <[email protected]> wrote:
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.
Is there a one-line way to do it, ie avoiding if (input->IsA("vtkPolyData")
output=vtkPolyData::New(); else if ... ?
Avec Internet Explorer, surfez en toute discrétion sur internet Cliquez ici !
_______________________________________________
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 ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
Windows 7 : Trouvez le PC qui vous convient! Découvrez notre offre !
_________________________________________________________________
Discutez en direct avec vos amis sur Messenger !
http://www.windowslive.fr/messenger_______________________________________________
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 ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview