VTK
dox/Filters/General/vtkSplitColumnComponents.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSplitColumnComponents.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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00039 #ifndef __vtkSplitColumnComponents_h
00040 #define __vtkSplitColumnComponents_h
00041 
00042 #include "vtkFiltersGeneralModule.h" // For export macro
00043 #include "vtkTableAlgorithm.h"
00044 
00045 class vtkStdString;
00046 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
00047 {
00048 public:
00049   static vtkSplitColumnComponents* New();
00050   vtkTypeMacro(vtkSplitColumnComponents,vtkTableAlgorithm);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   vtkSetMacro(CalculateMagnitudes, bool);
00057   vtkGetMacro(CalculateMagnitudes, bool);
00059 
00060   enum
00061     {
00062     NUMBERS_WITH_PARENS = 0,    // e.g Points (0)
00063     NAMES_WITH_PARENS = 1,      // e.g. Points (X)
00064     NUMBERS_WITH_UNDERSCORES=2, // e.g. Points_0
00065     NAMES_WITH_UNDERSCORES=3    // e.g. Points_X
00066     };
00067 
00069 
00070   vtkSetClampMacro(NamingMode, int, NUMBERS_WITH_PARENS, NAMES_WITH_UNDERSCORES);
00071   void SetNamingModeToNumberWithParens()
00072     { this->SetNamingMode(NUMBERS_WITH_PARENS); }
00073   void SetNamingModeToNumberWithUnderscores()
00074     { this->SetNamingMode(NUMBERS_WITH_UNDERSCORES); }
00075   void SetNamingModeToNamesWithParens()
00076     { this->SetNamingMode(NAMES_WITH_PARENS); }
00077   void SetNamingModeToNamesWithUnderscores()
00078     { this->SetNamingMode(NAMES_WITH_UNDERSCORES); }
00079   vtkGetMacro(NamingMode, int);
00081 
00082 protected:
00083   vtkSplitColumnComponents();
00084   ~vtkSplitColumnComponents();
00085 
00088   vtkStdString GetComponentLabel(vtkAbstractArray* array, int component_no);
00089 
00090   bool CalculateMagnitudes;
00091 
00092   int RequestData(
00093     vtkInformation*,
00094     vtkInformationVector**,
00095     vtkInformationVector*);
00096 
00097   int NamingMode;
00098 private:
00099   vtkSplitColumnComponents(const vtkSplitColumnComponents&); // Not implemented
00100   void operator=(const vtkSplitColumnComponents&);   // Not implemented
00101 };
00102 
00103 #endif