I'm not sure why you are getting the error that you are, but I would recommend 
using a ShallowCopy instead of a DeepCopy.

The problem may be when you set the input of pe to outputPoly.  I don't know 
where that object came from, but if it is part of either the input or output of 
your filter, you should not set it directly as the input to an internal filter. 
 Doing so will screw up the pipeline connections already established for your 
filter and then wreck havoc on the executive because it will not expect the 
pipeline connections to change while your filter is executing.  You should 
create a new object to use as the input and shallow copy the data into that new 
object.

-Ken

On 2/8/10 4:43 AM, "Adriano Gagliardi" <[email protected]> wrote:

Ok, it appears the code I posted works if I don't call pe->Delete(). I was
hoping the DeepCopy would allow me to then free up this memory. Maybe
someone could clear this up for me?


===================================

Adriano Gagliardi MEng PhD
Project Scientist
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: [email protected]
Url: www.ara.co.uk
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Adriano Gagliardi
Sent: 08 February 2010 11:14
To: 'ParaView'
Subject: [Paraview] Trouble with DeepCopy()


Dear All,

I'm executing the filter vtkPlotEdges. I pass in a vtkPolyData object and
receive a vtkMultiBlockDataSet object as output. My output data object is
also of type vtkMultiBlockDataSet, so I'm trying to perform a DeepCopy of
the temp object, but I'm receiving a segmentation fault. Can someone point
out what I'm missing here?

{

vtkMultiBlockDataSet *output = vtkMultiBlockDataSet::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()) );

//polydata is a pointer to a populated vtkPolyData object.

std::cout << "Executing vtkPlotEdges..." << std::endl;
vtkPlotEdges* pe = vtkPlotEdges::New();
pe->SetInput(outputPoly);
pe->Update();

output->DeepCopy(pe->GetOutput());

pe->Delete();

}


Cheers,

Adriano

===================================

Adriano Gagliardi MEng PhD
Project Scientist
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: [email protected]
Url: www.ara.co.uk


---------------------------
This email contains information that is private and confidential and is
intended only for the addressee.  If you are not the intended recipient
please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone
other than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No
503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
196351245


_______________________________________________
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


---------------------------
This email contains information that is private and confidential and is 
intended only for the addressee.  If you are not the intended recipient please 
delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other 
than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 
503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 
196351245


_______________________________________________
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




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: [email protected]
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

_______________________________________________
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

Reply via email to