Re: Widgets and RequestData
2011-09-01 08:12:12 GMT
I have now figured out the problem, the unsigned long GetMTime() function needs to be overloaded to report a new modified time (this updated time is in the widget/vtkImplicitFunction). When the filter has a new modified time then RequestData gets called.
HelloI have created a vtk filter that has an implicit widget attached, the widget shows up in the 3d view butit never updates the filter (the RequestData method is never executed in the filter after interacting with the widget). If the currentframe is changed the RequestData method does execute with the updated values from the widget though. Is theresomething special that needs to be done with the widget so that this happens?Here is the xml:<SourceProxy name="FourFlowVolumeTraceNormal" class="vtkFourFlowVolumeTrace" label="VolumeTrace"><InputProperty name="Input" command="SetInputConnection"><ProxyGroupDomain name="groups"><Group name="sources"/><Group name="filters"/></ProxyGroupDomain><DataTypeDomain name="input_type"><DataType value="vtkDataSet"/></DataTypeDomain></InputProperty><ProxyProperty name="ClipFunction" command="SetClipFunction" label="Clip Type"><ProxyGroupDomain name="groups"><Group name="implicit_functions"/></ProxyGroupDomain><ProxyListDomain name="proxy_list"><Proxy group="implicit_functions" name="Plane" /><Proxy group="implicit_functions" name="Box" /><Proxy group="implicit_functions" name="Sphere" /></ProxyListDomain></ProxyProperty><DoubleVectorPropertyname="ISOValue"command="SetISOValue"number_of_elements="1"animateable="0"default_values="0.02"information_property="ISOValueInfo">></DoubleVectorProperty><DoubleVectorPropertyname="ISOValueInfo"command="GetISOValue"information_only="1"><SimpleDoubleInformationHelper/></DoubleVectorProperty></SourceProxy>ThanksBR/ Christoffer
<div> <p>I have now figured out the problem, the unsigned long GetMTime() function needs to be overloaded to report a new modified time (this updated time is in the widget/vtkImplicitFunction). When the filter has a new modified time then RequestData gets called.</p> <div> <br> </div> <div>This message written so that if anybody else ever has this problem they might have an easier time with it.</div> <div><br></div> <div>BR/ Christoffer<br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 4:31 PM, Christoffer Green <span dir="ltr"><<a href="mailto:christoffer.green <at> gmail.com">christoffer.green <at> gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote">Hello<div><br></div> <div>I have created a vtk filter that has an implicit widget attached, the widget shows up in the 3d view but </div> <div>it never updates the filter (the RequestData method is never executed in the filter after interacting with the widget). If the current</div> <div>frame is changed the RequestData method does execute with the updated values from the widget though. Is there</div> <div>something special that needs to be done with the widget so that this happens?</div> <div><br></div> <div>Here is the xml:</div> <div><br></div> <div><div> <div> <SourceProxy name="FourFlowVolumeTraceNormal" class="vtkFourFlowVolumeTrace" label="VolumeTrace"></div> <div> </div> <div> <InputProperty name="Input" command="SetInputConnection"></div> <div> <ProxyGroupDomain name="groups"></div> <div> <Group name="sources"/></div> <div> <Group name="filters"/></div> <div> </ProxyGroupDomain></div> <div> <DataTypeDomain name="input_type"></div> <div> <DataType value="vtkDataSet"/></div> <div> </DataTypeDomain></div> <div> </InputProperty></div> <div><br></div> <div> <ProxyProperty name="ClipFunction" command="SetClipFunction" label="Clip Type"></div> <div> <ProxyGroupDomain name="groups"></div> <div> <Group name="implicit_functions"/></div> <div> </ProxyGroupDomain></div> <div> <ProxyListDomain name="proxy_list"></div> <div> <Proxy group="implicit_functions" name="Plane" /></div> <div> <Proxy group="implicit_functions" name="Box" /></div> <div> <Proxy group="implicit_functions" name="Sphere" /></div> <div> </ProxyListDomain></div> <div> </ProxyProperty></div> <div> <span> </span> </div> <div> <DoubleVectorProperty</div> <div> name="ISOValue"</div> <div> command="SetISOValue"</div> <div> number_of_elements="1"</div> <div> animateable="0"</div> <div> default_values="0.02"</div> <div> information_property="ISOValueInfo">></div> <div> </DoubleVectorProperty></div> <div><br></div> <div> <DoubleVectorProperty</div> <div> name="ISOValueInfo"</div> <div> command="GetISOValue"</div> <div> information_only="1"></div> <div> <SimpleDoubleInformationHelper/></div> <div> </DoubleVectorProperty></div> <div> <span> </span> </div> <div> </SourceProxy></div> </div></div> <div><br></div> <div>Thanks</div> <div>BR/ Christoffer</div> </blockquote> </div> <br> </div> </div>
RSS Feed