VTK
dox/Imaging/vtkImageThresholdConnectivity.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageThresholdConnectivity.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00035 #ifndef __vtkImageThresholdConnectivity_h
00036 #define __vtkImageThresholdConnectivity_h
00037 
00038 #include "vtkImageAlgorithm.h"
00039 
00040 class vtkPoints;
00041 class vtkImageData;
00042 class vtkImageStencilData;
00043 
00044 class VTK_IMAGING_EXPORT vtkImageThresholdConnectivity :
00045   public vtkImageAlgorithm
00046 {
00047 public:
00048   static vtkImageThresholdConnectivity *New();
00049   vtkTypeMacro(vtkImageThresholdConnectivity, vtkImageAlgorithm);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00055   void SetSeedPoints(vtkPoints *points);
00056   vtkGetObjectMacro(SeedPoints, vtkPoints);
00058 
00060   void ThresholdByUpper(double thresh);
00061 
00063   void ThresholdByLower(double thresh);
00064 
00067   void ThresholdBetween(double lower, double upper);
00068 
00070 
00071   vtkSetMacro(ReplaceIn, int);
00072   vtkGetMacro(ReplaceIn, int);
00073   vtkBooleanMacro(ReplaceIn, int);
00075 
00077 
00079   void SetInValue(double val);
00080   vtkGetMacro(InValue, double);
00082 
00084 
00085   vtkSetMacro(ReplaceOut, int);
00086   vtkGetMacro(ReplaceOut, int);
00087   vtkBooleanMacro(ReplaceOut, int);
00089 
00091 
00093   void SetOutValue(double val);
00094   vtkGetMacro(OutValue, double);
00096 
00098 
00099   vtkGetMacro(UpperThreshold, double);
00100   vtkGetMacro(LowerThreshold, double);
00102 
00104 
00105   vtkSetVector2Macro(SliceRangeX, int);
00106   vtkGetVector2Macro(SliceRangeX, int);
00107   vtkSetVector2Macro(SliceRangeY, int);
00108   vtkGetVector2Macro(SliceRangeY, int);
00109   vtkSetVector2Macro(SliceRangeZ, int);
00110   vtkGetVector2Macro(SliceRangeZ, int);
00112 
00114 
00116   virtual void SetStencil(vtkImageStencilData *stencil);
00117   vtkImageStencilData *GetStencil();
00119 
00121 
00123   vtkSetMacro(ActiveComponent,int);
00124   vtkGetMacro(ActiveComponent,int);
00126 
00128 
00132   vtkSetVector3Macro(NeighborhoodRadius, double);
00133   vtkGetVector3Macro(NeighborhoodRadius, double);
00135 
00137 
00139   vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
00140   vtkGetMacro(NeighborhoodFraction, double);
00142 
00144   unsigned long GetMTime();
00145 
00147 
00149   vtkGetMacro(NumberOfInVoxels, int);
00151 
00152 protected:
00153   vtkImageThresholdConnectivity();
00154   ~vtkImageThresholdConnectivity();
00155 
00156   double UpperThreshold;
00157   double LowerThreshold;
00158   double InValue;
00159   double OutValue;
00160   int ReplaceIn;
00161   int ReplaceOut;
00162 
00163   double NeighborhoodRadius[3];
00164   double NeighborhoodFraction;
00165 
00166   vtkPoints *SeedPoints;
00167 
00168   int SliceRangeX[2];
00169   int SliceRangeY[2];
00170   int SliceRangeZ[2];
00171 
00172   int NumberOfInVoxels;
00173 
00174   int ActiveComponent;
00175 
00176   vtkImageData *ImageMask;
00177 
00178   void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00179 
00180   virtual int FillInputPortInformation(int port, vtkInformation *info);
00181   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
00182                                   vtkInformationVector *);
00183   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00184                           vtkInformationVector *);
00185 
00186 private:
00187   vtkImageThresholdConnectivity(const vtkImageThresholdConnectivity&);  // Not implemented.
00188   void operator=(const vtkImageThresholdConnectivity&);  // Not implemented.
00189 };
00190 
00191 #endif