[vtkusers] No vector data defined

ivan gm ivan.gm.itk at gmail.com
Fri May 30 05:22:46 EDT 2008


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080530/e072bda2/attachment.htm>


More information about the vtkusers mailing list