<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: [Paraview] Trouble with DeepCopy()</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16981" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=921385716-08022010><FONT face=Arial color=#0000ff size=2>I have
done some tidying up on the filter since this morning and I found the source of
my problem was as you say, related to using the input object in another filter.
When I initially defined outputPoly I had actually named it just output and
called my vtkMultiBlockDataSet object outputMB. So, 'output' object was being
passed in vtkPlotEdges as input and, as you say, this was the issue. When I
changed it around (output = vtkMultiBlockDataSet object), everything worked
nicely and ShallowCopy and Delete work fine. </FONT></SPAN></DIV>
<DIV><SPAN class=921385716-08022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=921385716-08022010><FONT face=Arial color=#0000ff size=2>Silly
error to make, really, but thanks for explaining why this is an
issue.</FONT></SPAN></DIV>
<DIV><SPAN class=921385716-08022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=921385716-08022010><FONT face=Arial color=#0000ff
size=2>Adriano</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>===================================<BR><BR>Adriano Gagliardi
MEng PhD<BR>Project Scientist<BR>Computational Aerodynamics<BR>Aircraft Research
Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32 4644<BR>E-mail:
agagliardi@ara.co.uk<BR>Url: www.ara.co.uk </FONT></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Moreland, Kenneth
[mailto:kmorel@sandia.gov] <BR><B>Sent:</B> 08 February 2010 16:47<BR><B>To:</B>
agagliardi@ara.co.uk; ParaView<BR><B>Subject:</B> Re: [Paraview] Trouble with
DeepCopy()<BR></FONT><BR></DIV>
<DIV></DIV><FONT face="Calibri, Verdana, Helvetica, Arial"><SPAN
style="FONT-SIZE: 11pt">I’m not sure why you are getting the error that you are,
but I would recommend using a ShallowCopy instead of a DeepCopy.<BR><BR>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.<BR><BR>-Ken<BR><BR>On 2/8/10 4:43 AM, "Adriano Gagliardi" <<A
href="agagliardi@ara.co.uk">agagliardi@ara.co.uk</A>>
wrote:<BR><BR></SPAN></FONT>
<BLOCKQUOTE><FONT face="Calibri, Verdana, Helvetica, Arial"><SPAN
style="FONT-SIZE: 11pt">Ok, it appears the code I posted works if I don't call
pe->Delete(). I was<BR>hoping the DeepCopy would allow me to then free up
this memory. Maybe<BR>someone could clear this up for
me?<BR><BR><BR>===================================<BR><BR>Adriano Gagliardi
MEng PhD<BR>Project Scientist<BR>Computational Aerodynamics<BR>Aircraft
Research Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32
4644<BR>E-mail: <A
href="agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>Url:
www.ara.co.uk<BR>-----Original Message-----<BR>From: <A
href="paraview-bounces@paraview.org">paraview-bounces@paraview.org</A> [<A
href="mailto:paraview-bounces@paraview.org">mailto:paraview-bounces@paraview.org</A>]<BR>On
Behalf Of Adriano Gagliardi<BR>Sent: 08 February 2010 11:14<BR>To:
'ParaView'<BR>Subject: [Paraview] Trouble with DeepCopy()<BR><BR><BR>Dear
All,<BR><BR>I'm executing the filter vtkPlotEdges. I pass in a vtkPolyData
object and<BR>receive a vtkMultiBlockDataSet object as output. My output data
object is<BR>also of type vtkMultiBlockDataSet, so I'm trying to perform a
DeepCopy of<BR>the temp object, but I'm receiving a segmentation fault. Can
someone point<BR>out what I'm missing
here?<BR><BR>{<BR><BR>vtkMultiBlockDataSet *output =
vtkMultiBlockDataSet::SafeDownCast(<BR>outInfo->Get(vtkDataObject::DATA_OBJECT())
);<BR><BR>//polydata is a pointer to a populated vtkPolyData
object.<BR><BR>std::cout << "Executing vtkPlotEdges..." <<
std::endl;<BR>vtkPlotEdges* pe =
vtkPlotEdges::New();<BR>pe->SetInput(outputPoly);<BR>pe->Update();<BR><BR>output->DeepCopy(pe->GetOutput());<BR><BR>pe->Delete();<BR><BR>}<BR><BR><BR>Cheers,<BR><BR>Adriano<BR><BR>===================================<BR><BR>Adriano
Gagliardi MEng PhD<BR>Project Scientist<BR>Computational
Aerodynamics<BR>Aircraft Research Association Ltd.<BR>Manton
Lane<BR>Bedford<BR><BR>Tel: 01234 32 4644<BR>E-mail: <A
href="agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>Url:
www.ara.co.uk<BR><BR><BR>---------------------------<BR>This email contains
information that is private and confidential and is<BR>intended only for the
addressee. If you are not the intended recipient<BR>please delete it and
notify us immediately by e-mailing the sender.<BR>Note: All email sent to or
from this address may be accessed by someone<BR>other than the recipient, for
system management and security reasons.<BR>Aircraft Research Association Ltd.
Registered in England, Registration No<BR>503668 Registered Office:
Manton Lane, Bedford MK41 7PF England VAT No
GB<BR>196351245<BR><BR><BR>_______________________________________________<BR>Powered
by www.kitware.com<BR><BR>Visit other Kitware open-source projects at<BR><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:<BR><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><BR>---------------------------<BR>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.<BR>Note: All
email sent to or from this address may be accessed by someone other than the
recipient, for system management and security reasons.<BR>Aircraft Research
Association Ltd. Registered in England, Registration No 503668
Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
196351245<BR><BR><BR>_______________________________________________<BR>Powered
by www.kitware.com<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><BR></SPAN></FONT></BLOCKQUOTE><FONT
face="Calibri, Verdana, Helvetica, Arial"><SPAN
style="FONT-SIZE: 11pt"><BR></SPAN></FONT><FONT size=2><FONT
face="Consolas, Courier New, Courier"><SPAN
style="FONT-SIZE: 10pt"><BR> ****
Kenneth Moreland<BR> ***
Sandia National Laboratories<BR>***********
<BR>*** *** *** email: <A
href="kmorel@sandia.gov">kmorel@sandia.gov</A><BR>** *** **
phone: (505) 844-8919<BR> ***
web: <A
href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</A><BR></SPAN></FONT></FONT><FONT
face="Calibri, Verdana, Helvetica, Arial"><SPAN
style="FONT-SIZE: 11pt"><BR></SPAN></FONT>
<p><span style="font-family:'Arial';font-size:8pt;">---------------------------</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">This email contains information that is private and confidential and is intended only for the addressee. </span><span style="font-family:'Arial';font-size:8pt;">If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"></span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p></BODY></HTML>