VTK
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 "vtkRenderingVolumeModule.h" // For export macro
34 #include "vtkPolyDataAlgorithm.h"
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],
135  double croppingPlanes[6],
136  double bounds[6]);
137 
138  static void GeneratePolys(vtkCellArray *polys,
139  vtkUnsignedCharArray *scalars,
140  unsigned char colors[2][3],
141  int activePlane,
142  int flags,
143  int tolPtId[3][4]);
144 
145  static void GenerateLines(vtkCellArray *lines,
146  vtkUnsignedCharArray *scalars,
147  unsigned char colors[2][3],
148  int activePlane,
149  int flags,
150  int tolPtId[3][4]);
151 
153  vtkCellArray *lines,
154  vtkCellArray *polys,
155  double planes[3][4],
156  double tol);
157 
158  static void NudgeCropPlanesToBounds(int tolPtId[3][4],
159  double planes[3][4],
160  double tol);
161 
162  static void CreateColorValues(unsigned char colors[2][3],
163  double color1[3], double color2[3]);
164 
166  vtkInformationVector** inputVector,
167  vtkInformationVector* outputVector,
168  int requestFromOutputPort,
169  vtkMTimeType* mtime) override;
170 
172  vtkInformationVector** inputVector,
173  vtkInformationVector* outputVector) override;
174 
176  vtkInformationVector** inputVector,
177  vtkInformationVector* outputVector) override;
178 
179 private:
181  void operator=(const vtkVolumeOutlineSource&) = delete;
182 };
183 
184 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkVolumeOutlineSource::CroppingRegionFlags
int CroppingRegionFlags
Definition: vtkVolumeOutlineSource.h:130
vtkVolumeOutlineSource::VolumeMapper
vtkVolumeMapper * VolumeMapper
Definition: vtkVolumeOutlineSource.h:121
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:47
vtkVolumeOutlineSource::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkVolumeOutlineSource::GenerateScalars
vtkTypeBool GenerateScalars
Definition: vtkVolumeOutlineSource.h:122
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkVolumeOutlineSource::New
static vtkVolumeOutlineSource * New()
vtkVolumeOutlineSource::GenerateFaces
vtkTypeBool GenerateFaces
Definition: vtkVolumeOutlineSource.h:124
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkVolumeOutlineSource::ComputeCubePlanes
static int ComputeCubePlanes(double planes[3][4], double croppingPlanes[6], double bounds[6])
vtkX3D::Color
@ Color
Definition: vtkX3D.h:46
vtkVolumeOutlineSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVolumeOutlineSource
outline of volume cropping region
Definition: vtkVolumeOutlineSource.h:39
vtkVolumeOutlineSource::Cropping
int Cropping
Definition: vtkVolumeOutlineSource.h:129
vtkVolumeOutlineSource::vtkVolumeOutlineSource
vtkVolumeOutlineSource()
vtkVolumeOutlineSource::~vtkVolumeOutlineSource
~vtkVolumeOutlineSource() override
vtkVolumeOutlineSource::GenerateLines
static void GenerateLines(vtkCellArray *lines, vtkUnsignedCharArray *scalars, unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4])
vtkPolyDataAlgorithm.h
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkVolumeOutlineSource::GetVolumeMapper
vtkVolumeMapper * GetVolumeMapper()
Definition: vtkVolumeOutlineSource.h:53
vtkVolumeOutlineSource::GenerateOutline
vtkTypeBool GenerateOutline
Definition: vtkVolumeOutlineSource.h:123
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkVolumeOutlineSource::NudgeCropPlanesToBounds
static void NudgeCropPlanesToBounds(int tolPtId[3][4], double planes[3][4], double tol)
vtkVolumeOutlineSource::GeneratePolys
static void GeneratePolys(vtkCellArray *polys, vtkUnsignedCharArray *scalars, unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4])
vtkVolumeOutlineSource::CreateColorValues
static void CreateColorValues(unsigned char colors[2][3], double color1[3], double color2[3])
vtkVolumeOutlineSource::SetVolumeMapper
virtual void SetVolumeMapper(vtkVolumeMapper *mapper)
Set the mapper that has the cropping region that the outline will be generated for.
vtkVolumeOutlineSource::ActivePlaneId
int ActivePlaneId
Definition: vtkVolumeOutlineSource.h:125
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkVolumeOutlineSource::ComputePipelineMTime
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.
vtkVolumeOutlineSource::GeneratePoints
static void GeneratePoints(vtkPoints *points, vtkCellArray *lines, vtkCellArray *polys, double planes[3][4], double tol)
vtkVolumeOutlineSource::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45