00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVectorNorm.h,v $ 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 =========================================================================*/ 00029 #ifndef __vtkVectorNorm_h 00030 #define __vtkVectorNorm_h 00031 00032 #define VTK_ATTRIBUTE_MODE_DEFAULT 0 00033 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1 00034 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2 00035 00036 #include "vtkDataSetToDataSetFilter.h" 00037 00038 class VTK_GRAPHICS_EXPORT vtkVectorNorm : public vtkDataSetToDataSetFilter 00039 { 00040 public: 00041 vtkTypeRevisionMacro(vtkVectorNorm,vtkDataSetToDataSetFilter); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 static vtkVectorNorm *New(); 00046 00048 00049 vtkSetMacro(Normalize,int); 00050 vtkGetMacro(Normalize,int); 00051 vtkBooleanMacro(Normalize,int); 00053 00055 00061 vtkSetMacro(AttributeMode,int); 00062 vtkGetMacro(AttributeMode,int); 00063 void SetAttributeModeToDefault() 00064 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT);}; 00065 void SetAttributeModeToUsePointData() 00066 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);}; 00067 void SetAttributeModeToUseCellData() 00068 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_CELL_DATA);}; 00069 const char *GetAttributeModeAsString(); 00071 00072 protected: 00073 vtkVectorNorm(); 00074 ~vtkVectorNorm() {}; 00075 00076 void Execute(); 00077 00078 int Normalize; // normalize 0<=n<=1 if true. 00079 int AttributeMode; //control whether to use point or cell data, or both 00080 private: 00081 vtkVectorNorm(const vtkVectorNorm&); // Not implemented. 00082 void operator=(const vtkVectorNorm&); // Not implemented. 00083 }; 00084 00085 #endif