[Paraview] vtkDataObjectAlgorithm with multiple inputs

Paul Edwards paul.m.edwards at gmail.com
Tue Aug 25 08:43:21 EDT 2009


Thanks, I have it working now.

I looked at the vtkPassInputTypeAlgorithm and noticed the following in
RequestDataObject:

 if (!output || !output->IsA(input->GetClassName()))

{

vtkDataObject* newOutput = input->NewInstance();

newOutput->SetPipelineInformation(info);

* newOutput->Delete();*

this->GetOutputPortInformation(0)->Set(

vtkDataObject::DATA_EXTENT_TYPE(), *newOutput->GetExtentType()*);

}

Is there a reason why Delete is called before GetExtentType?  Or is this a
bug? (although it doesn't crash on me....)

Regards,
Paul

2009/8/24 Moreland, Kenneth <kmorel at sandia.gov>

>  You might also consider subclassing vtkPassInputTypeAlgorithm instead.
>  That should set up the output object the way you want (the same type as the
> input) for you.
>
> -Ken
>
>
>
> On 8/24/09 11:35 AM, "burlen" <burlen.loring at gmail.com> wrote:
>
> How did you implement RequestDataObject?
> Did you set the keys:
>
> vtkDataObject::DATA_TYPE_NAME()
> vtkDataObject::DATA_OBJECT()
> vtkDataObject::DATA_EXTENT_TYPE()
>
> ?
>
>
> Paul Edwards wrote:
> > Hi,
> >
> > I am creating a filter that calculates the difference between all
> > scalar values for two inputs.  The filter assumes that both the inputs
> > have the sames number of points (and same block structure if
> > multi-block).  I want to work with both single and multi-block so I
> > have subclassed vtkDataObjectAlgorithm but when I just set the output
> > as a DeepCopy of the first input I just get an empty output with an
> > "Unknown type".  Does anyone know what I am doing wrong?
> >
> > Thanks,
> > Paul
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
> >
>
> _______________________________________________
> 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
>
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090825/8e11ea5f/attachment.htm>


More information about the ParaView mailing list