VTK  9.3.0
vtkVolumeOutlineSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkVolumeOutlineSource_h
19 #define vtkVolumeOutlineSource_h
20 
21 #include "vtkPolyDataAlgorithm.h"
22 #include "vtkRenderingVolumeModule.h" // For export macro
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkVolumeMapper;
26 
27 class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
41  virtual void SetVolumeMapper(vtkVolumeMapper* mapper);
42  vtkVolumeMapper* GetVolumeMapper() { return this->VolumeMapper; }
44 
46 
51  vtkSetMacro(GenerateScalars, vtkTypeBool);
52  vtkBooleanMacro(GenerateScalars, vtkTypeBool);
53  vtkGetMacro(GenerateScalars, vtkTypeBool);
55 
57 
61  vtkSetMacro(GenerateOutline, vtkTypeBool);
62  vtkBooleanMacro(GenerateOutline, vtkTypeBool);
63  vtkGetMacro(GenerateOutline, vtkTypeBool);
65 
67 
72  vtkSetMacro(GenerateFaces, vtkTypeBool);
73  vtkBooleanMacro(GenerateFaces, vtkTypeBool);
74  vtkGetMacro(GenerateFaces, vtkTypeBool);
76 
78 
82  vtkSetVector3Macro(Color, double);
83  vtkGetVector3Macro(Color, double);
85 
87 
92  vtkSetMacro(ActivePlaneId, int);
93  vtkGetMacro(ActivePlaneId, int);
95 
97 
102  vtkSetVector3Macro(ActivePlaneColor, double);
103  vtkGetVector3Macro(ActivePlaneColor, double);
105 
106 protected:
109 
115  double Color[3];
116  double ActivePlaneColor[3];
117 
118  int Cropping;
120  double Bounds[6];
121  double CroppingRegionPlanes[6];
122 
123  static int ComputeCubePlanes(double planes[3][4], double croppingPlanes[6], double bounds[6]);
124 
125  static void GeneratePolys(vtkCellArray* polys, vtkUnsignedCharArray* scalars,
126  unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4]);
127 
128  static void GenerateLines(vtkCellArray* lines, vtkUnsignedCharArray* scalars,
129  unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4]);
130 
131  static void GeneratePoints(
132  vtkPoints* points, vtkCellArray* lines, vtkCellArray* polys, double planes[3][4], double tol);
133 
134  static void NudgeCropPlanesToBounds(int tolPtId[3][4], double planes[3][4], double tol);
135 
136  static void CreateColorValues(unsigned char colors[2][3], double color1[3], double color2[3]);
137 
139  vtkInformationVector* outputVector, int requestFromOutputPort, vtkMTimeType* mtime) override;
140 
142  vtkInformationVector* outputVector) override;
143 
144  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
145  vtkInformationVector* outputVector) override;
146 
147 private:
149  void operator=(const vtkVolumeOutlineSource&) = delete;
150 };
151 
152 VTK_ABI_NAMESPACE_END
153 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:176
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:29
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()
Set the mapper that has the cropping region that the outline will be generated for.
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:46
@ points
Definition: vtkX3D.h:446
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270