/usr/include/vtk-6.3/vtkImageSliceMapper.h is in libvtk6-dev 6.3.0+dfsg1-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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkImageSliceMapper.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 vtkImageSliceMapper - map a slice of a vtkImageData to the screen
// .SECTION Description
// vtkImageSliceMapper is a mapper that will draw a 2D image, or a slice
// of a 3D image. For 3D images, the slice may be oriented in the X, Y,
// or Z direction. This mapper works via 2D textures with accelerated
// zoom and pan operations.
// .SECTION Thanks
// Thanks to David Gobbi at the Seaman Family MR Centre and Dept. of Clinical
// Neurosciences, Foothills Medical Centre, Calgary, for providing this class.
// .SECTION See also
// vtkImageSlice vtkImageProperty vtkImageResliceMapper
#ifndef vtkImageSliceMapper_h
#define vtkImageSliceMapper_h
#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkImageMapper3D.h"
class vtkCamera;
class vtkPoints;
class VTKRENDERINGCORE_EXPORT vtkImageSliceMapper : public vtkImageMapper3D
{
public:
static vtkImageSliceMapper *New();
vtkTypeMacro(vtkImageSliceMapper,vtkImageMapper3D);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// The slice to display, if there are multiple slices.
virtual void SetSliceNumber(int slice);
virtual int GetSliceNumber();
// Description
// Use GetSliceNumberMinValue() and GetSliceNumberMaxValue()
// to get the range of allowed slices. These methods call
// UpdateInformation as a side-effect.
virtual int GetSliceNumberMinValue();
virtual int GetSliceNumberMaxValue();
// Description:
// Set the orientation of the slices to display. The default
// orientation is 2, which is Z.
vtkSetClampMacro(Orientation, int, 0, 2);
vtkGetMacro(Orientation, int);
void SetOrientationToX() { this->SetOrientation(0); }
void SetOrientationToY() { this->SetOrientation(1); }
void SetOrientationToZ() { this->SetOrientation(2); }
// Description:
// Use the specified CroppingRegion. The default is to display
// the full slice.
vtkSetMacro(Cropping, int);
vtkBooleanMacro(Cropping, int);
vtkGetMacro(Cropping, int);
// Description:
// Set the display extent. This is ignored unless Cropping
// is set.
vtkSetVector6Macro(CroppingRegion, int);
vtkGetVector6Macro(CroppingRegion, int);
// Description:
// Override Update to handle some tricky details.
virtual void Update();
virtual void Update(int port);
// Description:
// This should only be called by the renderer.
virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop);
// Description:
// Release any graphics resources that are being consumed by
// this mapper. The parameter window is used to determine
// which graphic resources to release.
virtual void ReleaseGraphicsResources(vtkWindow *);
// Description:
// Get the mtime for the mapper.
unsigned long GetMTime();
// Description:
// The bounding box (array of six doubles) of data expressed as
// (xmin,xmax, ymin,ymax, zmin,zmax).
double *GetBounds();
void GetBounds(double bounds[6]) {
this->vtkAbstractMapper3D::GetBounds(bounds); };
// Description:
// Get the plane as a homogeneous 4-vector that gives the plane
// equation coefficients. It is computed from the Orientation
// and SliceNumber, the propMatrix is unused and can be zero.
virtual void GetSlicePlaneInDataCoords(vtkMatrix4x4 *propMatrix,
double plane[4]);
// Description:
// Handle requests from the pipeline executive.
virtual int ProcessRequest(vtkInformation* request,
vtkInformationVector** inInfo,
vtkInformationVector* outInfo);
protected:
vtkImageSliceMapper();
~vtkImageSliceMapper();
// Description:
// Set points that describe a polygon on which the slice will
// be rendered.
void SetPoints(vtkPoints *points);
vtkPoints *GetPoints() { return this->Points; }
// Description:
// Force linear interpolation. Internal method, for when this
// mapper is used as a helper class.
void SetExactPixelMatch(int v) {
this->ExactPixelMatch = (v != 0); }
// Description:
// Pass color data. Internal method, for when this mapper is
// used as a helper class.
void SetPassColorData(int v) {
this->PassColorData = (v != 0); }
// Description:
// Set the display extent. Internal method, for when this mapper
// is used as a helper class.
void SetDisplayExtent(int extent[6]) {
this->DisplayExtent[0] = extent[0];
this->DisplayExtent[1] = extent[1];
this->DisplayExtent[2] = extent[2];
this->DisplayExtent[3] = extent[3];
this->DisplayExtent[4] = extent[4];
this->DisplayExtent[5] = extent[5]; }
// Description:
// Get the camera orientation as a simple integer [0,1,2,3,4,5]
// that indicates one of the six major directions. The integers
// 0,1,2 are x,y,z and 3,4,5 are -x,-y,-z.
int GetOrientationFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera);
// Description:
// Get the current slice as the one closest to the focal point.
int GetSliceFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera);
// Description:
// Get the dimension indices according to the orientation.
static void GetDimensionIndices(int orientation, int &xdim, int &ydim);
int SliceNumber;
int SliceNumberMinValue;
int SliceNumberMaxValue;
int Orientation;
int Cropping;
int CroppingRegion[6];
int DisplayExtent[6];
int ExactPixelMatch;
int PassColorData;
vtkPoints *Points;
vtkTimeStamp UpdateTime;
private:
vtkImageSliceMapper(const vtkImageSliceMapper&); // Not implemented.
void operator=(const vtkImageSliceMapper&); // Not implemented.
friend class vtkImageResliceMapper;
};
#endif
|