Public Member Functions | Private Attributes

cmtk::VolumeGridToGridLookup Class Reference
[cmtkBase Library]

Class for grid to grid lookup tables. More...

#include <cmtkVolumeGridToGridLookup.h>

Collaboration diagram for cmtk::VolumeGridToGridLookup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 VolumeGridToGridLookup (const UniformVolume &fromGrid, const UniformVolume &toGrid)
 Constructor: takes original and new image grids.
int GetSourceCount (const int dim, const int idx) const
 Get number of source pixels that contribute to the given target pixel.
int GetFromIndex (const int dim, const int idx) const
 Get index of first source pixel that contributes to the given target pixel.
Types::Coordinate GetWeight (const int dim, const int idx, const int fromIdx) const
 Get weight with which a given source pixel contributes to the given target pixel.
Types::Coordinate GetLength (const int dim, const int idx) const
 Length (width) of a given target pixel.

Private Attributes

std::vector< std::vector< int > > m_SourceCount
 Array of arrays of numbers of source pixels that contribute to the given target pixel.
std::vector< std::vector< int > > m_FromIndex
 Array of arrays of first source pixels that contributes to the given target pixels.
std::vector< std::vector
< std::vector
< Types::Coordinate > > > 
m_Weight
 Array of arrays of weight arrays.
std::vector< std::vector
< Types::Coordinate > > 
m_Length
 Array of array of target pixel lengths.

Detailed Description

Class for grid to grid lookup tables.

This class is only for internal use by the Resmple function(s) of the UniformVolume class. The lookup table basically records for each pixel in the target grid, which pixels in the source grid it depends on, and with what relative weight each source pixel contributes to the target pixel. The contributions are computed as relative overlaps of boxcar-shaped pixel profiles.

Definition at line 55 of file cmtkVolumeGridToGridLookup.h.


Member Function Documentation

int cmtk::VolumeGridToGridLookup::GetFromIndex ( const int  dim,
const int  idx 
) const [inline]

Get index of first source pixel that contributes to the given target pixel.

Definition at line 68 of file cmtkVolumeGridToGridLookup.h.

Referenced by cmtk::UniformVolume::ResampleThreadPoolExecuteGrey(), and cmtk::UniformVolume::ResampleThreadPoolExecuteLabels().

Types::Coordinate cmtk::VolumeGridToGridLookup::GetLength ( const int  dim,
const int  idx 
) const [inline]

Length (width) of a given target pixel.

Definition at line 80 of file cmtkVolumeGridToGridLookup.h.

Referenced by cmtk::UniformVolume::ResampleThreadPoolExecuteGrey().

int cmtk::VolumeGridToGridLookup::GetSourceCount ( const int  dim,
const int  idx 
) const [inline]

Get number of source pixels that contribute to the given target pixel.

Definition at line 62 of file cmtkVolumeGridToGridLookup.h.

Referenced by cmtk::UniformVolume::ResampleThreadPoolExecuteGrey(), and cmtk::UniformVolume::ResampleThreadPoolExecuteLabels().

Types::Coordinate cmtk::VolumeGridToGridLookup::GetWeight ( const int  dim,
const int  idx,
const int  fromIdx 
) const [inline]

Get weight with which a given source pixel contributes to the given target pixel.

Definition at line 74 of file cmtkVolumeGridToGridLookup.h.

Referenced by cmtk::UniformVolume::ResampleThreadPoolExecuteGrey(), and cmtk::UniformVolume::ResampleThreadPoolExecuteLabels().


Member Data Documentation

std::vector< std::vector< int > > cmtk::VolumeGridToGridLookup::m_FromIndex [private]

Array of arrays of first source pixels that contributes to the given target pixels.

Definition at line 90 of file cmtkVolumeGridToGridLookup.h.

std::vector< std::vector< Types::Coordinate > > cmtk::VolumeGridToGridLookup::m_Length [private]

Array of array of target pixel lengths.

Definition at line 96 of file cmtkVolumeGridToGridLookup.h.

std::vector< std::vector< int > > cmtk::VolumeGridToGridLookup::m_SourceCount [private]

Array of arrays of numbers of source pixels that contribute to the given target pixel.

Definition at line 87 of file cmtkVolumeGridToGridLookup.h.

std::vector< std::vector< std::vector<Types::Coordinate> > > cmtk::VolumeGridToGridLookup::m_Weight [private]

Array of arrays of weight arrays.

Definition at line 93 of file cmtkVolumeGridToGridLookup.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines