[Paraview] modifying vtkInformation object to point to new vtkDataObject

Berk Geveci berk.geveci at kitware.com
Tue Oct 13 21:50:50 EDT 2009


I am not sure why it doesn't work but what you are doing is not safe
and is bad practice. The inputVector belongs to the input of this
filter and you should not modify it (other than passing a request
during RequestUpdateExtent). Isn't there another way you can do this?
Maybe having a data member defined in the superclass that you set in
the subclass? Or defining a helper function that you can call from the
subclass with the alternative input and with the regular input from
the superclass' RequestData?


On Tue, Oct 13, 2009 at 3:38 PM, Christine Corbett Moran
<corbett at physik.uzh.ch> wrote:
> Hi,
>
> I want to modify a vtkInformation object (specifically one within a
> vtkInformation vector) to point to a new data set.
>
> The use case is I have a derived class for which, in its RequestData
> method, I want to do some preprocessing on the input, then send the
> preprocessed input to the superclass via the superclass' RequestData
> method, then post process the output within the derived class. I don't
> want to modify the original input so I work with an (in my use case
> much smaller) subset of it, but the problem is then passing it on to
> the superclass for processing.
>
> Right now I do:
> inputVector[0]->GetInformationObject(0)->Set(
>  vtkDataObject::DATA_OBJECT(),newDataSet).
> Before my call to the super's RequestData method, but the superclass
> seems not to operate on the newDataSet, nor on the original data set,
> so I think I'm inadvertently pummeling something, probably using the
> wrong vtkInformationDataObjectKey. However I'm not sure how to divine
> the correct one. Any help would be appreciated.
>
> Cheers,
> Christine
> _______________________________________________
> 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
>


More information about the ParaView mailing list