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
Post a Comment