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 =========================================================================*/
33 #ifndef vtkVolumeOutlineSource_h
34 #define vtkVolumeOutlineSource_h
35 
36 #include "vtkRenderingVolumeModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 
39 class vtkVolumeMapper;
40 
41 class VTKRENDERINGVOLUME_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
42 {
43 public:
44  static vtkVolumeOutlineSource *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
55  virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
56  vtkVolumeMapper *GetVolumeMapper() { return this->VolumeMapper; };
58 
60 
65  vtkSetMacro(GenerateScalars, int);
66  vtkBooleanMacro(GenerateScalars, int);
67  vtkGetMacro(GenerateScalars, int);
69 
71 
75  vtkSetMacro(GenerateOutline, int);
76  vtkBooleanMacro(GenerateOutline, int);
77  vtkGetMacro(GenerateOutline, int);
79 
81 
86  vtkSetMacro(GenerateFaces, int);
87  vtkBooleanMacro(GenerateFaces, int);
88  vtkGetMacro(GenerateFaces, int);
90 
92 
96  vtkSetVector3Macro(Color, double);
97  vtkGetVector3Macro(Color, double);
99 
101 
106  vtkSetMacro(ActivePlaneId, int);
107  vtkGetMacro(ActivePlaneId, int);
109 
111 
116  vtkSetVector3Macro(ActivePlaneColor, double);
117  vtkGetVector3Macro(ActivePlaneColor, double);
119 
120 protected:
123 
129  double Color[3];
130  double ActivePlaneColor[3];
131 
132  int Cropping;
134  double Bounds[6];
135  double CroppingRegionPlanes[6];
136 
137  static int ComputeCubePlanes(double planes[3][4],
138  double croppingPlanes[6],
139  double bounds[6]);
140 
141  static void GeneratePolys(vtkCellArray *polys,
142  vtkUnsignedCharArray *scalars,
143  unsigned char colors[2][3],
144  int activePlane,
145  int flags,
146  int tolPtId[3][4]);
147 
148  static void GenerateLines(vtkCellArray *lines,
149  vtkUnsignedCharArray *scalars,
150  unsigned char colors[2][3],
151  int activePlane,
152  int flags,
153  int tolPtId[3][4]);
154 
155  static void GeneratePoints(vtkPoints *points,
156  vtkCellArray *lines,
157  vtkCellArray *polys,
158  double planes[3][4],
159  double tol);
160 
161  static void NudgeCropPlanesToBounds(int tolPtId[3][4],
162  double planes[3][4],
163  double tol);
164 
165  static void CreateColorValues(unsigned char colors[2][3],
166  double color1[3], double color2[3]);
167 
168  virtual int ComputePipelineMTime(vtkInformation* request,
169  vtkInformationVector** inputVector,
170  vtkInformationVector* outputVector,
171  int requestFromOutputPort,
172  vtkMTimeType* mtime);
173 
174  virtual int RequestInformation(vtkInformation* request,
175  vtkInformationVector** inputVector,
176  vtkInformationVector* outputVector);
177 
178  virtual int RequestData(vtkInformation* request,
179  vtkInformationVector** inputVector,
180  vtkInformationVector* outputVector);
181 
182 private:
183  vtkVolumeOutlineSource(const vtkVolumeOutlineSource&) VTK_DELETE_FUNCTION;
184  void operator=(const vtkVolumeOutlineSource&) VTK_DELETE_FUNCTION;
185 };
186 
187 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkVolumeOutlineSource::CroppingRegionFlags
int CroppingRegionFlags
Definition: vtkVolumeOutlineSource.h:133
vtkVolumeOutlineSource::VolumeMapper
vtkVolumeMapper * VolumeMapper
Definition: vtkVolumeOutlineSource.h:124
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:49
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
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:41
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:132
vtkVolumeOutlineSource::GenerateScalars
int GenerateScalars
Definition: vtkVolumeOutlineSource.h:125
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
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:56
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkVolumeOutlineSource::GenerateFaces
int GenerateFaces
Definition: vtkVolumeOutlineSource.h:127
vtkVolumeOutlineSource::GenerateOutline
int GenerateOutline
Definition: vtkVolumeOutlineSource.h:126
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkVolumeOutlineSource::ActivePlaneId
int ActivePlaneId
Definition: vtkVolumeOutlineSource.h:128
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
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.
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44