VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkVectorNorm.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 =========================================================================*/ 00032 #ifndef __vtkVectorNorm_h 00033 #define __vtkVectorNorm_h 00034 00035 #define VTK_ATTRIBUTE_MODE_DEFAULT 0 00036 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1 00037 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2 00038 00039 #include "vtkFiltersCoreModule.h" // For export macro 00040 #include "vtkDataSetAlgorithm.h" 00041 00042 class VTKFILTERSCORE_EXPORT vtkVectorNorm : public vtkDataSetAlgorithm 00043 { 00044 public: 00045 vtkTypeMacro(vtkVectorNorm,vtkDataSetAlgorithm); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 static vtkVectorNorm *New(); 00050 00052 00053 vtkSetMacro(Normalize,int); 00054 vtkGetMacro(Normalize,int); 00055 vtkBooleanMacro(Normalize,int); 00057 00059 00065 vtkSetMacro(AttributeMode,int); 00066 vtkGetMacro(AttributeMode,int); 00067 void SetAttributeModeToDefault() 00068 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT);}; 00069 void SetAttributeModeToUsePointData() 00070 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);}; 00071 void SetAttributeModeToUseCellData() 00072 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_CELL_DATA);}; 00073 const char *GetAttributeModeAsString(); 00075 00076 protected: 00077 vtkVectorNorm(); 00078 ~vtkVectorNorm() {} 00079 00080 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00081 00082 int Normalize; // normalize 0<=n<=1 if true. 00083 int AttributeMode; //control whether to use point or cell data, or both 00084 private: 00085 vtkVectorNorm(const vtkVectorNorm&); // Not implemented. 00086 void operator=(const vtkVectorNorm&); // Not implemented. 00087 }; 00088 00089 #endif