/usr/include/vtk-7.1/vtkRendererSource.h is in libvtk7-dev 7.1.1+dfsg1-2.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkRendererSource.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.
=========================================================================*/
/**
* @class vtkRendererSource
* @brief take a renderer's image and/or depth map into the pipeline
*
*
* vtkRendererSource is a source object whose input is a renderer's image
* and/or depth map, which is then used to produce an output image. This
* output can then be used in the visualization pipeline. You must explicitly
* send a Modify() to this object to get it to reload its data from the
* renderer. Consider also using vtkWindowToImageFilter instead of this
* class.
*
* By default, the data placed into the output is the renderer's image RGB
* values (these color scalars are represented by unsigned chars, one per
* color channel). Optionally, you can also grab the image depth (e.g.,
* z-buffer) values, and include it in the output in one of three ways. 1)
* First, when the data member DepthValues is enabled, a separate float array
* of these depth values is included in the output point data with array name
* "ZBuffer". 2) If DepthValuesInScalars is enabled, then the z-buffer values
* are shifted and scaled to fit into an unsigned char and included in the
* output image (so the output image pixels are four components RGBZ). Note
* that DepthValues and and DepthValuesInScalars can be enabled
* simultaneously if desired. Finally 3) if DepthValuesOnly is enabled, then
* the output image consists only of the z-buffer values represented by a
* single component float array; and the data members DepthValues and
* DepthValuesInScalars are ignored.
*
* @sa
* vtkWindowToImageFilter vtkRendererPointCloudSource vtkRenderer
* vtkImageData vtkDepthImageToPointCloud
*/
#ifndef vtkRendererSource_h
#define vtkRendererSource_h
#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkAlgorithm.h"
#include "vtkImageData.h" // makes things a bit easier
class vtkRenderer;
class VTKRENDERINGCORE_EXPORT vtkRendererSource : public vtkAlgorithm
{
public:
static vtkRendererSource *New();
vtkTypeMacro(vtkRendererSource, vtkAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
/**
* Return the MTime also considering the Renderer.
*/
vtkMTimeType GetMTime();
/**
* Indicates what renderer to get the pixel data from.
*/
void SetInput(vtkRenderer*);
//@{
/**
* Returns which renderer is being used as the source for the pixel data.
*/
vtkGetObjectMacro(Input, vtkRenderer);
//@}
//@{
/**
* Use the entire RenderWindow as a data source or just the Renderer.
* The default is zero, just the Renderer.
*/
vtkSetMacro(WholeWindow, int);
vtkGetMacro(WholeWindow, int);
vtkBooleanMacro(WholeWindow, int);
//@}
//@{
/**
* If this flag is on, then filter execution causes a render first.
*/
vtkSetMacro(RenderFlag, int);
vtkGetMacro(RenderFlag, int);
vtkBooleanMacro(RenderFlag, int);
//@}
//@{
/**
* A boolean value to control whether to grab z-buffer
* (i.e., depth values) along with the image data. The z-buffer data
* is placed into a field data attributes named "ZBuffer" .
*/
vtkSetMacro(DepthValues, int);
vtkGetMacro(DepthValues, int);
vtkBooleanMacro(DepthValues, int);
//@}
//@{
/**
* A boolean value to control whether to grab z-buffer
* (i.e., depth values) along with the image data. The z-buffer data
* is placed in the scalars as a fourth Z component (shift and scaled
* to map the full 0..255 range).
*/
vtkSetMacro(DepthValuesInScalars, int);
vtkGetMacro(DepthValuesInScalars, int);
vtkBooleanMacro(DepthValuesInScalars, int);
//@}
//@{
/**
* A boolean value to control whether to grab only the z-buffer (i.e.,
* depth values) without the associated image (color scalars) data. If
* enabled, the output data contains only a depth image which is the
* z-buffer values represented by float values. By default, this is
* disabled. Note that if enabled, then the DepthValues and
* DepthValuesInScalars are ignored.
*/
vtkSetMacro(DepthValuesOnly, int);
vtkGetMacro(DepthValuesOnly, int);
vtkBooleanMacro(DepthValuesOnly, int);
//@}
/**
* Get the output data object for a port on this algorithm.
*/
vtkImageData* GetOutput();
/**
* see vtkAlgorithm for details
*/
virtual int ProcessRequest(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
protected:
vtkRendererSource();
~vtkRendererSource();
void RequestData(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
virtual void RequestInformation (vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
vtkRenderer *Input;
int WholeWindow;
int RenderFlag;
int DepthValues;
int DepthValuesInScalars;
int DepthValuesOnly;
// see algorithm for more info
virtual int FillOutputPortInformation(int port, vtkInformation* info);
private:
vtkRendererSource(const vtkRendererSource&) VTK_DELETE_FUNCTION;
void operator=(const vtkRendererSource&) VTK_DELETE_FUNCTION;
};
#endif
|