File: vtkTransformCoordinateSystems.h

package info (click to toggle)
vtk7 7.1.1%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 127,396 kB
  • sloc: cpp: 1,539,584; ansic: 124,382; python: 78,038; tcl: 47,013; xml: 8,142; yacc: 5,040; java: 4,439; perl: 3,132; lex: 1,926; sh: 1,500; makefile: 126; objc: 83
file content (118 lines) | stat: -rw-r--r-- 3,982 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkTransformCoordinateSystems.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/**
 * @class   vtkTransformCoordinateSystems
 * @brief   transform points into different coordinate systems
 *
 * This filter transforms points from one coordinate system to another. The user
 * must specify the coordinate systems in which the input and output are
 * specified. The user must also specify the VTK viewport (i.e., renderer) in
 * which the transformation occurs.
 *
 * @sa
 * vtkCoordinate vtkTransformFilter vtkTransformPolyData vtkPolyDataMapper2D
*/

#ifndef vtkTransformCoordinateSystems_h
#define vtkTransformCoordinateSystems_h

#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkPointSetAlgorithm.h"
#include "vtkCoordinate.h" //to get the defines in vtkCoordinate

class VTKRENDERINGCORE_EXPORT vtkTransformCoordinateSystems : public vtkPointSetAlgorithm
{
public:
  //@{
  /**
   * Standard methods for type information and printing.
   */
  vtkTypeMacro(vtkTransformCoordinateSystems, vtkPointSetAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent);
  //@}

  /**
   * Instantiate this class. By default no transformation is specified and
   * the input and output is identical.
   */
  static vtkTransformCoordinateSystems *New();

  //@{
  /**
   * Set/get the coordinate system in which the input is specified.
   * The current options are World, Viewport, and Display. By default the
   * input coordinate system is World.
   */
  vtkSetMacro(InputCoordinateSystem, int);
  vtkGetMacro(InputCoordinateSystem, int);
  void SetInputCoordinateSystemToDisplay()
    { this->SetInputCoordinateSystem(VTK_DISPLAY); }
  void SetInputCoordinateSystemToViewport()
    { this->SetInputCoordinateSystem(VTK_VIEWPORT); }
  void SetInputCoordinateSystemToWorld()
    { this->SetInputCoordinateSystem(VTK_WORLD); }
  //@}

  //@{
  /**
   * Set/get the coordinate system to which to transform the output.
   * The current options are World, Viewport, and Display. By default the
   * output coordinate system is Display.
   */
  vtkSetMacro(OutputCoordinateSystem, int);
  vtkGetMacro(OutputCoordinateSystem, int);
  void SetOutputCoordinateSystemToDisplay()
    { this->SetOutputCoordinateSystem(VTK_DISPLAY); }
  void SetOutputCoordinateSystemToViewport()
    { this->SetOutputCoordinateSystem(VTK_VIEWPORT); }
  void SetOutputCoordinateSystemToWorld()
    { this->SetOutputCoordinateSystem(VTK_WORLD); }
  //@}

  /**
   * Return the MTime also considering the instance of vtkCoordinate.
   */
  vtkMTimeType GetMTime();

  //@{
  /**
   * In order for a successful coordinate transformation to occur, an
   * instance of vtkViewport (e.g., a VTK renderer) must be specified.
   * NOTE: this is a raw pointer, not a weak pointer nor a reference counted
   * object, to avoid reference cycle loop between rendering classes and filter
   * classes.
   */
  void SetViewport(vtkViewport* viewport);
  vtkGetObjectMacro(Viewport, vtkViewport);
  //@}

protected:
  vtkTransformCoordinateSystems();
  ~vtkTransformCoordinateSystems();

  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);

  int InputCoordinateSystem;
  int OutputCoordinateSystem;
  vtkViewport* Viewport;

  vtkCoordinate* TransformCoordinate;

private:
  vtkTransformCoordinateSystems(const vtkTransformCoordinateSystems&) VTK_DELETE_FUNCTION;
  void operator=(const vtkTransformCoordinateSystems&) VTK_DELETE_FUNCTION;
};

#endif