VTK  9.1.0
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
34#include "vtkRenderingVolumeModule.h" // For export macro
35
36class vtkVolumeMapper;
37
38class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
39{
40public:
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
117protected:
120
126 double Color[3];
127 double ActivePlaneColor[3];
128
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
156 vtkInformationVector* outputVector) override;
157
158private:
160 void operator=(const vtkVolumeOutlineSource&) = delete;
161};
162
163#endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:143
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)
@ Color
Definition: vtkX3D.h:52
@ points
Definition: vtkX3D.h:452
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287