VTK  9.3.20240425
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
22#include "vtkRenderingVolumeModule.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkVolumeMapper;
26
27class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
28{
29public:
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
106protected:
109
115 double Color[3];
116 double ActivePlaneColor[3];
117
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
145 vtkInformationVector* outputVector) override;
146
147private:
149 void operator=(const vtkVolumeOutlineSource&) = delete;
150};
151
152VTK_ABI_NAMESPACE_END
153#endif
object to represent cell connectivity
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
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)
static vtkVolumeOutlineSource * New()
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
~vtkVolumeOutlineSource() override
static void NudgeCropPlanesToBounds(int tolPtId[3][4], double planes[3][4], double tol)
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270