[vtkusers] No vector data defined
Mohammad Nazrul Islam
int64380 at stud.uni-stuttgart.de
Fri May 30 11:52:49 EDT 2008
could you please send the header of your data file? Because I was facing the same problem for a long time and finally I solved it.If your data file is in vtk format then I can help you.
thanks.
Mohammad
---------- Original Message ----------------------------------
From: "ivan gm" <ivan.gm.itk at gmail.com>
Date: Fri, 30 May 2008 11:22:46 +0200
>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.
>
>
>
More information about the vtkusers
mailing list