<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-06-27 15:55 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">2016-06-22 12:23 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2016-06-22 11:07 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<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 class="gmail_extra"><div class="gmail_quote"><span>2016-06-22 10:36 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<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 class="gmail_extra"><div class="gmail_quote"><span>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><wbr>:<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 vtkCompositeTransferFunctionIt<wbr>em + 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 vtkCompositeTransferFunctionIt<wbr>em, 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></span><div>Looking at the code, I noticed that vtkControlPointsItem seem to emit vtkCommand::<wbr>StartInteractionEvent and vtkCommand::<wbr>EndInteractionEvent (though I'm not sure...), and since vtkCompositeControlPointsItem indirectly inherits vtkControlPointsItem, I tried to observe vtkCommand::<wbr>EndInteractionEvent with<br><br>        self._pointsItem.AddObserver(<wbr>vtkCommand.<wbr>EndInteractionEvent,<br>                              <wbr>       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></div></div></div></div></blockquote><div><br></div></span><div>After some more experimentation, trying to observe various events on the items, the chart, the context view and the context scene, I've realized I can observe<br><br>vtkCommand.<wbr>LeftButtonReleaseEvent<br>vtkCommand.<wbr>RightButtonReleaseEvent<br>vtkCommand.<wbr>MiddleButtonReleaseEvent<br><br></div><div>on the context scene. This will work as a workaround, but seems overly liberal and complicated. Is there no single event on the composite control points item or the composite transfer function item I could observe?<span></span><br></div></div></div></div></blockquote><div><br></div></span><div>Although I realized now that this approach won't work, since for some reason, by the time I get the vtkCommand.<wbr>MiddleButtonReleaseEvent, the point has not yet been deleted. So still looking for a proper solution.<span><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div></span><div>Noone knows how this can be done? I noticed that ParaView also has this behavior (that the rendering is updated on each mouse move when dragging a point in the transfer function). For me, this will be too heavy :/ Only once mouse movement stops do I want to re-render. But I can't seem to find a way to do this when using these VTK-bundled transfer function editing widgets.<span class="HOEnZb"><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div><div>Sorry to bump my own thread, but I'm still searching for a solution here. I find it incredible that this wouldn't be possible. Anyone know how I can be notified once editing of a transfer function stops when using these editor widgets?<br><br></div><div>Thanks in advance,<br></div><div>Elvis<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Elvis<br></div></font></span><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Elvis<br><br> </div></font></span><span><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 class="gmail_extra"><div class="gmail_quote"><div> </div></div></div></div></blockquote><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 class="gmail_extra"><div class="gmail_quote"><div><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Elvis<br><br></div></font></span><span><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 class="gmail_extra"><div class="gmail_quote"><div><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>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>