[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    Re: [vtkusers] GetEdgeData->Reset() breaks EdgeData
From:       Aashish Chaudhary <aashish.chaudhary () kitware ! com>
Date:       2010-03-31 15:13:40
Message-ID: i2k8a9d40c1003310813x7ee30bb7sacbd06360b5b51b4 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@gmail.com<daviddoria%2Bvtk@gmail.com>
> wrote:

> On Wed, Mar 31, 2010 at 10:34 AM, Aashish Chaudhary
> <aashish.chaudhary@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

[Attachment #5 (text/html)]

I think thats probably the correct behavior.  Since the name is a &quot;id&quot; for \
most practical purposes copying the id might not be the best thing to \
do.<br><br><br>~Aashish<br><br><br><br><br><div class="gmail_quote"> On Wed, Mar 31, \
2010 at 10:57 AM, David Doria <span dir="ltr">&lt;<a \
href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On Wed, Mar 31, 2010 at 10:34 \
AM, Aashish Chaudhary<br> <div class="im">&lt;<a \
href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>&gt; \
wrote:<br> </div><div class="im">&gt; Quickly looking I am not sure whats wrong. In \
my code I cannot duplicate<br> &gt; this kind of behavior. The lines you posted is \
exactly what you doing? If<br> &gt; thats the case I don&#39;t know.<br>
&gt;<br>
&gt; May be you can post a small program which reproduces this problem?<br>
&gt;<br>
&gt; ~Regards,<br>
&gt; Aashish<br>
<br>
</div>Phew! After *hours* of debugging, the problem was (not in any of the<br>
code I posted) that when I DeepCopy()-ed an array:<br>
<div class="im"><br>
  vtkSmartPointer&lt;vtkDoubleArray&gt; weights =<br>
      vtkSmartPointer&lt;vtkDoubleArray&gt;::New();<br>
</div>  weights-&gt;DeepCopy(originalWeights);<br>
<br>
I didn&#39;t set the name of the array to match:<br>
<br>
  weights-&gt;SetName(&quot;Weights&quot;);<br>
<br>
I guess I assumed that would have happened in the DeepCopy()??<br>
<br>
Oh well, lesson learned!<br>
<br>
Thanks,<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| \
R&amp;D Engineer         <br>| Kitware Inc.            <br>| <a \
href="http://www.kitware.com">www.kitware.com</a>    <br>



_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic