<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><span>This is my custom print self:</span></div><div><span><div>Debug: Off</div><div>Modified Time: 122500</div><div>Reference Count: 1</div><div>Registered Events: (none)</div><div>Request: REQUEST_DATA_OBJECT</div><div>FORWARD_DIRECTION: 0</div><div>ALGORITHM_AFTER_FORWARD: 1</div><div>FROM_OUTPUT_PORT: 0</div><div><br></div><div>For some odd reason gdb does not allow me to step through vtkDataSetAlgorithm's ProcessRequest. But it does return an error, as the executive prints the following:</div><div><div>vtkPVCompositeDataPipeline (0x1dd7640): Algorithm vtkFastMarcher(0x1e2e9d0) returned failure for request: vtkInformation (0x2d0d590)</div><div> Debug: Off</div><div> Modified Time: 276195</div><div> Reference Count: 1</div><div>
Registered Events: (none)</div><div> Request: REQUEST_DATA_OBJECT</div><div> FORWARD_DIRECTION: 0</div><div> FROM_OUTPUT_PORT: 0</div><div> ALGORITHM_AFTER_FORWARD: 1</div><div><div><br></div><div><br></div><div><br></div><div>Debug: Off</div><div>Modified Time: 276205</div><div>Reference Count: 1</div><div>Registered Events: (none)</div><div>Request: REQUEST_DATA_OBJECT</div><div>FORWARD_DIRECTION: 0</div><div>FROM_OUTPUT_PORT: 0</div><div>ALGORITHM_AFTER_FORWARD: 1</div><div><br></div></div></div><div>It appears to fail in the superclass's ProcessRequest here: </div><div> // create the output<br></div></span><div> if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))</div><div> {</div><div> return this->RequestDataObject(request, inputVector, outputVector);</div><div> }</div><div>Basically RequestDataObject can't cast the inInfo into a vtkDataSet, because
it's a composite. I guess I have to override it?</div><div><br></div><div>Sohail</div></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div> <div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> David E DeMarle <dave.demarle@kitware.com><br> <b><span style="font-weight: bold;">To:</span></b> Sohail Shafii <sohailshafii@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "paraview@paraview.org" <paraview@paraview.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, January 23, 2012 7:25 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Paraview] vtkDataSet algorithm that takes composite data set as input<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1212891346">I'ld sit down with a debugger and see which request exactly is failing and why.<div><br></div><div>Try overriding vtkAlgorithm::ProcessRequest() in your filter so that you can easily get a breakpoint in an instance of your class.</div>
<div><br></div><div>In that method call PrintSelf(cerr, vtkIndent(0)) on the "request" vtkInformation. Put the breakpoint right after that.</div><div>After the breakpoint call this->Superclass::ProcessRequest().</div>
<div><br></div><div>When the PrintSelf tells you which request fails, rerun and step in until you see why the handling method returns.</div><div><br></div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="yiv1212891346gmail_quote">On Fri, Jan 20, 2012 at 3:34 PM, Sohail Shafii <span dir="ltr"><<a rel="nofollow" ymailto="mailto:sohailshafii@yahoo.com" target="_blank" href="mailto:sohailshafii@yahoo.com">sohailshafii@yahoo.com</a>></span> wrote:<br><blockquote class="yiv1212891346gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><span>Thanks. I get these sorts of errors:</span></div><div><span>vtkPVCompositeDataPipeline (0x2a831a0): Algorithm vtkFastMarcher(0x2a80860) returned failure for request: vtkInformation (0x339b0f0<br>
</span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; ">Before RequestData is reached...</div><span class="yiv1212891346HOEnZb"><font color="#888888"><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; ">
<br></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; ">Sohail</div> </font></span><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size:12pt;">
<div dir="ltr"> <font face="Arial"> <hr size="1"><div class="yiv1212891346hm yiv1212891346HOEnZb"> <b><span style="font-weight:bold;">From:</span></b>
David E DeMarle <<a rel="nofollow" ymailto="mailto:dave.demarle@kitware.com" target="_blank" href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>><br> <b><span style="font-weight:bold;">To:</span></b> Sohail Shafii <<a rel="nofollow" ymailto="mailto:sohailshafii@yahoo.com" target="_blank" href="mailto:sohailshafii@yahoo.com">sohailshafii@yahoo.com</a>> <br>
<b><span style="font-weight:bold;">Cc:</span></b> "<a rel="nofollow" ymailto="mailto:paraview@paraview.org" target="_blank" href="mailto:paraview@paraview.org">paraview@paraview.org</a>" <<a rel="nofollow" ymailto="mailto:paraview@paraview.org" target="_blank" href="mailto:paraview@paraview.org">paraview@paraview.org</a>> <br>
<b><span style="font-weight:bold;">Sent:</span></b> Friday, January 20, 2012 11:42 AM<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: [Paraview] vtkDataSet algorithm that takes composite data set as input<br>
</div></font><div class="yiv1212891346hm yiv1212891346HOEnZb"> </div></div><div><div class="yiv1212891346h5"> <br>
<div>Try something like this.<div><div>In this case the mapper takes in either type, which you may or may not want.</div><div><br></div><div>//----------------------------------------------------------------------------</div>
<div>
int vtkCompositePolyDataMapper2::FillInputPortInformation(</div><div> int vtkNotUsed(port), vtkInformation* info)</div><div>{</div><div> info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData");</div>
<div> info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkCompositeDataSet");</div><div> return 1;</div><div>}</div><div><br></div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>Phone: <a rel="nofollow">518-881-4909</a><br>
<br><br><div>On Fri, Jan 20, 2012 at 2:36 PM, Sohail Shafii <span dir="ltr"><<a rel="nofollow" ymailto="mailto:sohailshafii@yahoo.com" target="_blank" href="mailto:sohailshafii@yahoo.com">sohailshafii@yahoo.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div>Hi,</div><div><br></div><div>I am developing an algorithm that requires a composite data set as input while creating a vtkDataSet as output -- basically it inherit from vtkDataSetAlgorithm. I know that one must provide a new definition to the FillInputPortInformation(int port, vtkInformation *info) function, but I'm not sure how. Please advise, thank you.</div>
<span><font color="#888888"><div><br></div><div>Sohail</div></font></span></div></div><br>_______________________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.paraview.org/mailman/listinfo/paraview<br>
<br></blockquote></div><br></div>
</div><br><br> </div></div></div> </div> </div></div></blockquote></div><br></div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </div></body></html>