[vtkusers] GetEdgeData->Reset() breaks EdgeData

Aashish Chaudhary aashish.chaudhary at kitware.com
Wed Mar 31 11:13:40 EDT 2010


I think thats probably the correct behavior.  Since the name is a "id" for
most practical purposes copying the id might not be the best thing to do.


~Aashish




On Wed, Mar 31, 2010 at 10:57 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Wed, Mar 31, 2010 at 10:34 AM, Aashish Chaudhary
> <aashish.chaudhary at kitware.com> wrote:
> > Quickly looking I am not sure whats wrong. In my code I cannot duplicate
> > this kind of behavior. The lines you posted is exactly what you doing? If
> > thats the case I don't know.
> >
> > May be you can post a small program which reproduces this problem?
> >
> > ~Regards,
> > Aashish
>
> Phew! After *hours* of debugging, the problem was (not in any of the
> code I posted) that when I DeepCopy()-ed an array:
>
>  vtkSmartPointer<vtkDoubleArray> weights =
>      vtkSmartPointer<vtkDoubleArray>::New();
>   weights->DeepCopy(originalWeights);
>
> I didn't set the name of the array to match:
>
>  weights->SetName("Weights");
>
> I guess I assumed that would have happened in the DeepCopy()??
>
> Oh well, lesson learned!
>
> Thanks,
>
> David
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100331/7d55506a/attachment.htm>


More information about the vtkusers mailing list