ParaView
vtkHybridProbeFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkHybridProbeFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkHybridProbeFilter_h
32 #define vtkHybridProbeFilter_h
33 
34 #include "vtkDataObjectAlgorithm.h"
35 #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
36 
37 class vtkUnstructuredGrid;
38 
39 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkHybridProbeFilter : public vtkDataObjectAlgorithm
40 {
41 public:
42  static vtkHybridProbeFilter* New();
43  vtkTypeMacro(vtkHybridProbeFilter, vtkDataObjectAlgorithm);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
46  enum ModeType
47  {
49  EXTRACT_CELL_CONTAINING_LOCATION
50  };
51 
52  vtkSetClampMacro(Mode, int, INTERPOLATE_AT_LOCATION, EXTRACT_CELL_CONTAINING_LOCATION);
53  vtkGetMacro(Mode, int);
54  void SetModeToInterpolateAtLocation() { this->SetMode(INTERPOLATE_AT_LOCATION); }
55  void SetModeToExtractCellContainingLocation() { this->SetMode(EXTRACT_CELL_CONTAINING_LOCATION); }
56 
58 
61  vtkSetVector3Macro(Location, double);
62  vtkGetVector3Macro(Location, double);
64 
65 protected:
68 
69  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
70  virtual int FillInputPortInformation(int port, vtkInformation* info);
71  virtual int FillOutputPortInformation(int port, vtkInformation* info);
72 
73  bool InterpolateAtLocation(vtkDataObject* input, vtkUnstructuredGrid* output);
74  bool ExtractCellContainingLocation(vtkDataObject* input, vtkUnstructuredGrid* output);
75 
76  double Location[3];
77  int Mode;
78 
79 private:
80  vtkHybridProbeFilter(const vtkHybridProbeFilter&) VTK_DELETE_FUNCTION;
81  void operator=(const vtkHybridProbeFilter&) VTK_DELETE_FUNCTION;
82 };
83 
84 #endif
vtkHybridProbeFilter is a combination of vtkExtractSelection at a specific location and vtkProbeFilte...
void SetModeToExtractCellContainingLocation()