[vtkusers] No vector data defined

Amy Squillacote ahs at cfdrc.com
Fri May 30 09:07:01 EDT 2008


Hi Ivan,

VTK is trying to tell you that it can't find a 3-component point-based 
array (point-based vectors) to use in computing streamlines. Does your 
input data set (this->temp3d) have such an array? If it does, then you 
can use the assign attribute filter to tell VTK that your 3-component 
array should be treated as vectors, but the warning message from 
vtkDataSetAttributes indicates, there will be problems if you try to use 
a single-component array as vectors because vectors are assumed to have 
three components.

- Amy

ivan gm wrote:
> Hello:
>
> I know there are lots of people who has the same problem as me but, 
> for my readings, nobody could solve it.
> I receive the following vtk error:
>
>     ERROR: In .\vtkStreamer.cxx, line 488
>     vtkStreamLine (0D92B060): No vector data defined!
>
> This is my code:
>
>             this->pvtkLine->SetInput(this->temp3d);
>             this->pvtkLine->SetSource(this->pvtkSeeds);
>             this->pvtkLine->SetMaximumPropagationTime(100);
>             this->pvtkLine->SetIntegrationStepLength(.2);
>             this->pvtkLine->SetStepLength(.001);
>             this->pvtkLine->SetNumberOfThreads(1);
>             this->pvtkLine->SetIntegrationDirectionToForward();
>             this->pvtkLine->VorticityOn();
>             this->pvtkLine->Update();
>
>             
> this->DistanceMapper->SetInputConnection(this->pvtkLine->GetOutputPort());
>             double tmp[2];
>             this->temp3d->GetScalarRange(tmp);
>             this->DistanceMapper->SetScalarRange(tmp[0], tmp[1]);
>             this->DistanceMapper->ImmediateModeRenderingOn();
>             this->DistanceMapper->Update();
>             this->DistanceActor->SetMapper(this->DistanceMapper);
>             this->DistanceActor->VisibilityOff();
>
>             this->BoneMapper->SetInput(this->temp3d);
>             this->BoneMapper->ImmediateModeRenderingOn();
>             this->BoneMapper->Update();
>             this->BoneActor->SetMapper(this->BoneMapper);
>             this->BoneActor->GetProperty()->SetColor(1.0, 1.0, 0.0);
>             this->BoneActor->GetProperty()->SetDiffuse(0.0);
>             this->BoneActor->GetProperty()->SetSpecular(1.0);
>             this->BoneActor->GetProperty()->SetSpecularPower(5);
>
> I could read that a possible solution is to add the vtkAssignAttribute 
> so I did it like this:
>
>             vtkAssignAttribute *aa = vtkAssignAttribute::New();
>             aa->Assign( vtkDataSetAttributes::SCALARS,
>                         vtkDataSetAttributes::VECTORS,
>                         vtkAssignAttribute::POINT_DATA );
>             aa->SetInput( this->temp3d );
>             aa->Update();
>             this->pvtkLine->SetInputConnection(aa->GetOutputPort());
> //            this->pvtkLine->SetInput(this->temp3d);
>             this->pvtkLine->SetSource(this->pvtkSeeds);
>             this->pvtkLine->SetMaximumPropagationTime(100);
>             this->pvtkLine->SetIntegrationStepLength(.2);
>             this->pvtkLine->SetStepLength(.001);
>             this->pvtkLine->SetNumberOfThreads(1);
>             this->pvtkLine->SetIntegrationDirectionToForward();
>             this->pvtkLine->VorticityOn();
>             this->pvtkLine->Update();
> ................
>
> But now I have another error:
>
>    Warning: In .\vtkDataSetAttributes.cxx, line 945
>    vtkPointData (0D9F6D00): Can not set attribute Vectors. Incorrect 
> number of components.
>
>    ERROR: In .\vtkStreamer.cxx, line 488
>    vtkStreamLine (0D92B060): No vector data defined!
>
> I can't understand what the problem, could anybody helps me!!??
>
> Thanks a lot. I need to solve it.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list