VTK
dox/Infovis/vtkApplyIcons.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkApplyIcons.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 -------------------------------------------------------------------------*/
00062 #ifndef __vtkApplyIcons_h
00063 #define __vtkApplyIcons_h
00064 
00065 #include "vtkPassInputTypeAlgorithm.h"
00066 #include "vtkVariant.h" // For variant arguments.
00067 
00068 class VTK_INFOVIS_EXPORT vtkApplyIcons : public vtkPassInputTypeAlgorithm 
00069 {
00070 public:
00071   static vtkApplyIcons *New();
00072   vtkTypeMacro(vtkApplyIcons, vtkPassInputTypeAlgorithm);
00073   void PrintSelf(ostream& os, vtkIndent indent);
00074 
00076 
00078   void SetIconType(vtkVariant v, int icon);
00079   void SetIconType(double v, int icon)
00080     { this->SetIconType(vtkVariant(v), icon); }
00081   void SetIconType(const char* v, int icon)
00082     { this->SetIconType(vtkVariant(v), icon); }
00083   void ClearAllIconTypes();
00085 
00087 
00089   vtkSetMacro(UseLookupTable, bool);
00090   vtkGetMacro(UseLookupTable, bool);
00091   vtkBooleanMacro(UseLookupTable, bool);
00093 
00095 
00097   vtkSetMacro(DefaultIcon, int);
00098   vtkGetMacro(DefaultIcon, int);
00100 
00102 
00104   vtkSetMacro(SelectedIcon, int);
00105   vtkGetMacro(SelectedIcon, int);
00107 
00109 
00111   vtkSetStringMacro(IconOutputArrayName);
00112   vtkGetStringMacro(IconOutputArrayName);
00114 
00115   //BTX
00116   enum
00117   {
00118     SELECTED_ICON,
00119     SELECTED_OFFSET,
00120     ANNOTATION_ICON,
00121     IGNORE_SELECTION
00122   };
00123   //ETX
00124 
00126 
00133   vtkSetMacro(SelectionMode, int);
00134   vtkGetMacro(SelectionMode, int);
00135   virtual void SetSelectionModeToSelectedIcon()
00136     { this->SetSelectionMode(SELECTED_ICON); }
00137   virtual void SetSelectionModeToSelectedOffset()
00138     { this->SetSelectionMode(SELECTED_OFFSET); }
00139   virtual void SetSelectionModeToAnnotationIcon()
00140     { this->SetSelectionMode(ANNOTATION_ICON); }
00141   virtual void SetSelectionModeToIgnoreSelection()
00142     { this->SetSelectionMode(IGNORE_SELECTION); }
00144 
00146 
00150   vtkSetMacro(AttributeType, int);
00151   vtkGetMacro(AttributeType, int);
00153 
00154 protected:
00155   vtkApplyIcons();
00156   ~vtkApplyIcons();
00157   
00159 
00160   int RequestData(
00161     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00163   
00165   int FillInputPortInformation(int port, vtkInformation* info);
00166 
00167   int DefaultIcon;
00168   int SelectedIcon;
00169   bool UseLookupTable;
00170   char* IconOutputArrayName;
00171   int SelectionMode;
00172   int AttributeType;
00173 
00174   //BTX
00175   class Internals;
00176   Internals* Implementation;
00177   //ETX
00178 
00179 private:
00180   vtkApplyIcons(const vtkApplyIcons&);  // Not implemented.
00181   void operator=(const vtkApplyIcons&);  // Not implemented.
00182 };
00183 
00184 #endif