[vtkusers] fill vtkImageData in 3D
David Doria
daviddoria at gmail.com
Fri Jan 7 07:43:29 EST 2011
On Fri, Jan 7, 2011 at 5:56 AM, kwayeke <bigvision82 at yahoo.com> wrote:
>
> How can one fill out a 3D vtkImageData. I tried the following code in in my
> program below but it did not work
> double* pixel = static_cast<double*>(ImageData->GetScalarPointer(k,j,i));
> pixel[i] = pix;
> The program itself is below.
> Many Thanks
If it is a scalar image, I think you want to change
pixel[i] = pix;
to
pixel[0] = pix;
David
More information about the vtkusers
mailing list