[vtkusers] BUG: Vector Name lost after transform

Doug McCorkle mccdo at iastate.edu
Wed Apr 2 08:04:39 EST 2003


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