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:
41  static vtkVolumeOutlineSource *New();
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:
119  ~vtkVolumeOutlineSource() override;
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 
152  static void GeneratePoints(vtkPoints *points,
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 
171  int RequestInformation(vtkInformation* request,
172  vtkInformationVector** inputVector,
173  vtkInformationVector* outputVector) override;
174 
175  int RequestData(vtkInformation* request,
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:39
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:46
vtkVolumeOutlineSource::GenerateScalars
vtkTypeBool GenerateScalars
Definition: vtkVolumeOutlineSource.h:122
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkVolumeOutlineSource::GenerateFaces
vtkTypeBool GenerateFaces
Definition: vtkVolumeOutlineSource.h:124
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkX3D::Color
Definition: vtkX3D.h:46
vtkVolumeOutlineSource
outline of volume cropping region
Definition: vtkVolumeOutlineSource.h:38
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVolumeOutlineSource::Cropping
int Cropping
Definition: vtkVolumeOutlineSource.h:129
vtkPolyDataAlgorithm.h
vtkX3D::points
Definition: vtkX3D.h:446
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
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:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkVolumeOutlineSource::ActivePlaneId
int ActivePlaneId
Definition: vtkVolumeOutlineSource.h:125
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkAlgorithm::ComputePipelineMTime
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.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44