1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkImageGradient.h,v $
6 Date: $Date: 2003/01/09 19:21:05 $
7 Version: $Revision: 1.36 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkImageGradient - Computes the gradient vector.
19 // .SECTION Description
20 // vtkImageGradient computes the gradient vector of an image. The vector
21 // results are stored as scalar components. The Dimensionality determines
22 // whether to perform a 2d or 3d gradient. The default is two dimensional
23 // XY gradient. OutputScalarType is always float. Gradient is computed using
24 // central differences.
28 #ifndef __vtkImageGradient_h
29 #define __vtkImageGradient_h
32 #include "vtkImageToImageFilter.h"
34 class VTK_IMAGING_EXPORT vtkImageGradient : public vtkImageToImageFilter
37 static vtkImageGradient *New();
38 vtkTypeRevisionMacro(vtkImageGradient,vtkImageToImageFilter);
39 void PrintSelf(ostream& os, vtkIndent indent);
42 // Determines how the input is interpreted (set of 2d slices ...)
43 vtkSetClampMacro(Dimensionality,int,2,3);
44 vtkGetMacro(Dimensionality,int);
47 // If "HandleBoundariesOn" then boundary pixels are duplicated
48 // So central differences can get values.
49 vtkSetMacro(HandleBoundaries, int);
50 vtkGetMacro(HandleBoundaries, int);
51 vtkBooleanMacro(HandleBoundaries, int);
55 ~vtkImageGradient() {};
60 void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
61 void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
62 void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
63 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
64 int extent[6], int id);
66 vtkImageGradient(const vtkImageGradient&); // Not implemented.
67 void operator=(const vtkImageGradient&); // Not implemented.