VTK  9.0.2
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 =========================================================================*/
30 #ifndef vtkVolumeOutlineSource_h
31 #define vtkVolumeOutlineSource_h
32 
33 #include "vtkPolyDataAlgorithm.h"
34 #include "vtkRenderingVolumeModule.h" // For export macro
35 
36 class vtkVolumeMapper;
37 
38 class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
52  virtual void SetVolumeMapper(vtkVolumeMapper* mapper);
53  vtkVolumeMapper* GetVolumeMapper() { return this->VolumeMapper; }
55 
57 
62  vtkSetMacro(GenerateScalars, vtkTypeBool);
63  vtkBooleanMacro(GenerateScalars, vtkTypeBool);
64  vtkGetMacro(GenerateScalars, vtkTypeBool);
66 
68 
72  vtkSetMacro(GenerateOutline, vtkTypeBool);
73  vtkBooleanMacro(GenerateOutline, vtkTypeBool);
74  vtkGetMacro(GenerateOutline, vtkTypeBool);
76 
78 
83  vtkSetMacro(GenerateFaces, vtkTypeBool);
84  vtkBooleanMacro(GenerateFaces, vtkTypeBool);
85  vtkGetMacro(GenerateFaces, vtkTypeBool);
87 
89 
93  vtkSetVector3Macro(Color, double);
94  vtkGetVector3Macro(Color, double);
96 
98 
103  vtkSetMacro(ActivePlaneId, int);
104  vtkGetMacro(ActivePlaneId, int);
106 
108 
113  vtkSetVector3Macro(ActivePlaneColor, double);
114  vtkGetVector3Macro(ActivePlaneColor, double);
116 
117 protected:
120 
126  double Color[3];
127  double ActivePlaneColor[3];
128 
129  int Cropping;
131  double Bounds[6];
132  double CroppingRegionPlanes[6];
133 
134  static int ComputeCubePlanes(double planes[3][4], double croppingPlanes[6], double bounds[6]);
135 
136  static void GeneratePolys(vtkCellArray* polys, vtkUnsignedCharArray* scalars,
137  unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4]);
138 
139  static void GenerateLines(vtkCellArray* lines, vtkUnsignedCharArray* scalars,
140  unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4]);
141 
142  static void GeneratePoints(
143  vtkPoints* points, vtkCellArray* lines, vtkCellArray* polys, double planes[3][4], double tol);
144 
145  static void NudgeCropPlanesToBounds(int tolPtId[3][4], double planes[3][4], double tol);
146 
147  static void CreateColorValues(unsigned char colors[2][3], double color1[3], double color2[3]);
148 
150  vtkInformationVector* outputVector, int requestFromOutputPort, vtkMTimeType* mtime) override;
151 
153  vtkInformationVector* outputVector) override;
154 
155  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
156  vtkInformationVector* outputVector) override;
157 
158 private:
160  void operator=(const vtkVolumeOutlineSource&) = delete;
161 };
162 
163 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:180
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:34
Superclass for algorithms that produce only polydata as output.
dynamic, self-adjusting array of unsigned char
Abstract class for a volume mapper.
outline of volume cropping region
int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, int requestFromOutputPort, vtkMTimeType *mtime) override
A special version of ProcessRequest meant specifically for the pipeline modified time request.
static int ComputeCubePlanes(double planes[3][4], double croppingPlanes[6], double bounds[6])
vtkVolumeMapper * GetVolumeMapper()
static void GeneratePolys(vtkCellArray *polys, vtkUnsignedCharArray *scalars, unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4])
virtual void SetVolumeMapper(vtkVolumeMapper *mapper)
Set the mapper that has the cropping region that the outline will be generated for.
static void GenerateLines(vtkCellArray *lines, vtkUnsignedCharArray *scalars, unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4])
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void CreateColorValues(unsigned char colors[2][3], double color1[3], double color2[3])
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
static void GeneratePoints(vtkPoints *points, vtkCellArray *lines, vtkCellArray *polys, double planes[3][4], double tol)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
~vtkVolumeOutlineSource() override
static vtkVolumeOutlineSource * New()
static void NudgeCropPlanesToBounds(int tolPtId[3][4], double planes[3][4], double tol)
@ Color
Definition: vtkX3D.h:52
@ points
Definition: vtkX3D.h:452
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293