<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Texte brut Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextebrutCar
        {mso-style-name:"Texte brut Car";
        mso-style-priority:99;
        mso-style-link:"Texte brut";
        font-family:Consolas;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=FR link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Thank you for your answers, both methods
work fine.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I am also adding new variables to the
output, so if I understood Dennis' answer correctly, I should be using
DeepCopy() ? However, using PassData(), it seems to me the new variable is only
added to the output. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal>Jean-Michel<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>From: Dennis Conklin
<dennis_conklin@goodyear.com><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>To: Berk Geveci <berk.geveci@kitware.com><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Cc: "Paraview \(paraview@paraview.org\)"
<paraview@paraview.org><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Subject: Re: [Paraview] [EXT] Re: Customize
programmable filters: copy<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>                arrays<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Message-ID:<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>                <SN1PR0701MB20295E1986716DD199DFBCF59F140@SN1PR0701MB2029.namprd07.prod.outlook.com><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>                <o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Content-Type: text/plain; charset="utf-8"<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Berk,<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>I generally want to add some new variables to the
output ? if I don?t DeepCopy, then these new variables get added to the input
which violates the vtk rule that a filter can?t change the input.<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>This is the main reason that I advocate adding the
capability for PointData and CellData to be partially DeepCopy (new variables
added in Filter)  and partially ShallowCopy (input variables just along for the
ride).<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>I suspect most filters are going to generate new
variables, so DeepCopy seems to be appropriate.     Please correct me if I
misunderstand this.<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Dennis<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>From: Berk Geveci [mailto:berk.geveci@kitware.com]<o:p></o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Sent:
Tuesday, November 10, 2015 3:40 PM<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>To: Dennis Conklin <dennis_conklin@goodyear.com><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Cc: Paraview (paraview@paraview.org)
<paraview@paraview.org><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Subject: [EXT] Re: [Paraview] Customize programmable
filters: copy arrays<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Don't use DeepCopy() unless you intend to change the
values of the output arrays. Use ShallowCopy() instead. You don't need
CopyStructure() by the way. Alternatively, you can use PassData(). Something
like this:<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>output.GetPointData().PassData(inputs[0].GetPointData())<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>output.GeCellData().PassData(inputs[0].GetCellData())<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Best,<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>-berk<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>On Tue, Nov 10, 2015 at 1:49 PM, Dennis Conklin <</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a
href="mailto:dennis_conklin@goodyear.com%3cmailto:dennis_conklin@goodyear.com"><span
lang=EN-US>dennis_conklin@goodyear.com<mailto:dennis_conklin@goodyear.com</span></a></span><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>>>
wrote:<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>Jean-Michel,<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>I normally just add the following two statements within
my Filter:<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>output.CopyStructure(inputs[0].VTKObject)<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'>output.DeepCopy(inputs[0].VTKObject)<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Dennis<o:p></o:p></span></p>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>