[vtkusers] vtkImageGradient??

Wesley Smith wesley.hoke at gmail.com
Thu Feb 7 23:08:42 EST 2008

vtkImageGradient outputs a vtkImageData.

gradient = vtkImageGradient::new();
vtkImageData * data = gradient->GetOutput();

int *dim = data->GetDimensions(); /// program crashes at this line
when imagegradient passes data to image data it doesn't set scalar values
or create appropriate data fields.

All I need to do is get the scalar gradient values and assign them as vectors to
an image data.
Any experience with vtkImageGradient would help.

More information about the vtkusers mailing list