[vtkusers] vtkAttributeDataToFieldDataFilter

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Apr 23 11:02:20 EDT 2004


John,

	You are perfectly right, this filter vtkAttributeDataToFieldDataFilter 
will be removed in the near future. If you are willing to contribute a 
patch to vtkAssigneAttribute to implement the:

  aa->Assign(NULL, vtkDataSetAttributes::SCALARS, 
vtkAttributeLocation::POINT_DATA);

	we'll be happy to review the code and merge it into VTK.

Regards,
Mathieu


John Platt wrote:
> Hi users,
> 
>  
> 
> I am trying to use vtkAttributeDataToFieldDataFilter to clear all the 
> attribute data but still retain the data arrays as cell or point field 
> data. Or in other words, set AttributeIndices[] to -1. I thought this 
> was the function of this filter, but the output appears to be just a 
> copy of the input - complete with the attributes unchanged. I tried 
> PassAttributeDataOff() but this had no effect. The method just appears 
> to set a dangling member variable.
> 
>  
> 
> Does anybody know what this filter should be used for? Google did turn 
> up a document stating this filter would be deprecated at version 4.0.
> 
>  
> 
> If it is deprecated, and there is no other filter to do this, is it 
> worth modifying vtkAssignAttribute so that something like
> 
>  
> 
> aa->Assign(NULL, vtkDataSetAttributes::SCALARS, 
> vtkAttributeLocation::POINT_DATA);
> 
>  
> 
> unassigns the current point scalars.
> 
>  
> 
> For the curious who are wondering why I want to do this, it is to 
> prevent vtkCutter::GenerateCutScalarsOn() from deleting the existing 
> input point scalars (this method must be called for cutting nonlinear 
> cells).
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> John.
> 
>  
> 
>  
> 






More information about the vtkusers mailing list