/usr/include/vtk-5.8/vtkVolumeOutlineSource.h is in libvtk5-dev 5.8.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkVolumeOutlineSource.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkVolumeOutlineSource - outline of volume cropping region
// .SECTION Description
// vtkVolumeOutlineSource generates a wireframe outline that corresponds
// to the cropping region of a vtkVolumeMapper. It requires a
// vtkVolumeMapper as input. The GenerateFaces option turns on the
// solid faces of the outline, and the GenerateScalars option generates
// color scalars. When GenerateScalars is on, it is possible to set
// an "ActivePlaneId" value in the range [0..6] to highlight one of the
// six cropping planes.
// .SECTION Thanks
// Thanks to David Gobbi for contributing this class to VTK.
#ifndef __vtkVolumeOutlineSource_h
#define __vtkVolumeOutlineSource_h
#include "vtkPolyDataAlgorithm.h"
class vtkVolumeMapper;
class VTK_VOLUMERENDERING_EXPORT vtkVolumeOutlineSource : public vtkPolyDataAlgorithm
{
public:
static vtkVolumeOutlineSource *New();
vtkTypeMacro(vtkVolumeOutlineSource,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set the mapper that has the cropping region that the outline will
// be generated for. The mapper must have an input, because the
// bounds of the data must be computed in order to generate the
// outline.
virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
vtkVolumeMapper *GetVolumeMapper() { return this->VolumeMapper; };
// Description:
// Set whether to generate color scalars for the output. By default,
// the output has no scalars and the color must be set in the
// property of the actor.
vtkSetMacro(GenerateScalars, int);
vtkBooleanMacro(GenerateScalars, int);
vtkGetMacro(GenerateScalars, int);
// Description:
// Set whether to generate an outline wherever an input face was
// cut by a plane. This is on by default.
vtkSetMacro(GenerateOutline, int);
vtkBooleanMacro(GenerateOutline, int);
vtkGetMacro(GenerateOutline, int);
// Description:
// Set whether to generate polygonal faces for the output. By default,
// only lines are generated. The faces will form a closed, watertight
// surface.
vtkSetMacro(GenerateFaces, int);
vtkBooleanMacro(GenerateFaces, int);
vtkGetMacro(GenerateFaces, int);
// Description:
// Set the color of the outline. This has no effect unless GenerateScalars
// is On. The default color is red.
vtkSetVector3Macro(Color, double);
vtkGetVector3Macro(Color, double);
// Description:
// Set the active plane, e.g. to display which plane is currently being
// modified by an interaction. Set this to -1 if there is no active plane.
// The default value is -1.
vtkSetMacro(ActivePlaneId, int);
vtkGetMacro(ActivePlaneId, int);
// Description:
// Set the color of the active cropping plane. This has no effect unless
// GenerateScalars is On and ActivePlaneId is non-negative. The default
// color is yellow.
vtkSetVector3Macro(ActivePlaneColor, double);
vtkGetVector3Macro(ActivePlaneColor, double);
protected:
vtkVolumeOutlineSource();
~vtkVolumeOutlineSource();
vtkVolumeMapper *VolumeMapper;
int GenerateScalars;
int GenerateOutline;
int GenerateFaces;
int ActivePlaneId;
double Color[3];
double ActivePlaneColor[3];
int Cropping;
int CroppingRegionFlags;
double Bounds[6];
double CroppingRegionPlanes[6];
static int ComputeCubePlanes(double planes[3][4],
double croppingPlanes[6],
double bounds[6]);
static void GeneratePolys(vtkCellArray *polys,
vtkUnsignedCharArray *scalars,
unsigned char colors[2][3],
int activePlane,
int flags,
int tolPtId[3][4]);
static void GenerateLines(vtkCellArray *lines,
vtkUnsignedCharArray *scalars,
unsigned char colors[2][3],
int activePlane,
int flags,
int tolPtId[3][4]);
static void GeneratePoints(vtkPoints *points,
vtkCellArray *lines,
vtkCellArray *polys,
double planes[3][4],
double tol);
static void NudgeCropPlanesToBounds(int tolPtId[3][4],
double planes[3][4],
double tol);
static void CreateColorValues(unsigned char colors[2][3],
double color1[3], double color2[3]);
virtual int ComputePipelineMTime(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector,
int requestFromOutputPort,
unsigned long* mtime);
virtual int RequestInformation(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
virtual int RequestData(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
private:
vtkVolumeOutlineSource(const vtkVolumeOutlineSource&); // Not implemented.
void operator=(const vtkVolumeOutlineSource&); // Not implemented.
};
#endif
|