[vtkusers] About gradient

Tom binbin0112 at gmail.com
Fri Jun 19 14:54:10 EDT 2009


Dear all,
Does anyone have a experience to implemt one dimensional gradient of an 2D
image?
For example, I have a 2D image, and I wana get x-direction and y-direction
gradients of this image. Below is a sample code.
If u have any experience, plz show me.
--
vtkImageData *blurimg=vtkImageData::New();
    blurimg=GaussianSmooth->GetOutput();

    vtkImageGradient *imgGradient=vtkImageGradient::New();
    imgGradient->SetInput(blurimg);
    imgGradient->SetDimensionality(2);
--

Kind Regards,
 Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090619/f3c51f89/attachment.htm>


More information about the vtkusers mailing list