I have a 3 dimensional array(named V). it contains voxel information. Where ever there is a voxel present, the value of V[i][j][k] is 1. where ever there is no voxel present, the value of V[i][j][k] is 0 I want to visualise this shape using VTK.
i have written this code:
MyVTKPointPlotter pointPlotter;
for(int i=0;i<x_count;i++)
{
for(int j=0;j<y_count;j++)
{
for(int k=0;k<z_count;k++)
{
if(V[i][j][k] != 0)
{
pointPlotter.PlotPoint(i,j,k,128,128,128);
}
}
}
}
Note: the functions MyVTKPointPlotter are all obtained from this link: http://nawigacjarobota.googlecode.com/svn-history/r10/trunk/wykObMAT/myVTKPointPlotter.cpp
The problem in this code is that all the points are getting plotted but the rendering is extremely slow. Also the points are 2 dimentional points and hence they do not have thickness. So when i rotate my object, i can see points with no thickness(the points are seen as disks).
Can anyone tell me how to visualise this 3D shape?