[vtkusers] vtkVertexGlyphFilter display issue

Alex Southern mrapsouthern at gmail.com
Thu Aug 5 08:03:22 EDT 2010


David,

Yes this example works fine for me, but my own does not as yet...

Thanks
Alex

On 5.8.2010 14:44, David Doria wrote:
> On Thu, Aug 5, 2010 at 7:25 AM, Alex Southern<mrapsouthern at gmail.com>  wrote:
>    
>> Hi,
>>
>> Im trying to display a very large number of points, except for dome reson
>> the points are not visible, can somebody help me with this?
>>
>> double dx = some number;
>>
>> // Assign Points to vtkPoints list
>>     vtkSmartPointer<vtkPoints>  points = vtkSmartPointer<vtkPoints>::New();
>>
>>     for (int k = 0; k<  H; k++)
>>     {
>>         for (int j = 0; j<  W; j++)
>>         {
>>             for (int i = 0; i<  L; i++)
>>             {
>>                 points->InsertNextPoint((i*dx),(j*dx),(k*dx));
>>             }
>>         }
>>     }
>>
>>     // Use the points to form poly data
>>     vtkSmartPointer<vtkPolyData>  pointsPolydata =
>> vtkSmartPointer<vtkPolyData>::New();
>>     pointsPolydata->SetPoints(points);
>>
>>     vtkSmartPointer<vtkVertexGlyphFilter>  vertexGlyphFilter =
>> vtkSmartPointer<vtkVertexGlyphFilter>::New();
>>     vertexGlyphFilter->AddInput(pointsPolydata);
>>     vertexGlyphFilter->Update();
>>
>>     vtkPolyData* vertexPolyData = vertexGlyphFilter->GetOutput();
>>
>>     vtkSmartPointer<vtkPolyDataMapper>  meshMapper =
>> vtkSmartPointer<vtkPolyDataMapper>::New();
>>     meshMapper->SetInput(vertexPolyData);
>>
>>     vtkSmartPointer<vtkActor>  meshActor = vtkSmartPointer<vtkActor>::New();
>>     meshActor->SetMapper(meshMapper);
>>
>>      // The renderer and interactor have been setup correctly elsewhere....
>>     ren1->AddActor(meshActor);
>>     iren->Render();
>>      
> Just as another data point - does this example work properly for you?
>
> http://www.vtk.org/Wiki/VTK/Examples/Filters/vtkVertexGlyphFilter
>
> Thanks,
>
> David
>    




More information about the vtkusers mailing list