[Paraview] Multiple input filters. Tracking down a bug...(Bug #2498)

John Biddiscombe biddisco at cscs.ch
Tue Jan 10 05:44:45 EST 2006


I need to find a fix for a bug which I submitted a while ago, so if 
anyone can help, I have some new info which may be of use.

I have a filter which accepts 2 inputs, one can be any dataset, the 
other a polydata. The filter computes the distance between the first 
dataset and the polydata (water surface) (vtkWaterSheetThicknessFilter). 
The filter operates by firing rays from the dataset (Buckets on a 
turbine) onto the watersheet and computing the intersections.

The filter used to work within paraview, but our CFX reader now 
generates MultiBlock/MultiGroup datasets as output and so I can select 
buckets (7) as a single composite dataset and set them as BucketInput, 
the watersheet is computed using a contour filter and appears as a 
MultiGroup Dataset with a single Polydata object inside it. It is the 
second input.

Suince Paraview now handles composite datasets using an executive which 
will loop over N datasets and applying them sequentially to a filter, in 
principle I can
SetBuckets(7 datasets in a composite container)
SetWaterSheet(1 dataset in a composote container)
execute the filter and receive a single composite dataset with the 7 
computed distances (of which in fact only one is useful, but let's not 
worry about that right now).

What happens when I execute the filter is that if I define
    #define BUCKET_INPUT 1
    #define WATER_INPUT  0
inside my RequestData(yada yada...) function, the information objects 
return valid information for all the buckets, over 7 iterations I get 
the correct bucket out each time - BUT, the water sheet is an empty 
PolyData object
if I
    #define BUCKET_INPUT 0
    #define WATER_INPUT  1
then inside my RequestData(yada yada...) function, I get correct 
WaterSheet polydata object (7 times), but the Bucket dataset is an empty 
datset on each iteration.

It seems that Paraview is looping over the inputs and somehow getting 
the wrong objects (or worse, generating empty ones instead)
the relevant lines of code are here
  // get the info objects
  vtkInformation *bInfo   = 
inputVector[BUCKET_INPUT]->GetInformationObject(0);
  vtkInformation *wInfo   = 
inputVector[WATER_INPUT]->GetInformationObject(0);

  // get the inputs
  vtkDataSet  *bucket = 
vtkDataSet::SafeDownCast(bInfo->Get(vtkDataObject::DATA_OBJECT()));
  vtkDataSet  *water  = 
vtkDataSet::SafeDownCast(wInfo->Get(vtkDataObject::DATA_OBJECT()));

The datasets returned from these last two lines are the ones which get 
munged (depending on the order I define the inputs)

I'd like to look at the code which sets the DATA_OBJECT into the 
information object during execution and try to fix the problem so that 
the filter will loop over the N buckets passing in the nth bucket on 
each iteration, and pass in the water object (since there is only one, 
I'd like it to simply loop over N but modulo 1 in effect and just pass 
the same one each time)

I can't find the right bit of code and I'd therefore like some pointers 
if anyone can assist me

many thanks

JB


-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82




More information about the ParaView mailing list