VTK  9.1.0
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 =========================================================================*/
42 #ifndef vtkProjectSphereFilter_h
43 #define vtkProjectSphereFilter_h
44 
45 #include "vtkFiltersGeometryModule.h" // For export macro
46 #include "vtkPointSetAlgorithm.h"
47 
48 class vtkCell;
49 class vtkCellArray;
51 class vtkIdList;
54 
55 class VTKFILTERSGEOMETRY_EXPORT vtkProjectSphereFilter : public vtkPointSetAlgorithm
56 {
57 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
64 
67  vtkSetVector3Macro(Center, double);
68  vtkGetVectorMacro(Center, double, 3);
70 
72 
76  vtkGetMacro(KeepPolePoints, bool);
77  vtkSetMacro(KeepPolePoints, bool);
78  vtkBooleanMacro(KeepPolePoints, bool);
80 
82 
87  vtkGetMacro(TranslateZ, bool);
88  vtkSetMacro(TranslateZ, bool);
89  vtkBooleanMacro(TranslateZ, bool);
91 
92 protected:
95 
97 
99 
102  void TransformTensors(vtkIdType id, double* coord, vtkDataSetAttributes* arrays);
103 
109  virtual void ComputePointsClosestToCenterLine(double, vtkIdList*) {}
110 
115  virtual double GetZTranslation(vtkPointSet* input);
116 
121  void SplitCell(vtkPointSet* input, vtkPointSet* output, vtkIdType inputCellId,
122  vtkIncrementalPointLocator* locator, vtkCellArray* connectivity, int splitSide);
123 
124  void SetCellInformation(vtkUnstructuredGrid* output, vtkCell* cell, vtkIdType numberOfNewCells);
125 
126 private:
128  void operator=(const vtkProjectSphereFilter&) = delete;
129 
130  double Center[3];
131  const double SplitLongitude;
132  bool KeepPolePoints;
133  bool TranslateZ;
134 };
135 
136 #endif // vtkProjectSphereFilter_h
object to represent cell connectivity
Definition: vtkCellArray.h:290
abstract class to specify cell behavior
Definition: vtkCell.h:147
represent and manipulate attribute data in a dataset
list of point or cell ids
Definition: vtkIdList.h:140
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
concrete class for storing a set of points
Definition: vtkPointSet.h:106
A filter to 'unroll' a sphere.
void TransformCellInformation(vtkPointSet *input, vtkPointSet *output, vtkIdList *)
virtual double GetZTranslation(vtkPointSet *input)
If TranslateZ is true then this is the method that computes the amount to translate.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkProjectSphereFilter * New()
void TransformTensors(vtkIdType id, double *coord, vtkDataSetAttributes *arrays)
virtual void ComputePointsClosestToCenterLine(double, vtkIdList *)
Parallel part of the algorithm to figure out the closest point to the centerline (i....
void TransformPointInformation(vtkPointSet *input, vtkPointSet *output, vtkIdList *)
~vtkProjectSphereFilter() override
void SplitCell(vtkPointSet *input, vtkPointSet *output, vtkIdType inputCellId, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, int splitSide)
Split a cell into multiple cells because it stretches across the SplitLongitude.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetCellInformation(vtkUnstructuredGrid *output, vtkCell *cell, vtkIdType numberOfNewCells)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkIdType
Definition: vtkType.h:332