VTK  9.3.1
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:
30  static vtkVolumeOutlineSource* New();
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:
108  ~vtkVolumeOutlineSource() override;
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 
138  int ComputePipelineMTime(vtkInformation* request, vtkInformationVector** inputVector,
139  vtkInformationVector* outputVector, int requestFromOutputPort, vtkMTimeType* mtime) override;
140 
141  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
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
Abstract class for a volume mapper.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
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...
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for algorithms that produce only polydata as output.
outline of volume cropping region
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:175
Store zero or more vtkInformation instances.
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:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.