1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkImageVariance3D.h,v $
6 Date: $Date: 2002/01/22 15:33:40 $
7 Version: $Revision: 1.23 $
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 vtkImageVariance3D - Variance in a neighborhood.
19 // .SECTION Description
20 // vtkImageVariance3D replaces each pixel with a measurement of
21 // pixel variance in a elliptical neighborhood centered on that pixel.
22 // The value computed is not exactly the variance.
23 // The difference between the neighbor values and center value is computed
24 // and squared for each neighbor. These values are summed and divided by
25 // the total number of neighbors to produce the output value.
28 #ifndef __vtkImageVariance3D_h
29 #define __vtkImageVariance3D_h
32 #include "vtkImageSpatialFilter.h"
34 class vtkImageEllipsoidSource;
36 class VTK_IMAGING_EXPORT vtkImageVariance3D : public vtkImageSpatialFilter
39 static vtkImageVariance3D *New();
40 vtkTypeRevisionMacro(vtkImageVariance3D,vtkImageSpatialFilter);
41 void PrintSelf(ostream& os, vtkIndent indent);
44 // This method sets the size of the neighborhood. It also sets the default
45 // middle of the neighborhood and computes the Elliptical foot print.
46 void SetKernelSize(int size0, int size1, int size2);
50 ~vtkImageVariance3D();
52 vtkImageEllipsoidSource *Ellipse;
54 void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
55 void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
56 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
57 int extent[6], int id);
59 vtkImageVariance3D(const vtkImageVariance3D&); // Not implemented.
60 void operator=(const vtkImageVariance3D&); // Not implemented.