00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVectorNorm.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00048 #ifndef __vtkVectorNorm_h 00049 #define __vtkVectorNorm_h 00050 00051 #define VTK_ATTRIBUTE_MODE_DEFAULT 0 00052 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1 00053 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2 00054 00055 #include "vtkDataSetToDataSetFilter.h" 00056 00057 class VTK_GRAPHICS_EXPORT vtkVectorNorm : public vtkDataSetToDataSetFilter 00058 { 00059 public: 00060 vtkTypeRevisionMacro(vtkVectorNorm,vtkDataSetToDataSetFilter); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00064 static vtkVectorNorm *New(); 00065 00067 00068 vtkSetMacro(Normalize,int); 00069 vtkGetMacro(Normalize,int); 00070 vtkBooleanMacro(Normalize,int); 00072 00074 00080 vtkSetMacro(AttributeMode,int); 00081 vtkGetMacro(AttributeMode,int); 00082 void SetAttributeModeToDefault() 00083 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT);}; 00084 void SetAttributeModeToUsePointData() 00085 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);}; 00086 void SetAttributeModeToUseCellData() 00087 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_CELL_DATA);}; 00088 const char *GetAttributeModeAsString(); 00090 00091 protected: 00092 vtkVectorNorm(); 00093 ~vtkVectorNorm() {}; 00094 00095 void Execute(); 00096 00097 int Normalize; // normalize 0<=n<=1 if true. 00098 int AttributeMode; //control whether to use point or cell data, or both 00099 private: 00100 vtkVectorNorm(const vtkVectorNorm&); // Not implemented. 00101 void operator=(const vtkVectorNorm&); // Not implemented. 00102 }; 00103 00104 #endif