VTK
Public Member Functions | Static Public Member Functions | List of all members
vtkPixelExtent Class Reference

#include <vtkPixelExtent.h>

Public Member Functions

 vtkPixelExtent ()
 
template<typename T >
 vtkPixelExtent (const T *ext)
 
template<typename T >
 vtkPixelExtent (T ilo, T ihi, T jlo, T jhi)
 
template<typename T >
 vtkPixelExtent (T width, T height)
 
 vtkPixelExtent (const vtkPixelExtent &other)
 
vtkPixelExtentoperator= (const vtkPixelExtent &other)
 
void SetData (const vtkPixelExtent &ext)
 
template<typename T >
void SetData (const T *ext)
 
template<typename T >
void SetData (T ilo, T ihi, T jlo, T jhi)
 
void Clear ()
 
template<typename T >
void GetData (T data[4]) const
 
unsigned intGetDataU ()
 
const unsigned intGetDataU () const
 
int Empty () const
 
int operator== (const vtkPixelExtent &other) const
 
int Disjoint (vtkPixelExtent other) const
 
size_t Size () const
 
void operator&= (const vtkPixelExtent &other)
 
void operator|= (const vtkPixelExtent &other)
 
void Shift ()
 
void Shift (const vtkPixelExtent &ext)
 
void Shift (int *n)
 
void Shift (int q, int n)
 
vtkPixelExtent Split (int dir)
 
intoperator[] (int i)
 
const intoperator[] (int i) const
 
intGetData ()
 
const intGetData () const
 
void GetStartIndex (int first[2]) const
 
void GetStartIndex (int first[2], const int origin[2]) const
 
void GetEndIndex (int last[2]) const
 
int Contains (const vtkPixelExtent &other) const
 
int Contains (int i, int j) const
 
template<typename T >
void Size (T nCells[2]) const
 
void Grow (int n)
 
void Grow (int q, int n)
 
void GrowLow (int q, int n)
 
void GrowHigh (int q, int n)
 
void Shrink (int n)
 
void Shrink (int q, int n)
 
void CellToNode ()
 
void NodeToCell ()
 

Static Public Member Functions

static vtkPixelExtent Grow (const vtkPixelExtent &inputExt, int n)
 
static vtkPixelExtent Grow (const vtkPixelExtent &inputExt, const vtkPixelExtent &problemDomain, int n)
 
static vtkPixelExtent GrowLow (const vtkPixelExtent &ext, int q, int n)
 
static vtkPixelExtent GrowHigh (const vtkPixelExtent &ext, int q, int n)
 
static vtkPixelExtent Shrink (const vtkPixelExtent &inputExt, int n)
 
static vtkPixelExtent NodeToCell (const vtkPixelExtent &inputExt)
 
static vtkPixelExtent CellToNode (const vtkPixelExtent &inputExt)
 
static void Merge (std::deque< vtkPixelExtent > &exts)
 
template<typename T >
static void Size (const vtkPixelExtent &ext, T nCells[2])
 
static size_t Size (const vtkPixelExtent &ext)
 
static vtkPixelExtent Shrink (const vtkPixelExtent &inputExt, const vtkPixelExtent &problemDomain, int n)
 
static void Shift (int *ij, int n)
 
static void Shift (int *ij, int *n)
 
static void Split (int i, int j, const vtkPixelExtent &ext, std::deque< vtkPixelExtent > &newExts)
 
static void Subtract (const vtkPixelExtent &A, vtkPixelExtent B, std::deque< vtkPixelExtent > &newExts)
 

Detailed Description

Representation of a cartesian pixel plane and common operations on it. The implementation is intended to be fast and light so that it may be used in place of int[4] with little or no performance penalty.

NOTE in most cases operation on an empty object produces incorrect results. If it an issue query Empty() first.

Tests:
vtkPixelExtent (Tests)

Definition at line 40 of file vtkPixelExtent.h.

Constructor & Destructor Documentation

vtkPixelExtent::vtkPixelExtent ( )
inline

Definition at line 310 of file vtkPixelExtent.h.

template<typename T >
vtkPixelExtent::vtkPixelExtent ( const T *  ext)

Definition at line 317 of file vtkPixelExtent.h.

template<typename T >
vtkPixelExtent::vtkPixelExtent ( ilo,
ihi,
jlo,
jhi 
)

Definition at line 324 of file vtkPixelExtent.h.

template<typename T >
vtkPixelExtent::vtkPixelExtent ( width,
height 
)
inline

Definition at line 52 of file vtkPixelExtent.h.

vtkPixelExtent::vtkPixelExtent ( const vtkPixelExtent other)
inline

Definition at line 347 of file vtkPixelExtent.h.

Member Function Documentation

vtkPixelExtent & vtkPixelExtent::operator= ( const vtkPixelExtent other)
inline

Definition at line 335 of file vtkPixelExtent.h.

int& vtkPixelExtent::operator[] ( int  i)
inline

Element access

Definition at line 61 of file vtkPixelExtent.h.

const int& vtkPixelExtent::operator[] ( int  i) const
inline

Element access

Definition at line 62 of file vtkPixelExtent.h.

void vtkPixelExtent::SetData ( const vtkPixelExtent ext)
inline

Set the extent.

Definition at line 286 of file vtkPixelExtent.h.

template<typename T >
void vtkPixelExtent::SetData ( const T *  ext)

Definition at line 268 of file vtkPixelExtent.h.

template<typename T >
void vtkPixelExtent::SetData ( ilo,
ihi,
jlo,
jhi 
)

Definition at line 278 of file vtkPixelExtent.h.

void vtkPixelExtent::Clear ( )
inline

Definition at line 303 of file vtkPixelExtent.h.

int* vtkPixelExtent::GetData ( )
inline

Direct access to internal data.

Definition at line 77 of file vtkPixelExtent.h.

const int* vtkPixelExtent::GetData ( ) const
inline

Direct access to internal data.

Definition at line 78 of file vtkPixelExtent.h.

template<typename T >
void vtkPixelExtent::GetData ( data[4]) const

Definition at line 293 of file vtkPixelExtent.h.

unsigned int* vtkPixelExtent::GetDataU ( )
inline

Definition at line 84 of file vtkPixelExtent.h.

const unsigned int* vtkPixelExtent::GetDataU ( ) const
inline

Definition at line 87 of file vtkPixelExtent.h.

void vtkPixelExtent::GetStartIndex ( int  first[2]) const
inline

Get the start/end index.

Definition at line 383 of file vtkPixelExtent.h.

void vtkPixelExtent::GetStartIndex ( int  first[2],
const int  origin[2] 
) const
inline

Get the start/end index.

Definition at line 391 of file vtkPixelExtent.h.

void vtkPixelExtent::GetEndIndex ( int  last[2]) const
inline

Get the start/end index.

Definition at line 399 of file vtkPixelExtent.h.

int vtkPixelExtent::Empty ( ) const
inline

Return true if empty.

Definition at line 407 of file vtkPixelExtent.h.

int vtkPixelExtent::operator== ( const vtkPixelExtent other) const
inline

Test for equivalence.

Definition at line 419 of file vtkPixelExtent.h.

int vtkPixelExtent::Contains ( const vtkPixelExtent other) const
inline

Return non-zero if this extent conatins the other.

Definition at line 433 of file vtkPixelExtent.h.

int vtkPixelExtent::Contains ( int  i,
int  j 
) const
inline

Return non-zero if this extent conatins the other.

Definition at line 447 of file vtkPixelExtent.h.

int vtkPixelExtent::Disjoint ( vtkPixelExtent  other) const
inline

Return non-zero if the extent is disjoint from the other

Definition at line 509 of file vtkPixelExtent.h.

template<typename T >
void vtkPixelExtent::Size ( nCells[2]) const

Get the number in each direction.

Definition at line 369 of file vtkPixelExtent.h.

size_t vtkPixelExtent::Size ( ) const
inline

Get the total number.

Definition at line 376 of file vtkPixelExtent.h.

void vtkPixelExtent::operator&= ( const vtkPixelExtent other)
inline

In place intersection.

Definition at line 462 of file vtkPixelExtent.h.

void vtkPixelExtent::operator|= ( const vtkPixelExtent other)
inline

In place union

Definition at line 488 of file vtkPixelExtent.h.

void vtkPixelExtent::Grow ( int  n)
inline

Expand the extents by n.

Definition at line 517 of file vtkPixelExtent.h.

void vtkPixelExtent::Grow ( int  q,
int  n 
)
inline

Expand the extents by n.

Definition at line 527 of file vtkPixelExtent.h.

void vtkPixelExtent::GrowLow ( int  q,
int  n 
)
inline

Expand the extents by n.

Definition at line 537 of file vtkPixelExtent.h.

void vtkPixelExtent::GrowHigh ( int  q,
int  n 
)
inline

