OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkImageGradient.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkImageGradient.h,v $
5   Language:  C++
6   Date:      $Date: 2003/01/09 19:21:05 $
7   Version:   $Revision: 1.36 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
25
26
27
28 #ifndef __vtkImageGradient_h
29 #define __vtkImageGradient_h
30
31
32 #include "vtkImageToImageFilter.h"
33
34 class VTK_IMAGING_EXPORT vtkImageGradient : public vtkImageToImageFilter
35 {
36 public:
37   static vtkImageGradient *New();
38   vtkTypeRevisionMacro(vtkImageGradient,vtkImageToImageFilter);
39   void PrintSelf(ostream& os, vtkIndent indent);
40   
41   // Description:
42   // Determines how the input is interpreted (set of 2d slices ...)
43   vtkSetClampMacro(Dimensionality,int,2,3);
44   vtkGetMacro(Dimensionality,int);
45   
46   // Description:
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);
52
53 protected:
54   vtkImageGradient();
55   ~vtkImageGradient() {};
56
57   int HandleBoundaries;
58   int Dimensionality;
59   
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);
65 private:
66   vtkImageGradient(const vtkImageGradient&);  // Not implemented.
67   void operator=(const vtkImageGradient&);  // Not implemented.
68 };
69
70 #endif
71
72
73