VTK
|
This is a helper class for stencil creation. More...
#include <vtkImageStencilData.h>
Public Member Functions | |
vtkImageStencilRaster (const int wholeExtent[2]) | |
Create a raster with the specified whole y extent. More... | |
~vtkImageStencilRaster () | |
Destructor. More... | |
void | PrepareForNewData (const int allocateExtent[2]=0) |
Reset the raster to its original state, but keep the same whole extent. More... | |
void | FillStencilData (vtkImageStencilData *data, const int extent[6], int xj=0, int yj=1) |
Fill the specified extent of a vtkImageStencilData with the raster, after permuting the raster according to xj and yj. More... | |
void | SetTolerance (double tol) |
The tolerance for float-to-int conversions. More... | |
double | GetTolerance () |
void | InsertLine (const double p1[2], const double p2[2]) |
Insert a line into the raster, given the two end points. More... | |
void | InsertLine (const double[2], const double[2], bool, bool) |
Insert a line into the raster, given the two end points. More... | |
Protected Member Functions | |
void | PrepareExtent (int ymin, int ymax) |
Ensure that the raster is initialized for the specified range of y values, which must be within the Extent. More... | |
void | InsertPoint (int y, double x, int i) |
Insert an x point into the raster. More... | |
Protected Attributes | |
int | Extent [2] |
int | UsedExtent [2] |
double ** | Raster |
double | Tolerance |
This is a helper class for stencil creation.
It is a raster with infinite resolution in the X direction (approximately, since it uses double precision). Lines that represent polygon edges can be drawn into this raster, and then filled given a tolerance.
Definition at line 250 of file vtkImageStencilData.h.
vtkImageStencilRaster::vtkImageStencilRaster | ( | const int | wholeExtent[2] | ) |
Create a raster with the specified whole y extent.
vtkImageStencilRaster::~vtkImageStencilRaster | ( | ) |
Destructor.
void vtkImageStencilRaster::PrepareForNewData | ( | const int | allocateExtent[2] = 0 | ) |
Reset the raster to its original state, but keep the same whole extent.
Pre-allocate the specified 1D allocateExtent, which must be within the whole extent.
Insert a line into the raster, given the two end points.
Insert a line into the raster, given the two end points.
void vtkImageStencilRaster::FillStencilData | ( | vtkImageStencilData * | data, |
const int | extent[6], | ||
int | xj = 0 , |
||
int | yj = 1 |
||
) |
Fill the specified extent of a vtkImageStencilData with the raster, after permuting the raster according to xj and yj.
|
inline |
The tolerance for float-to-int conversions.
Definition at line 288 of file vtkImageStencilData.h.
|
inline |
Definition at line 289 of file vtkImageStencilData.h.
Ensure that the raster is initialized for the specified range of y values, which must be within the Extent.
Insert an x point into the raster.
If the y value is larger than the y extent, the extent will grow automatically. The parameter i indicates which of the two internal rasters is to be used.
|
protected |
Definition at line 305 of file vtkImageStencilData.h.
|
protected |
Definition at line 306 of file vtkImageStencilData.h.
|
protected |
Definition at line 307 of file vtkImageStencilData.h.
|
protected |
Definition at line 308 of file vtkImageStencilData.h.