Expand the extents by n.

Definition at line 544 of file vtkPixelExtent.h.

void vtkPixelExtent::Shrink ( int  n)
inline

Shrink the extent by n.

Definition at line 551 of file vtkPixelExtent.h.

void vtkPixelExtent::Shrink ( int  q,
int  n 
)
inline

Shrink the extent by n.

Definition at line 561 of file vtkPixelExtent.h.

void vtkPixelExtent::Shift ( )
inline

Shifts by low corner of this, moving to the origin.

Definition at line 603 of file vtkPixelExtent.h.

void vtkPixelExtent::Shift ( const vtkPixelExtent ext)
inline

Shift by low corner of the given extent.

Definition at line 589 of file vtkPixelExtent.h.

void vtkPixelExtent::Shift ( int n)
inline

Shift by the given amount.

Definition at line 570 of file vtkPixelExtent.h.

void vtkPixelExtent::Shift ( int  q,
int  n 
)
inline

Shift by the given amount in the given direction.

Definition at line 580 of file vtkPixelExtent.h.

vtkPixelExtent vtkPixelExtent::Split ( int  dir)
inline

Divide the extent in half in the given direction. The operation is done in-place the other half of the split extent is returned. The retunr will be empty if the split could not be made.

Definition at line 617 of file vtkPixelExtent.h.

void vtkPixelExtent::CellToNode ( )
inline

In-place conversion from cell based to node based extent, and vise-versa.

Definition at line 638 of file vtkPixelExtent.h.

void vtkPixelExtent::NodeToCell ( )
inline

In-place conversion from cell based to node based extent, and vise-versa.

Definition at line 646 of file vtkPixelExtent.h.

template<typename T >
void vtkPixelExtent::Size ( const vtkPixelExtent ext,
nCells[2] 
)
static

Get the number in each direction.

Definition at line 354 of file vtkPixelExtent.h.

size_t vtkPixelExtent::Size ( const vtkPixelExtent ext)
inlinestatic

Get the total number.

Definition at line 362 of file vtkPixelExtent.h.

static vtkPixelExtent vtkPixelExtent::Grow ( const vtkPixelExtent inputExt,
int  n 
)
static

Add or remove ghost cells. If a problem domain is provided then the result is clipled to be within the problem domain.

static vtkPixelExtent vtkPixelExtent::Grow ( const vtkPixelExtent inputExt,
const vtkPixelExtent problemDomain,
int  n 
)
static
static vtkPixelExtent vtkPixelExtent::GrowLow ( const vtkPixelExtent ext,
int  q,
int  n 
)
static
static vtkPixelExtent vtkPixelExtent::GrowHigh ( const vtkPixelExtent ext,
int  q,
int  n 
)
static
static vtkPixelExtent vtkPixelExtent::Shrink ( const vtkPixelExtent inputExt,
const vtkPixelExtent problemDomain,
int  n 
)
static

Remove ghost cells. If a problem domain is provided the input is pinned at the domain.

static vtkPixelExtent vtkPixelExtent::Shrink ( const vtkPixelExtent inputExt,
int  n 
)
static
static vtkPixelExtent vtkPixelExtent::NodeToCell ( const vtkPixelExtent inputExt)
static

Convert from point extent to cell extent while respecting the dimensionality of the data.

static vtkPixelExtent vtkPixelExtent::CellToNode ( const vtkPixelExtent inputExt)
static

Convert from cell extent to point extent while respecting the dimensionality of the data.

static void vtkPixelExtent::Shift ( int ij,
int  n 
)
static

Shift by the given amount while respecting mode.

static void vtkPixelExtent::Shift ( int ij,
int n 
)
static

Shift by the given amount while respecting mode.

static void vtkPixelExtent::Split ( int  i,
int  j,
const vtkPixelExtent ext,
std::deque< vtkPixelExtent > &  newExts 
)
static

Split ext at i,j, resulting extents (up to 4) are appended to newExts. If i,j is outside ext, ext is passed through unmodified.

static void vtkPixelExtent::Subtract ( const vtkPixelExtent A,
vtkPixelExtent  B,
std::deque< vtkPixelExtent > &  newExts 
)
static

A - B = C C is a set of disjoint extents such that the intersection of B and C is empty and the intersection of A and C is C.

static void vtkPixelExtent::Merge ( std::deque< vtkPixelExtent > &  exts)
static

Merge compatible extents in the list. Extents are compatible if they are directly adjacent nad have the same extent along the adjacent edge.


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