Hello. I am having a problem with the vtkHyperOctree-&gt;DeepCopy method. The underlying CellTree is being shallow copied. <br><br>I made the following modification to vtkHyperOctree.cxx:112<br><br>//-----------------------------------------------------------------------------<br>
// because the PrintSelf test is not smart, PrintSelf has to be here.<br>void vtkHyperOctree::PrintSelf(ostream&amp; os, vtkIndent indent)<br>{<br>  this-&gt;Superclass::PrintSelf(os,indent);<br><br>  os &lt;&lt; indent &lt;&lt; &quot;Dimension: &quot;&lt;&lt;this-&gt;Dimension&lt;&lt;endl;<br>
  os &lt;&lt; indent &lt;&lt; &quot;Size: &quot;&lt;&lt;this-&gt;Size[0]&lt;&lt;&quot;,&quot;&lt;&lt;this-&gt;Size[1]&lt;&lt;&quot;,&quot;;<br>  os &lt;&lt;this-&gt;Size[2]&lt;&lt;endl;<br>  os &lt;&lt; indent &lt;&lt; &quot;origin: &quot;&lt;&lt;this-&gt;Origin[0]&lt;&lt;&quot;,&quot;&lt;&lt;this-&gt;Origin[1]&lt;&lt;&quot;,&quot;;<br>
  os &lt;&lt;this-&gt;Origin[2]&lt;&lt;endl;<br><br>  os &lt;&lt; indent &lt;&lt; &quot;DualGridFlag: &quot; &lt;&lt; this-&gt;DualGridFlag &lt;&lt; endl;<br>  os &lt;&lt; indent &lt;&lt; &quot;CellTree Ptr &quot; &lt;&lt; this-&gt;CellTree &lt;&lt; endl;  // stream pointer address<br>
  //this-&gt;CellTree-&gt;PrintSelf(os,indent);<br>}<br><br>Just to check the address of the underlying tree. Then in a piece of (c++) code <br><br>vtkHyperOctreeSampleFunction* OctSamp2 = vtkHyperOctreeSampleFunction::New();<br>
vtkHyperOctree* Octree = vtkHyperOctree::New();<br>// Do the sampling<br>this-&gt;Octree-&gt;DeepCopy(OctSamp2-&gt;GetOutput())<br>std::cout &lt;&lt; *OctSamp2-&gt;GetOutput() &lt;&lt; std::endl;<br>std::cout &lt;&lt; *Octree &lt;&lt; std::endl;<br>
<br>And the two pointer addresses were the same.<br><br>OctSamp2-&gt; GetOutput()  -&gt;&gt;&gt;&gt;&gt;   CellTree Ptr 0x237fcf0<br>Octree -                           -&gt;&gt;&gt;&gt;&gt;   CellTree Ptr 0x237fcf0<br><br>
Which I did not expect, and is causing errors in  my application. Is there a way to get a true deep copy? <br><br>If this is indeed an error I can generate a test file exhibiting the problem. But my method of checking involved mucking with the vtk source file. <br>
<br>Thanks for any help or input. <br><br clear="all"><div>-- Trevor<br></div>