[vtkusers] Problem with vtkStreamLine and VectorData

Tobias Moench the.guzzer at uni.de
Wed Jun 8 03:39:45 EDT 2005


Hi vtk-experts,

I'm experimenting with vtk for some weeks. The last thing i tried was the 
visualization of diffusion data using vtkStreamLine. 
Using vtk4.4 (the last main-release i think) i got it working.
My data is a vtkImageData with 3 scalar components for each voxel. First i had 
the problem that this data was not recognized as a vector field. Some 
searching in the mailing list brought me to this solution:


....
vtkAssignAttribute *aa = vtkAssignAttribute::New();
aa->SetInput(image);
aa->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::VECTORS,
           vtkAssignAttribute::POINT_DATA);

vtkStreamLine *streamers = vtkStreamLine::New();
streamers->SetInput(aa->GetOutput());
....

(note that "image" is my vtkImageData, a 3-dimensional dataset with 3 scalar 
components for each voxel)


Yesterday i updated to the latest cvs-version of vtk and now the streamlines 
don't work anymore. i have change nothing in my code, but vtk gives me the 
message "... No vector data defined!"

What am i doing wrong? Any idea what could solve my problem?

Thanks a lot,
Tobias Moench




More information about the vtkusers mailing list