VTK
dox/Filters/Selection/vtkLinearSelector.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Visualization Toolkit
00004 Module:    $RCSfile: vtkCellDistanceFilter,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 =========================================================================*/
00033 #ifndef VTK_LINEAR_SELECTOR_H
00034 #define VTK_LINEAR_SELECTOR_H
00035 
00036 #include "vtkFiltersSelectionModule.h" // For export macro
00037 #include <vtkSelectionAlgorithm.h>
00038 
00039 class vtkAlgorithmOutput;
00040 class vtkDataSet;
00041 class vtkDoubleArray;
00042 class vtkIdTypeArray;
00043 class vtkPoints;
00044 
00045 class VTKFILTERSSELECTION_EXPORT vtkLinearSelector : public vtkSelectionAlgorithm
00046 {
00047  public:
00048   vtkTypeMacro(vtkLinearSelector,vtkSelectionAlgorithm);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00051   static vtkLinearSelector* New();
00052 
00054 
00055   vtkSetVector3Macro(StartPoint,double);
00056   vtkGetVectorMacro(StartPoint,double,3);
00058 
00060 
00061   vtkSetVector3Macro(EndPoint,double);
00062   vtkGetVectorMacro(EndPoint,double,3);
00064 
00066 
00067   virtual void SetPoints(vtkPoints*);
00068   vtkGetObjectMacro(Points,vtkPoints);
00070 
00072 
00073   vtkSetMacro(Tolerance,double);
00074   vtkGetMacro(Tolerance,double);
00076 
00078 
00079   vtkSetMacro(IncludeVertices,bool);
00080   vtkGetMacro(IncludeVertices,bool);
00081   vtkBooleanMacro(IncludeVertices,bool);
00083 
00085 
00086   vtkSetClampMacro(VertexEliminationTolerance,double,0.,.1 );
00087   vtkGetMacro(VertexEliminationTolerance,double);
00089 
00090  protected:
00091   vtkLinearSelector();
00092   virtual ~vtkLinearSelector();
00093 
00094   virtual int FillInputPortInformation(int port, vtkInformation *info);
00095 
00096   virtual int RequestData(vtkInformation *request,
00097                           vtkInformationVector **inputVector,
00098                           vtkInformationVector *outputVector);
00099 
00102   void SeekIntersectingCells(vtkDataSet* input, vtkIdTypeArray* outIndices);
00103 
00104  private:
00105   vtkLinearSelector(const vtkLinearSelector&);  // Not implemented
00106   void operator =(const vtkLinearSelector&); // Not implemented
00107 
00109 
00111   double StartPoint[3];
00112   double EndPoint[3];
00114 
00117   vtkPoints* Points;
00118 
00120   double Tolerance;
00121 
00123   bool IncludeVertices;
00124 
00126 
00127   double VertexEliminationTolerance;
00128 };
00130 
00131 
00132 #endif   // VTK_LINEAR_SELECTOR_H