[vtkusers] Bug or feature in vtkRearrangeFields ?

Berk Geveci berk.geveci at kitware.com
Tue Apr 6 08:46:32 EDT 2004


Stop finding bugs on all my filters :-) Yes, they are all bugs.
Actually, more like a missing feature. Historically, the field data was
not passed by any filter. I added a few lines in the filter superclass
(vtkSource.cxx) to automatically pass input field data to the output
before Execute. However, this only works for filter that do not
initialize their output in Execute. The filters you describe call
CopyStructure() which in turn calls initialize. I will commit fixes for
those. If you are working with a release of VTK, just add these lines:

  if ( output->GetFieldData() && input->GetFieldData() )
    {
    output->GetFieldData()->PassData( input->GetFieldData() );
    }

before the other two PassData().
Thanks for the bug reports.

-Berk

On Tue, 2004-04-06 at 02:41, Roman Putanowicz wrote:
> Hi VTK Users, 
> 
> Well, I suspect but I am not sure :-)
> The behaviour of vtkRearrangeFields is very similar to the behaviour
> of the bugged vtkAssignAttribute.
> 
> As is vtkRearrangeFields passes only these arrays which were specified
> in AddOperation.
> 
> Here is example (script and data in attachement).
> Without vtkRearrangeFields output contains the following arrays:
> 
> Field data
>   density 
>   temperature 
>   subdomains 
>   material 
> Point data
> Cell data
> 
> After adding the vtkRearrangeFields filter (named arranger) and calling
>   arranger.AddOperation('MOVE', 'temperature', 'DATA_OBJECT', 'POINT_DATA')
> the output contains the following arrays:
> 
> Field data
> Point data
>   temperature 
> Cell data
>   
> In case of vtkRearrangeFields this may be intended behaviour to pass
> only those arrays which were explicitly selected for rearrangement
> but in fact I hope this is not the case and there is a bug :-)
> 
> Regards
> 
> Romek





More information about the vtkusers mailing list