VTK
vtkVolumeOutlineSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVolumeOutlineSource.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 =========================================================================*/
32 #ifndef __vtkVolumeOutlineSource_h
33 #define __vtkVolumeOutlineSource_h
34 
35 #include "vtkPolyDataAlgorithm.h"
36 
37 class vtkVolumeMapper;
38 
40 {
41 public:
42  static vtkVolumeOutlineSource *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
50  virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
51  vtkVolumeMapper *GetVolumeMapper() { return this->VolumeMapper; };
53 
55 
58  vtkSetMacro(GenerateScalars, int);
59  vtkBooleanMacro(GenerateScalars, int);
60  vtkGetMacro(GenerateScalars, int);
62 
64 
66  vtkSetMacro(GenerateOutline, int);
67  vtkBooleanMacro(GenerateOutline, int);
68  vtkGetMacro(GenerateOutline, int);
70 
72 
75  vtkSetMacro(GenerateFaces, int);
76  vtkBooleanMacro(GenerateFaces, int);
77  vtkGetMacro(GenerateFaces, int);
79 
81 
83  vtkSetVector3Macro(Color, double);
84  vtkGetVector3Macro(Color, double);
86 
88 
91  vtkSetMacro(ActivePlaneId, int);
92  vtkGetMacro(ActivePlaneId, int);
94 
96 
99  vtkSetVector3Macro(ActivePlaneColor, double);
100  vtkGetVector3Macro(ActivePlaneColor, double);
102 
103 protected:
106 
112  double Color[3];
113  double ActivePlaneColor[3];
114 
115  int Cropping;
117  double Bounds[6];
118  double CroppingRegionPlanes[6];
119 
120  static int ComputeCubePlanes(double planes[3][4],
121  double croppingPlanes[6],
122  double bounds[6]);
123 
124  static void GeneratePolys(vtkCellArray *polys,
125  vtkUnsignedCharArray *scalars,
126  unsigned char colors[2][3],
127  int activePlane,
128  int flags,
129  int tolPtId[3][4]);
130 
131  static void GenerateLines(vtkCellArray *lines,
132  vtkUnsignedCharArray *scalars,
133  unsigned char colors[2][3],
134  int activePlane,
135  int flags,
136  int tolPtId[3][4]);
137 
138  static void GeneratePoints(vtkPoints *points,
139  vtkCellArray *lines,
140  vtkCellArray *polys,
141  double planes[3][4],
142  double tol);
143 
144  static void NudgeCropPlanesToBounds(int tolPtId[3][4],
145  double planes[3][4],
146  double tol);
147 
148  static void CreateColorValues(unsigned char colors[2][3],
149  double color1[3], double color2[3]);
150 
151  virtual int ComputePipelineMTime(vtkInformation* request,
152  vtkInformationVector** inputVector,
153  vtkInformationVector* outputVector,
154  int requestFromOutputPort,
155  unsigned long* mtime);
156 
157  virtual int RequestInformation(vtkInformation* request,
158  vtkInformationVector** inputVector,
159  vtkInformationVector* outputVector);
160 
161  virtual int RequestData(vtkInformation* request,
162  vtkInformationVector** inputVector,
163  vtkInformationVector* outputVector);
164 
165 private:
166  vtkVolumeOutlineSource(const vtkVolumeOutlineSource&); // Not implemented.
167  void operator=(const vtkVolumeOutlineSource&); // Not implemented.
168 };
169 
170 #endif