[Paraview] Losing data when clip multi-block

Eric E. Monson emonson at cs.duke.edu
Thu Feb 12 16:45:53 EST 2009


Hey All,

I'm not sure if John has it exactly right, but he may not be that far  
off...

I was working today on a variant of the Clip filter which would not  
remove coincident points, and somehow in my ServerManger XML I ended  
up always exposing the Scalars input combo-box (which is used as input  
to vtkClipDataSet::SetInputArrayToProcess()) no matter whether I was  
clipping by plane, box, sphere or scalars. By default, vtkClipDataSet  
uses the active scalars on the first input for this array -- but using  
this combo box I could control this input even though I wasn't really  
"using" it (because I was clipping with a box or a plane).

The clip filter always keeps all the scalars from the block which  
contains the input to SetInputArrayToProcess(). The filter loses data  
from the other block, and it always seems to be the most recent array  
added to that data set -- i.e. the one which should be the "active  
scalars" in that block. This agrees with the behavior seen in my other  
examples in which the "second" data set highlighted before the Group  
filter is the one that loses a data array -- the active scalars of the  
first selected block are probably the ones being used for  
SetInputArrayToProcess().

I can't track it down to the type of SetActiveScalars() without a call  
to AddArray() that John is talking about, but it seems related since  
it is the "active" scalars that are getting lost.

If you think this is intelligible at all, I can add it to the bug  
report.

Talk to you later,
-Eric


On Feb 6, 2009, at 9:38 AM, John Biddiscombe wrote:

> Eric et al,
>
> I recently had a problem where a filter opreated normally when used  
> normally, but when someone put a calculator in front of it, it  
> stopped working. The filter in question instantiated other filters  
> internally.
>
> I tracked to the problem down to this.
>
> Calculator calls SetActiveScalars(New data)
> another filter later does a PointData()->PassData(blah)
> ->SetActiveScalars(More New data)
>
> And the New data from before was lost. I do not like this  
> SetActiveScalars function because it replaces (not adds) whatever  
> scalar was there before. I cnaged the offending filter (in this case  
> vtkSurfaceVectors) on my copy to do
> PointData()->PassData(blah)
> PointData()->AddArray(newData);
> PointData()->SetActiveScalars(newData->GetName())
>
> or something like that (from memory).
>
> I have no idea if this is related to your problem, but I just  
> thought I'd vent my spleen and start a campaigh to remove this  
> SetActiveScalars(...) call as it is just rubbish. (At least it  
> should be modified internally to not remove the old active slalars  
> if they are are about to be wiped)
>
> JB
>
>
>> Hey Utkarsh,
>>
>> No, I've never seen the clip lose data on one dataset by itself.
>>
>> The other interesting thing is that I can't always get this data  
>> loss to happen if the data was generated as part of a source from  
>> the Sources menu. It's much more likely to disappear when the data  
>> was generated by a filter or brought in by a reader.
>>
>> For example, if you generate a Box and a Wavelet source, grouping  
>> and clipping them won't lose any data, but if you run Generate IDs  
>> on one of them, then select GenerateIds1 second before grouping,  
>> then clip, the "Ids" point data disappears...
>>
>> Thanks,
>> -Eric
>>
>>
>> On Feb 6, 2009, at 7:37 AM, Utkarsh Ayachit wrote:
>>
>>> Eric,
>>>
>>> Does the loss of arrays happen even if you clip the orginal  
>>> dataset by
>>> itself (without grouping it using the group filter)?
>>>
>>> Utkarsh
>>>
>>> On Wed, Feb 4, 2009 at 3:53 PM, Eric E. Monson  
>>> <emonson at cs.duke.edu> wrote:
>>>> Hello,
>>>>
>>>> I'm creating a multi-block data set using the group filter and  
>>>> then clipping
>>>> it. The results of the clip are always missing one of the scalars  
>>>> associated
>>>> with the second data set that I highlighted before applying the  
>>>> group
>>>> filter. This only seems to happen if one of the data sets has  
>>>> multiple
>>>> scalars or vectors associated with it -- if they each only have  
>>>> one, nothing
>>>> is lost in the clip. (ParaView 3.4 and CVS, OS X 10.5.6 and  
>>>> Windows XP
>>>> 32-bit, no MPI)
>>>>
>>>> I originally saw this with my own data, but I am able to easily  
>>>> replicate
>>>> this by creating two point sources. I apply the Elevation filter  
>>>> to the
>>>> first. Then, to the second I apply Brownian Vectors, plus a  
>>>> Calculator that
>>>> computes the magnitude of those vectors. If I highlight Elevation  
>>>> and then
>>>> Calculator, then Group and Clip, I lose the vector magnitude  
>>>> scalar at the
>>>> Clip stage. If I highlight the Calculator and then the Elevation,  
>>>> then Group
>>>> and Clip, I lose the elevation scalar.
>>>>
>>>> Please let me know if anyone has any ideas about where this could  
>>>> be coming
>>>> from.
>>>>
>>>> Thanks a lot,
>>>> -Eric
>>>>
>>>> ------------------------------------------------------
>>>> Eric E Monson
>>>> Duke Visualization Technology Group
>>>>
>>>>
>>>> _______________________________________________
>>>> ParaView mailing list
>>>> ParaView at paraview.org
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>
>
> -- 
> John Biddiscombe,                            email:biddisco @ cscs.ch
> http://www.cscs.ch/
> 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