1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkImageLaplacian.h 5 6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 All rights reserved. 8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 10 This software is distributed WITHOUT ANY WARRANTY; without even 11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 PURPOSE. See the above copyright notice for more information. 13 14 =========================================================================*/ 15 // .NAME vtkImageLaplacian - Computes divergence of gradient. 16 // .SECTION Description 17 // vtkImageLaplacian computes the Laplacian (like a second derivative) 18 // of a scalar image. The operation is the same as taking the 19 // divergence after a gradient. Boundaries are handled, so the input 20 // is the same as the output. 21 // Dimensionality determines how the input regions are interpreted. 22 // (images, or volumes). The Dimensionality defaults to two. 23 24 25 26 #ifndef vtkImageLaplacian_h 27 #define vtkImageLaplacian_h 28 29 30 #include "vtkImagingGeneralModule.h" // For export macro 31 #include "vtkThreadedImageAlgorithm.h" 32 33 class VTKIMAGINGGENERAL_EXPORT vtkImageLaplacian : public vtkThreadedImageAlgorithm 34 { 35 public: 36 static vtkImageLaplacian *New(); 37 vtkTypeMacro(vtkImageLaplacian,vtkThreadedImageAlgorithm); 38 void PrintSelf(ostream& os, vtkIndent indent); 39 40 // Description: 41 // Determines how the input is interpreted (set of 2d slices ...) 42 vtkSetClampMacro(Dimensionality,int,2,3); 43 vtkGetMacro(Dimensionality,int); 44 45 protected: 46 vtkImageLaplacian(); ~vtkImageLaplacian()47 ~vtkImageLaplacian() {} 48 49 int Dimensionality; 50 51 virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, 52 vtkInformationVector *); 53 void ThreadedRequestData(vtkInformation *request, 54 vtkInformationVector **inputVector, 55 vtkInformationVector *outputVector, 56 vtkImageData ***inData, vtkImageData **outData, 57 int outExt[6], int id); 58 59 private: 60 vtkImageLaplacian(const vtkImageLaplacian&); // Not implemented. 61 void operator=(const vtkImageLaplacian&); // Not implemented. 62 }; 63 64 #endif 65 66 67 68