<br>try using imgdata->GetOrigin()<br><br>cheers, Michael<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 10:03 AM, 王君臣 <span dir="ltr"><<a href="mailto:wangjunchen@gmail.com">wangjunchen@gmail.com</a>></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;"><div><br clear="all">hi, all</div>
<div> </div>
<div>I just encountered a strange thing that when I set the origin of vtkImageData, and read it out after the assignment, it turned out that the value hasn't changed (hold the value before the assignment).</div>
<div> </div>
<div>=====code seg =======</div>
<div> </div>
<div> vtkImageData * imgdata = vNode->GetImageData();<br> double o[3];<br> imgdata->GetOrigin(o); // o is [100, 100, 100]<br> imgdata->SetOrigin(0, 0, 0); // assign origin to [0 0 0]<br> imgdata->GetOrigin(o);// still [100 100 100]</div>
<div>====================</div>
<div> </div>
<div>something I have to say is that the mehtod SetOrigin will trigger the vtkcommand::modifiedevent of the imgdata and in the handler I re-rendered the widget which contains the actor of the imgdata. imgdata is not connected to the filter, thus there is no possibility that the filter updated the imgdata. </div>
<div> </div>
<div>I need for your help, thanks.<br>-- <br>Best Regards,</div>
<div>WANG Junchen</div>
<div><br> </div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>