c++ - VTK 3D Volume Rendering from Memory -


i going render 3d data, 1 dimensional array. data precomputed in same program visualization. data represents uniform 3d grid. each cell of grid consists of vector.

gridsize = dx * dy * dz * 3 

how can visualize array without copying vtk? please, provide short sequence of vtk invocation .

how this?

int dx = 10, dy = 10, dz = 10;  vtksmartpointer <vtkimagedata> image =   vtksmartpointer <vtkimagedata>::new(); image->setdimensions(dx, dy, dz); image->allocatescalars(vtk_double, 3);  double * grid = reinterpret_cast<double*>(image->getscalarpointer()); populate(grid,dx,dy,dz); 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -