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 "vtkRenderingVolumeModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 class vtkVolumeMapper;
39 
41 {
42 public:
43  static vtkVolumeOutlineSource *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
51  virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
52  vtkVolumeMapper *GetVolumeMapper() { return this->VolumeMapper; };
54 
56 
59  vtkSetMacro(GenerateScalars, int);
60  vtkBooleanMacro(GenerateScalars, int);
61  vtkGetMacro(GenerateScalars, int);
63 
65 
67  vtkSetMacro(GenerateOutline, int);
68  vtkBooleanMacro(GenerateOutline, int);
69  vtkGetMacro(GenerateOutline, int);
71 
73 
76  vtkSetMacro(GenerateFaces, int);
77  vtkBooleanMacro(GenerateFaces, int);
78  vtkGetMacro(GenerateFaces, int);
80 
82 
84  vtkSetVector3Macro(Color, double);
85  vtkGetVector3Macro(Color, double);
87 
89 
92  vtkSetMacro(ActivePlaneId, int);
93  vtkGetMacro(ActivePlaneId, int);
95 
97 
100  vtkSetVector3Macro(ActivePlaneColor, double);
101  vtkGetVector3Macro(ActivePlaneColor, double);
103 
104 protected:
107 
113  double Color[3];
114  double ActivePlaneColor[3];
115 
116  int Cropping;
118  double Bounds[6];
119  double CroppingRegionPlanes[6];
120 
121  static int ComputeCubePlanes(double planes[3][4],
122  double croppingPlanes[6],
123  double bounds[6]);
124 
125  static void GeneratePolys(vtkCellArray *polys,
126  vtkUnsignedCharArray *scalars,
127  unsigned char colors[2][3],
128  int activePlane,
129  int flags,
130  int tolPtId[3][4]);
131 
132  static void GenerateLines(vtkCellArray *lines,
133  vtkUnsignedCharArray *scalars,
134  unsigned char colors[2][3],
135  int activePlane,
136  int flags,
137  int tolPtId[3][4]);
138 
139  static void GeneratePoints(vtkPoints *points,
140  vtkCellArray *lines,
141  vtkCellArray *polys,
142  double planes[3][4],
143  double tol);
144 
145  static void NudgeCropPlanesToBounds(int tolPtId[3][4],
146  double planes[3][4],
147  double tol);
148 
149  static void CreateColorValues(unsigned char colors[2][3],
150  double color1[3], double color2[3]);
151 
152  virtual int ComputePipelineMTime(vtkInformation* request,
153  vtkInformationVector** inputVector,
154  vtkInformationVector* outputVector,
155  int requestFromOutputPort,
156  unsigned long* mtime);
157 
158  virtual int RequestInformation(vtkInformation* request,
159  vtkInformationVector** inputVector,
160  vtkInformationVector* outputVector);
161 
162  virtual int RequestData(vtkInformation* request,
163  vtkInformationVector** inputVector,
164  vtkInformationVector* outputVector);
165 
166 private:
167  vtkVolumeOutlineSource(const vtkVolumeOutlineSource&); // Not implemented.
168  void operator=(const vtkVolumeOutlineSource&); // Not implemented.
169 };
170 
171 #endif
Abstract class for a volume mapper.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKRENDERINGVOLUME_EXPORT
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
outline of volume cropping region
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime)
vtkVolumeMapper * GetVolumeMapper()
represent and manipulate 3D points
Definition: vtkPoints.h:38