OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkImageVariance3D.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkImageVariance3D.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:33:40 $
7   Version:   $Revision: 1.23 $
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 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.
26
27
28 #ifndef __vtkImageVariance3D_h
29 #define __vtkImageVariance3D_h
30
31
32 #include "vtkImageSpatialFilter.h"
33
34 class vtkImageEllipsoidSource;
35
36 class VTK_IMAGING_EXPORT vtkImageVariance3D : public vtkImageSpatialFilter
37 {
38 public:
39   static vtkImageVariance3D *New();
40   vtkTypeRevisionMacro(vtkImageVariance3D,vtkImageSpatialFilter);
41   void PrintSelf(ostream& os, vtkIndent indent);
42   
43   // Description:
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);
47   
48 protected:
49   vtkImageVariance3D();
50   ~vtkImageVariance3D();
51
52   vtkImageEllipsoidSource *Ellipse;
53     
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);
58 private:
59   vtkImageVariance3D(const vtkImageVariance3D&);  // Not implemented.
60   void operator=(const vtkImageVariance3D&);  // Not implemented.
61 };
62
63 #endif
64
65
66