VTK  9.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImageStencilRaster Class Reference

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.
 
 ~vtkImageStencilRaster ()
 Destructor.
 
void PrepareForNewData (const int allocateExtent[2]=nullptr)
 Reset the raster to its original state, but keep the same whole extent.
 
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.
 
void SetTolerance (double tol)
 The tolerance for float-to-int conversions.
 
double GetTolerance ()
 
void InsertLine (const double pt1[2], const double pt2[2])
 Insert a line into the raster, given the two end points.
 

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.
 
void InsertPoint (int y, double x, int i)
 Insert an x point into the raster.
 

Protected Attributes

int Extent [2]
 
int UsedExtent [2]
 
double ** Raster
 
double Tolerance
 

Detailed Description

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 265 of file vtkImageStencilData.h.

Constructor & Destructor Documentation

◆ vtkImageStencilRaster()

vtkImageStencilRaster::vtkImageStencilRaster ( const int  wholeExtent[2])

Create a raster with the specified whole y extent.

◆ ~vtkImageStencilRaster()

vtkImageStencilRaster::~vtkImageStencilRaster ( )

Destructor.

Member Function Documentation

◆ PrepareForNewData()

void vtkImageStencilRaster::PrepareForNewData ( const int  allocateExtent[2] = nullptr)

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.

◆ InsertLine()

void vtkImageStencilRaster::InsertLine ( const double  pt1[2],
const double  pt2[2] 
)

Insert a line into the raster, given the two end points.

◆ FillStencilData()

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.

◆ SetTolerance()

void vtkImageStencilRaster::SetTolerance ( double  tol)
inline

The tolerance for float-to-int conversions.

Definition at line 301 of file vtkImageStencilData.h.

◆ GetTolerance()

double vtkImageStencilRaster::GetTolerance ( )
inline

Definition at line 302 of file vtkImageStencilData.h.

◆ PrepareExtent()

void vtkImageStencilRaster::PrepareExtent ( int  ymin,
int  ymax 
)
protected

Ensure that the raster is initialized for the specified range of y values, which must be within the Extent.

◆ InsertPoint()

void vtkImageStencilRaster::InsertPoint ( int  y,
double  x,
int  i 
)
protected

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.

Member Data Documentation

◆ Extent

int vtkImageStencilRaster::Extent[2]
protected

Definition at line 318 of file vtkImageStencilData.h.

◆ UsedExtent

int vtkImageStencilRaster::UsedExtent[2]
protected

Definition at line 319 of file vtkImageStencilData.h.

◆ Raster

double** vtkImageStencilRaster::Raster
protected

Definition at line 320 of file vtkImageStencilData.h.

◆ Tolerance

double vtkImageStencilRaster::Tolerance
protected

Definition at line 321 of file vtkImageStencilData.h.


The documentation for this class was generated from the following file: