[vtkusers] vtkImageData::SetOrigin didn't take effect

王君臣 wangjunchen at gmail.com
Tue Mar 2 05:03:36 EST 2010


hi, all

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).

=====code seg =======

   vtkImageData * imgdata = vNode->GetImageData();
   double o[3];
   imgdata->GetOrigin(o); // o is [100, 100, 100]
   imgdata->SetOrigin(0, 0, 0); // assign origin to [0 0 0]
   imgdata->GetOrigin(o);// still [100 100 100]
====================

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.

I need for your help, thanks.
-- 
Best Regards,
WANG Junchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100302/805c35e7/attachment.htm>


More information about the vtkusers mailing list