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:
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 
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:40
vtkVolumeOutlineSource::CroppingRegionFlags
int CroppingRegionFlags
Definition: vtkVolumeOutlineSource.h:133
vtkVolumeOutlineSource::ComputePipelineMTime
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, int requestFromOutputPort, vtkMTimeType *mtime)
A special version of ProcessRequest meant specifically for the pipeline modified time request.
vtkVolumeOutlineSource::VolumeMapper
vtkVolumeMapper * VolumeMapper
Definition: vtkVolumeOutlineSource.h:124
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:50
vtkVolumeOutlineSource::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkVolumeOutlineSource::New
static vtkVolumeOutlineSource * New()
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
outline of volume cropping region
Definition: vtkVolumeOutlineSource.h:42
vtkVolumeOutlineSource::Cropping
int Cropping
Definition: vtkVolumeOutlineSource.h:132
vtkVolumeOutlineSource::vtkVolumeOutlineSource
vtkVolumeOutlineSource()
vtkVolumeOutlineSource::GenerateScalars
int GenerateScalars
Definition: vtkVolumeOutlineSource.h:125
vtkVolumeOutlineSource::GenerateLines
static void GenerateLines(vtkCellArray *lines, vtkUnsignedCharArray *scalars, unsigned char colors[2][3], int activePlane, int flags, int tolPtId[3][4])
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkPolyDataAlgorithm.h
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkVolumeOutlineSource::GetVolumeMapper
vtkVolumeMapper * GetVolumeMapper()
Definition: vtkVolumeOutlineSource.h:56
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkVolumeOutlineSource::GenerateFaces
int GenerateFaces
Definition: vtkVolumeOutlineSource.h:127
vtkVolumeOutlineSource::GenerateOutline
int GenerateOutline
Definition: vtkVolumeOutlineSource.h:126
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.
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:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkVolumeOutlineSource::~vtkVolumeOutlineSource
~vtkVolumeOutlineSource()
vtkVolumeOutlineSource::GeneratePoints
static void GeneratePoints(vtkPoints *points, vtkCellArray *lines, vtkCellArray *polys, double planes[3][4], double tol)
vtkVolumeOutlineSource::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkVolumeOutlineSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45