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 =========================================================================*/
33 #ifndef vtkVolumeOutlineSource_h
34 #define vtkVolumeOutlineSource_h
35 
36 #include "vtkRenderingVolumeModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 
39 class vtkVolumeMapper;
40 
41 class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
42 {
43 public:
44  static vtkVolumeOutlineSource *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
55  virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
56  vtkVolumeMapper *GetVolumeMapper() { return this->VolumeMapper; };
58 
60 
65  vtkSetMacro(GenerateScalars, int);
66  vtkBooleanMacro(GenerateScalars, int);
67  vtkGetMacro(GenerateScalars, int);
69 
71 
75  vtkSetMacro(GenerateOutline, int);
76  vtkBooleanMacro(GenerateOutline, int);
77  vtkGetMacro(GenerateOutline, int);
79 
81 
86  vtkSetMacro(GenerateFaces, int);
87  vtkBooleanMacro(GenerateFaces, int);
88  vtkGetMacro(GenerateFaces, int);
90 
92 
96  vtkSetVector3Macro(Color, double);
97  vtkGetVector3Macro(Color, double);
99 
101 
106  vtkSetMacro(ActivePlaneId, int);
107  vtkGetMacro(ActivePlaneId, int);
109 
111 
116  vtkSetVector3Macro(ActivePlaneColor, double);
117  vtkGetVector3Macro(ActivePlaneColor, double);
119 
120 protected:
123 
129  double Color[3];
130  double ActivePlaneColor[3];
131 
132  int Cropping;
134  double Bounds[6];
135  double CroppingRegionPlanes[6];
136 
137  static int ComputeCubePlanes(double planes[3][4],
138  double croppingPlanes[6],
139  double bounds[6]);
140 
141  static void GeneratePolys(vtkCellArray *polys,
142  vtkUnsignedCharArray *scalars,
143  unsigned char colors[2][3],
144  int activePlane,
145  int flags,
146  int tolPtId[3][4]);
147 
148  static void GenerateLines(vtkCellArray *lines,
149  vtkUnsignedCharArray *scalars,
150  unsigned char colors[2][3],
151  int activePlane,
152  int flags,
153  int tolPtId[3][4]);
154 
155  static void GeneratePoints(vtkPoints *points,
156  vtkCellArray *lines,
157  vtkCellArray *polys,
158  double planes[3][4],
159  double tol);
160 
161  static void NudgeCropPlanesToBounds(int tolPtId[3][4],
162  double planes[3][4],
163  double tol);
164 
165  static void CreateColorValues(unsigned char colors[2][3],
166  double color1[3], double color2[3]);
167 
168  virtual int ComputePipelineMTime(vtkInformation* request,
169  vtkInformationVector** inputVector,
170  vtkInformationVector* outputVector,
171  int requestFromOutputPort,
172  vtkMTimeType* mtime);
173 
174  virtual int RequestInformation(vtkInformation* request,
175  vtkInformationVector** inputVector,
176  vtkInformationVector* outputVector);
177 
178  virtual int RequestData(vtkInformation* request,
179  vtkInformationVector** inputVector,
180  vtkInformationVector* outputVector);
181 
182 private:
183  vtkVolumeOutlineSource(const vtkVolumeOutlineSource&) VTK_DELETE_FUNCTION;
184  void operator=(const vtkVolumeOutlineSource&) VTK_DELETE_FUNCTION;
185 };
186 
187 #endif
Abstract class for a volume mapper.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
A special version of ProcessRequest meant specifically for the pipeline modified time request...
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
outline of volume cropping region
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of unsigned char
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:50
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkVolumeMapper * GetVolumeMapper()
Set the mapper that has the cropping region that the outline will be generated for.
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.