<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-06-21 16:02 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi all,<br><br></div>I'm using a vtkCompositeTransferFunctionItem + vtkCompositeControlPointsItem in a vtkChartXY to modify the transfer functions used for some volume rendering.<br><br></div>Is there some event from one of these items I can observe that will fire once interaction has occurred? I know I can observe the ModifiedEvent of the vtkCompositeTransferFunctionItem, but when dragging points around, it will fire on each mouse move. I need to be notified only once the interaction has stopped.<br></div></div></div></blockquote><div><br></div><div>Looking at the code, I noticed that vtkControlPointsItem seem to emit vtkCommand::StartInteractionEvent and vtkCommand::EndInteractionEvent (though I'm not sure...), and since vtkCompositeControlPointsItem indirectly inherits vtkControlPointsItem, I tried to observe vtkCommand::EndInteractionEvent with<br><br>        self._pointsItem.AddObserver(vtkCommand.EndInteractionEvent,<br>                                     lambda *_: print('interaction ended'))<br><br></div><div>where self._pointsItem is my vtkCompositeControlPointsItem.<br><br></div><div>But it seems the event is not emitted when I interact with the points.<br><br></div><div>Any ideas here? Surely there must be some way of being notified when interaction with the color transfer functions has ended? My use case is that I don't want to issue a re-render of my volume each time the mouse moves when dragging a point around. Only when dragging finally stops do I want to re-render.<br><br></div><div>Any advice is much appriciated.<br><br></div><div>Elvis<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>Thanks in advance,<br></div>Elvis<br></div>
</blockquote></div><br></div></div>