[vtkusers] Re: BUG: Vector Name lost after transform

Berk Geveci berk.geveci at kitware.com
Wed Apr 2 09:16:01 EST 2003


I can fix this. However, it is not a bug. The output vectors
are not the same as the input vectors, since they have been
transformed. Of course, it is debatable whether this changes
the nature of the vectors but it is not required that the filter
keeps the name. As far as the other differences input and output
go (copy flags, reference counts), they are normal.

-Berk

nb: Please send your messages to the VTK mailing list (feel free
to CC me) since there might be others who can benefit from
the answers.


On Wed, 2003-04-02 at 08:04, Doug McCorkle wrote:
> Thanks for the reply and for committing the fixes.
> I downloaded the nightly vtk release on April 1.
> With the new version many problems disappeared.
> However, one problem was still evident...
> 
> 
> Symptom: Vector Name lost after transform
> 
> ////////////// sample code //////////////
> vtkTransform * transform = vtkTransform::New();
> transform->Scale( 10, 10, 10 );
> 
> cout << "\nprinting pointset..." << endl;
> pointset->Print( cout );
> 
> vtkTransformFilter * transFilter = vtkTransformFilter::New();
> transFilter->SetInput( pointset );
> transFilter->SetTransform( transform );
> 
> cout << "\nprinting transFilter->GetOutput()..." << endl;
> transFilter->GetOutput()->Update();
> transFilter->GetOutput()->Print( cout );
> 
> ////////////// code output //////////////
> printing pointset...
> vtkUnstructuredGrid (0x1027a810)
> <...>
>   Point Data:
>     Debug: Off
>     Modified Time: 2148
>     Reference Count: 1
>     Registered Events: (none)
>     Number Of Arrays: 2
>     Array 0 name = custom_scalars_name
>     Array 1 name = custom_vectors_name
>     Number Of Components: 4
>     Number Of Tuples: 80
>     Copy Flags: ( 1 1 1 1 1 )
>     Scalars: 
>       Debug: Off
>       Modified Time: 2143
>       Reference Count: 1
>       Registered Events: (none)
>       Name: custom_scalars_name
> <...>
>     Vectors: 
> <...>
>       Name: custom_vectors_name
> <...>
> 
> printing transFilter->GetOutput()...
> vtkUnstructuredGrid (0x1026e498)
> <...>
>   Point Data:
>     Debug: Off
>     Modified Time: 2718
>     Reference Count: 1
>     Registered Events: (none)
>     Number Of Arrays: 2
>     Array 0 name = NULL
>     Array 1 name = custom_scalars_name
>     Number Of Components: 4
>     Number Of Tuples: 80
>     Copy Flags: ( 1 0 1 1 1 )
>     Scalars: 
>       Debug: Off
>       Modified Time: 2143
>       Reference Count: 2
>       Registered Events: (none)
>       Name: custom_scalars_name
> <...>
>     Vectors: 
> <...>
>       Name: (none)
> <...>
> 
> 
> Key differences between outputs...
> - Array 0 name being set to NULL after the transform
> - Copy Flags array contains a zero on the transformed Point Data
> - Reference Count Number is 2 on the transformed scalar
> - Vector Name is NULL on the transformed vector
> 






More information about the vtkusers mailing list