[vtkusers] vtkTransformFilter is broken in vtk4.2.1 ?
Steve Kirstukas
sjk60 at iastate.edu
Wed Mar 5 16:14:10 EST 2003
There seems to be a difference in the way fields are handled by the transform
filter between vtk4.0 and 4.2.1.
Here is some code that looks at the field before and after the transform (which
is just the identity matrix)....
/////// code ////////
aTransform->Print( cout );
uGrid->GetFieldData()->Print( cout );
vtkTransformFilter *transFilter = vtkTransformFilter::New();
transFilter->SetInput( uGrid );
transFilter->SetTransform( aTransform );
transFilter->Update();
transFilter->GetUnstructuredGridOutput()->GetFieldData()->Print( cout );
/////// end of code ////////
If I build with vtk4.0, no problem - the field is there after the transform...
vtkTransform (0x1049ec50)
Debug: Off
Modified Time: 2
Reference Count: 1
Registered Events: (none)
Inverse: (0x0)
Matrix: (0x1049ed70)
Debug: Off
Modified Time: 857
Reference Count: 1
Registered Events: (none)
Elements:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Input: (0x0)
InverseFlag: 0
NumberOfConcatenatedTransforms: 0
DoublePoint: ( 0, 0, 0, 0)
Point: ( 0, 0, 0, 0)
vtkFieldData (0x104a93f0)
Debug: Off
Modified Time: 853
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 3
Array 0 name = total-pressure
Array 1 name = density
Array 2 name = velocity-magnitude
Number Of Components: 3
Number Of Tuples: 20
vtkFieldData (0x104ab6a8)
Debug: Off
Modified Time: 1126
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 3
Array 0 name = total-pressure
Array 1 name = density
Array 2 name = velocity-magnitude
Number Of Components: 3
Number Of Tuples: 20
But if I build with vtk4.2.1, the field is lost...
vtkTransform (0x10493f80)
Debug: Off
Modified Time: 2
Reference Count: 1
Registered Events: (none)
Inverse: (0x0)
Matrix: (0x10496860)
Debug: Off
Modified Time: 1619
Reference Count: 1
Registered Events: (none)
Elements:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Input: (0x0)
InverseFlag: 0
NumberOfConcatenatedTransforms: 0
DoublePoint: ( 0, 0, 0, 0)
Point: ( 0, 0, 0, 0)
vtkFieldData (0x104b7ee8)
Debug: Off
Modified Time: 1589
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 3
Array 0 name = total-pressure
Array 1 name = density
Array 2 name = velocity-magnitude
Number Of Components: 3
Number Of Tuples: 20
vtkFieldData (0x104cc550)
Debug: Off
Modified Time: 2121
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Do I have to do anything different in vtk4.2.1 to prevent losing the field?
Thanks, Steve
More information about the vtkusers
mailing list