[Paraview] vtkDataSet algorithm that takes composite data set as input

Sohail Shafii sohailshafii at yahoo.com
Wed Jan 25 15:40:44 EST 2012


This is my custom print self:
Debug: Off
Modified Time: 122500
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0

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:
vtkPVCompositeDataPipeline (0x1dd7640): Algorithm vtkFastMarcher(0x1e2e9d0) returned failure for request: vtkInformation (0x2d0d590)
  Debug: Off
  Modified Time: 276195
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  FORWARD_DIRECTION: 0
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1




Debug: Off
Modified Time: 276205
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
FORWARD_DIRECTION: 0
FROM_OUTPUT_PORT: 0
ALGORITHM_AFTER_FORWARD: 1

It appears to fail in the superclass's ProcessRequest here: 
  // create the output

  if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))
    {
    return this->RequestDataObject(request, inputVector, outputVector);
    }
Basically RequestDataObject can't cast the inInfo into a vtkDataSet, because it's a composite. I guess I have to override it?

Sohail


________________________________
 From: David E DeMarle <dave.demarle at kitware.com>
To: Sohail Shafii <sohailshafii at yahoo.com> 
Cc: "paraview at paraview.org" <paraview at paraview.org> 
Sent: Monday, January 23, 2012 7:25 AM
Subject: Re: [Paraview] vtkDataSet algorithm that takes composite data set as input
 

I'ld sit down with a debugger and see which request exactly is failing and why.

Try overriding vtkAlgorithm::ProcessRequest() in your filter so that you can easily get a breakpoint in an instance of your class.

In that method call PrintSelf(cerr, vtkIndent(0)) on the "request" vtkInformation. Put the breakpoint right after that.
After the breakpoint call this->Superclass::ProcessRequest().

When the PrintSelf tells you which request fails, rerun and step in until you see why the handling method returns.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Fri, Jan 20, 2012 at 3:34 PM, Sohail Shafii <sohailshafii at yahoo.com> wrote:

Thanks. I get these sorts of errors:
>vtkPVCompositeDataPipeline (0x2a831a0): Algorithm vtkFastMarcher(0x2a80860) returned failure for request: vtkInformation (0x339b0f0
>
>Before RequestData is reached...
>
>Sohail
>
>________________________________
>
>From: David E DeMarle <dave.demarle at kitware.com>
>To: Sohail Shafii <sohailshafii at yahoo.com> 
>Cc: "paraview at paraview.org" <paraview at paraview.org> 
>Sent: Friday, January 20, 2012 11:42 AM
>Subject: Re: [Paraview] vtkDataSet algorithm that takes composite data set as input
>
>
>
>Try something like this.
>In this case the mapper takes in either type, which you may or may not want.
>
>
>//----------------------------------------------------------------------------
>int vtkCompositePolyDataMapper2::FillInputPortInformation(
>  int vtkNotUsed(port), vtkInformation* info)
>{
>  info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData");
>  info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkCompositeDataSet");
>  return 1;
>}
>
>David E DeMarle
>Kitware, Inc.
>R&D Engineer
>21 Corporate Drive
>Clifton Park, NY 12065-8662
>Phone: 518-881-4909
>
>
>
>On Fri, Jan 20, 2012 at 2:36 PM, Sohail Shafii <sohailshafii at yahoo.com> wrote:
>
>Hi,
>>
>>
>>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.
>>
>>Sohail
>>_______________________________________________
>>Powered by www.kitware.com
>>
>>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>>Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>>Follow this link to subscribe/unsubscribe:
>>http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120125/5f2f8d04/attachment.htm>


More information about the ParaView mailing list