Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ImageHelper< NImageDimension, NLoop > Class Template Reference

Fast Index/Offset computation. More...

#include <itkImageHelper.h>

List of all members.

Public Types

typedef ImageBase< NImageDimension > ImageType
typedef ImageType::IndexType IndexType
typedef ImageType::OffsetType OffsetType
typedef ImageType::IndexValueType IndexValueType
typedef ImageType::OffsetValueType OffsetValueType
typedef Concept::Detail::UniqueType_bool<
false > 
UniqueTypeBoolFalse
typedef Concept::Detail::UniqueType_bool<
true > 
UniqueTypeBoolTrue

Static Public Member Functions

void ComputeIndex (const IndexType &bufferedRegionIndex, OffsetValueType offset, const OffsetValueType offsetTable[], IndexType &index)
void ComputeIndexInner (const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType offsetTable[], IndexType &index, const UniqueTypeBoolFalse &)
void ComputeIndexInner (const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType[], IndexType &index, const UniqueTypeBoolTrue &)
void ComputeOffset (const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
void ComputeOffsetInner (const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset, const UniqueTypeBoolFalse &)
void ComputeOffsetInner (const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType[], OffsetValueType &offset, const UniqueTypeBoolTrue &)


Detailed Description

template<unsigned int NImageDimension, unsigned int NLoop>
class itk::ImageHelper< NImageDimension, NLoop >

Fast Index/Offset computation.

These helper methods use recursive templates to unroll the loops of simple calculations. The resulting speed improvement varies from compiler to compiler. Some gcc compilers with debug turned on exhibit slight speed increases, but most compilers see improvement. The ComputeOffset performance improvement is impressive. For example, the Windows VS7.0 compiler shows almost a factor of 2 speed improvement with the recursive templates. Usually recursive templates use partial specialization to terminate loops. Here we use a technique used by Brad King in the itk Concept Checking code.

Note:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics.

Definition at line 53 of file itkImageHelper.h.


Member Typedef Documentation

template<unsigned int NImageDimension, unsigned int NLoop>
typedef ImageBase<NImageDimension> itk::ImageHelper< NImageDimension, NLoop >::ImageType
 

Definition at line 56 of file itkImageHelper.h.

template<unsigned int NImageDimension, unsigned int NLoop>
typedef ImageType::IndexType itk::ImageHelper< NImageDimension, NLoop >::IndexType
 

Definition at line 57 of file itkImageHelper.h.

Referenced by itk::ImageHelper< NImageDimension, NLoop >::ComputeIndex(), itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner(), itk::ImageHelper< NImageDimension, NLoop >::ComputeOffset(), and itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner().

template<unsigned int NImageDimension, unsigned int NLoop>
typedef ImageType::IndexValueType itk::ImageHelper< NImageDimension, NLoop >::IndexValueType
 

Definition at line 59 of file itkImageHelper.h.

template<unsigned int NImageDimension, unsigned int NLoop>
typedef ImageType::OffsetType itk::ImageHelper< NImageDimension, NLoop >::OffsetType
 

Definition at line 58 of file itkImageHelper.h.

template<unsigned int NImageDimension, unsigned int NLoop>
typedef ImageType::OffsetValueType itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType
 

Definition at line 60 of file itkImageHelper.h.

Referenced by itk::ImageHelper< NImageDimension, NLoop >::ComputeIndex(), itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner(), itk::ImageHelper< NImageDimension, NLoop >::ComputeOffset(), and itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner().

template<unsigned int NImageDimension, unsigned int NLoop>
typedef Concept::Detail::UniqueType_bool<false> itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolFalse
 

Definition at line 61 of file itkImageHelper.h.

Referenced by itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner(), and itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner().

template<unsigned int NImageDimension, unsigned int NLoop>
typedef Concept::Detail::UniqueType_bool<true> itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolTrue
 

Definition at line 62 of file itkImageHelper.h.

Referenced by itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner(), and itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner().


Member Function Documentation

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeIndex const IndexType bufferedRegionIndex,
OffsetValueType  offset,
const OffsetValueType  offsetTable[],
IndexType index
[inline, static]
 

ComputeIndex with recursive templates

Definition at line 65 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, and itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType.

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner const IndexType bufferedRegionIndex,
OffsetValueType offset,
const  OffsetValueType[],
IndexType index,
const UniqueTypeBoolTrue
[inline, static]
 

Definition at line 96 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType, and itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolTrue.

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeIndexInner const IndexType bufferedRegionIndex,
OffsetValueType offset,
const OffsetValueType  offsetTable[],
IndexType index,
const UniqueTypeBoolFalse
[inline, static]
 

Definition at line 78 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType, and itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolFalse.

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeOffset const IndexType bufferedRegionIndex,
const IndexType index,
const OffsetValueType  offsetTable[],
OffsetValueType offset
[inline, static]
 

Definition at line 108 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, and itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType.

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner const IndexType bufferedRegionIndex,
const IndexType index,
const  OffsetValueType[],
OffsetValueType offset,
const UniqueTypeBoolTrue
[inline, static]
 

Definition at line 138 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType, and itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolTrue.

template<unsigned int NImageDimension, unsigned int NLoop>
void itk::ImageHelper< NImageDimension, NLoop >::ComputeOffsetInner const IndexType bufferedRegionIndex,
const IndexType index,
const OffsetValueType  offsetTable[],
OffsetValueType offset,
const UniqueTypeBoolFalse
[inline, static]
 

Definition at line 121 of file itkImageHelper.h.

References itk::ImageHelper< NImageDimension, NLoop >::IndexType, itk::ImageHelper< NImageDimension, NLoop >::OffsetValueType, and itk::ImageHelper< NImageDimension, NLoop >::UniqueTypeBoolFalse.


The documentation for this class was generated from the following file:
Generated at Thu May 25 01:14:10 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000