VTK
dox/Graphics/vtkKdTreeSelector.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkKdTreeSelector.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 (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00030 #ifndef __vtkKdTreeSelector_h
00031 #define __vtkKdTreeSelector_h
00032 
00033 #include "vtkSelectionAlgorithm.h"
00034 
00035 class vtkKdTree;
00036 
00037 class VTK_GRAPHICS_EXPORT vtkKdTreeSelector : public vtkSelectionAlgorithm
00038 {
00039 public:
00040   static vtkKdTreeSelector* New();
00041   vtkTypeMacro(vtkKdTreeSelector, vtkSelectionAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00048   void SetKdTree(vtkKdTree* tree);
00049   vtkGetObjectMacro(KdTree, vtkKdTree);
00051 
00053 
00056   vtkSetVector6Macro(SelectionBounds, double);
00057   vtkGetVector6Macro(SelectionBounds, double);
00059 
00061 
00064   vtkSetStringMacro(SelectionFieldName);
00065   vtkGetStringMacro(SelectionFieldName);
00067 
00069 
00074   vtkSetMacro(SelectionAttribute, int);
00075   vtkGetMacro(SelectionAttribute, int);
00077 
00079 
00082   vtkSetMacro(SingleSelection, bool);
00083   vtkGetMacro(SingleSelection, bool);
00084   vtkBooleanMacro(SingleSelection, bool);
00086 
00088 
00091   vtkSetMacro(SingleSelectionThreshold, double);
00092   vtkGetMacro(SingleSelectionThreshold, double);
00094 
00095   unsigned long GetMTime();
00096 
00097 protected:
00098   vtkKdTreeSelector();
00099   ~vtkKdTreeSelector();
00100 
00101   vtkKdTree* KdTree;
00102   double SelectionBounds[6];
00103   char* SelectionFieldName;
00104   bool BuildKdTreeFromInput;
00105   bool SingleSelection;
00106   double SingleSelectionThreshold;
00107   int SelectionAttribute;
00108 
00109   virtual int FillInputPortInformation(
00110     int port, vtkInformation* info);
00111 
00112   int RequestData(
00113     vtkInformation*, 
00114     vtkInformationVector**, 
00115     vtkInformationVector*);
00116     
00117 private:
00118   vtkKdTreeSelector(const vtkKdTreeSelector&); // Not implemented
00119   void operator=(const vtkKdTreeSelector&);   // Not implemented
00120 };
00121 
00122 #endif
00123