VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkProjectSphereFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProjectSphereFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
25 #ifndef __vtkProjectSphereFilter_h
26 #define __vtkProjectSphereFilter_h
27 
28 #include "vtkFiltersGeometryModule.h" // For export macro
29 #include "vtkPointSetAlgorithm.h"
30 
31 class vtkCell;
32 class vtkCellArray;
33 class vtkDataSetAttributes;
34 class vtkIdList;
35 class vtkIncrementalPointLocator;
36 class vtkUnstructuredGrid;
37 
38 class VTKFILTERSGEOMETRY_EXPORT vtkProjectSphereFilter :
39  public vtkPointSetAlgorithm
40 {
41 public:
42  vtkTypeMacro(vtkProjectSphereFilter, vtkPointSetAlgorithm);
43  virtual void PrintSelf(ostream &os, vtkIndent indent);
44 
45  static vtkProjectSphereFilter *New();
46 
48 
49  vtkSetVector3Macro(Center,double);
50  vtkGetVectorMacro(Center,double,3);
52 
54 
56  vtkGetMacro(KeepPolePoints, bool);
57  vtkSetMacro(KeepPolePoints, bool);
58  vtkBooleanMacro(KeepPolePoints, bool);
60 
62 
65  vtkGetMacro(TranslateZ, bool);
66  vtkSetMacro(TranslateZ, bool);
67  vtkBooleanMacro(TranslateZ, bool);
69 
70 protected:
73 
74  virtual int FillInputPortInformation(int port, vtkInformation *info);
75 
76  virtual int RequestData(vtkInformation *, vtkInformationVector **,
77  vtkInformationVector *);
78 
79  void TransformPointInformation(vtkPointSet* input, vtkPointSet* output, vtkIdList*);
80  void TransformCellInformation(vtkPointSet* input, vtkPointSet* output, vtkIdList*);
81  void TransformTensors(vtkIdType id, double* coord, vtkDataSetAttributes* arrays);
82 
84 
87  virtual void ComputePointsClosestToCenterLine(double, vtkIdList*)
88  {}
90 
93  virtual double GetZTranslation(vtkPointSet* input);
94 
96 
98  void SplitCell( vtkPointSet* input, vtkPointSet* output, vtkIdType inputCellId,
99  vtkIncrementalPointLocator* locator, vtkCellArray* connectivity,
100  int splitSide);
102 
103  void SetCellInformation(
104  vtkUnstructuredGrid* output, vtkCell* cell, vtkIdType numberOfNewCells);
105 
106 private:
107  vtkProjectSphereFilter(const vtkProjectSphereFilter &); // Not implemented
108  void operator=(const vtkProjectSphereFilter &); // Not implemented
109 
110  double Center[3];
111  const double SplitLongitude;
112  bool KeepPolePoints;
113  bool TranslateZ;
114 };
115 
116 #endif // __vtkProjectSphereFilter_h
virtual void ComputePointsClosestToCenterLine(double, vtkIdList *)
A filter to 'unroll' a sphere. The unroll longitude is -180.