[Paraview] TransformFilter problems

Paul Edwards paul.m.edwards at gmail.com
Wed Jun 11 09:39:02 EDT 2008


It works now.  Thanks :)

2008/6/11 Berk Geveci <berk.geveci at kitware.com>:
> Ah, that was easy! If you look at the signature of GetOutput(), you'll
> find out that it returns vtkPointSet (see vtkPointSetAlgorithm.h).
> That method gets the output and SafeDownCasts it to vtkPointSet, hence
> the NULL. Try using GetOutputDataObject(0) instead.
>
> -berk
>
> On Wed, Jun 11, 2008 at 5:10 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
>> I've created a simple program to demonstrate the problem.  I tried to
>> debug but I'm not sure what to look for....
>>
>> I'm still getting this error:
>>
>> Warning: In /home/paul/workspace/ParaView3/VTK/Filtering/vtkDataObject.cxx,
>> line 908
>> vtkMultiBlockDataSet (0x622ec0): Attempted to ShallowCopy from null.
>>
>> I've forwarded this to the VTK list in case anyone can help there.
>>
>> BTW I'm using the latest CVS version of VTK from the ParaVIew source tree.
>>
>> Any help here would be appreciated,
>> Paul
>>
>>
>> 2008/6/10 Berk Geveci <berk.geveci at kitware.com>:
>>> I am guessing it is failing in
>>> vtkPointSetAlgorithm::RequestDataObject(). Try putting a breakpoint
>>> there.
>>>
>>> -berk
>>>
>>> On Tue, Jun 10, 2008 at 10:37 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
>>>> The seg fault is because I just used the C++ delete rather than the
>>>> VTK version, i.e. this->Transform->Delete() in the destructor.  So, I
>>>> still have this error:
>>>>
>>>>>> Warning: In /home/paul/workspace/ParaView3/VTK/Filtering/vtkDataObject.cxx,
>>>>>> line 908
>>>>>> vtkMultiBlockDataSet (0x173da00): Attempted to ShallowCopy from null.
>>>>
>>>> Regards,
>>>> Paul
>>>>
>>>> 2008/6/10 Berk Geveci <berk.geveci at kitware.com>:
>>>>> Can you post the source code for the transform filter? It is somehow
>>>>> failing (returning 0) during RequestDataObject() (which may be in the
>>>>> superclass). Do you have that method implemented by any chance?
>>>>>
>>>>> -berk
>>>>>
>>>>> On Tue, Jun 10, 2008 at 8:06 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
>>>>>> I am trying to use a subclass of TransformFilter in one other Filters
>>>>>> (subclass of vtkMultiBlockDataSetAlgorithm) in the RequestData method.
>>>>>>  The RequestData looks like this:
>>>>>>
>>>>>> 8<----------------------------------------------------------
>>>>>> int vtkFilter::RequestData(vtkInformation* info,
>>>>>>                vtkInformationVector** vector,
>>>>>>                vtkInformationVector* outputVector)
>>>>>> {
>>>>>>        vtkInformation* outInfo = outputVector->GetInformationObject(0);
>>>>>>        vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast(
>>>>>>            outInfo0->Get(vtkMultiBlockDataSet::DATA_OBJECT()));
>>>>>>
>>>>>>        vtkSmartPointer<vtkMyMultiBlockDataSetReader> reader =
>>>>>> vtkSmartPointer<vtkMyMultiBlockDataSetReader>::New();
>>>>>>        // setup reader here...
>>>>>>        // .....
>>>>>>        vtkSmartPointer<vtkXYZTransformFilter> transform =
>>>>>> vtkSmartPointer<vtkXYZTransformFilter>::New();
>>>>>>        transform->SetInput(reader->GetOutput());
>>>>>>        transform->Update();
>>>>>>        output->ShallowCopy(transform->GetOutput());
>>>>>>        return 1;
>>>>>> }
>>>>>> ---------------------------------------------------------->8
>>>>>>
>>>>>> This filter above will work without the transform and the transform
>>>>>> works as a filter in paraview but when I have it as above I get the
>>>>>> following error:
>>>>>>
>>>>>> 8<----------------------------------------------------------
>>>>>> ERROR: In /home/paul/workspace/ParaView3/VTK/Filtering/vtkExecutive.cxx,
>>>>>> line 757
>>>>>> vtkStreamingDemandDrivenPipeline (0x4a7b1b0): Algorithm
>>>>>> vtkXYZTransformFilter(0x4a0c7a0) returned failure for request:
>>>>>> vtkInformation (0x4a7a9a0)
>>>>>>  Debug: Off
>>>>>>  Modified Time: 202678
>>>>>>  Reference Count: 1
>>>>>>  Registered Events: (none)
>>>>>>  Request: REQUEST_DATA_OBJECT
>>>>>>  FORWARD_DIRECTION: 0
>>>>>>  FROM_OUTPUT_PORT: 0
>>>>>>  ALGORITHM_AFTER_FORWARD: 1
>>>>>>
>>>>>> ERROR: In /home/paul/workspace/ParaView3/VTK/Filtering/vtkExecutive.cxx,
>>>>>> line 757
>>>>>> vtkStreamingDemandDrivenPipeline (0x4a7b1b0): Algorithm
>>>>>> vtkXYZTransformFilter(0x4a0c7a0) returned failure for request:
>>>>>> vtkInformation (0x4a7a9a0)
>>>>>>  Debug: Off
>>>>>>  Modified Time: 202710
>>>>>>  Reference Count: 1
>>>>>>  Registered Events: (none)
>>>>>>  Request: REQUEST_DATA_OBJECT
>>>>>>  FORWARD_DIRECTION: 0
>>>>>>  FROM_OUTPUT_PORT: 0
>>>>>>  ALGORITHM_AFTER_FORWARD: 1
>>>>>>
>>>>>> Warning: In /home/paul/workspace/ParaView3/VTK/Filtering/vtkDataObject.cxx,
>>>>>> line 908
>>>>>> vtkMultiBlockDataSet (0x173da00): Attempted to ShallowCopy from null.
>>>>>> ---------------------------------------------------------->8
>>>>>>
>>>>>> Can anyone see what I am doing wrong?
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Paul
>>>>>> _______________________________________________
>>>>>> ParaView mailing list
>>>>>> ParaView at paraview.org
>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>
>>>>>
>>>>
>>>
>>
>


More information about the ParaView mailing list