ITK/Release 4/Refactor Numerical Libraries/Inventory/Matrix Vector Operations: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 7: Line 7:


These methods perform Matrix x Vector multiplications.
These methods perform Matrix x Vector multiplications.
* The first one converts the integer grid coordinates of a pixel to it s world coordinates in physical space.
* The second method converts th world coordinates in physical space to integer grid coordinates of a pixel.
Internally they use the helper matrices
  this->m_IndexToPhysicalPoint
  this->m_PhysicalPointToIndex
That are pre-computed in the method:
  ComputeIndexToPhysicalPointMatrices()
in lines 178-201 if itkImageBase.hxx


The method
The method
Line 19: Line 34:


in lines:
in lines:
    456 - 480
Luis to find an example suitable for profiling. Probably based on the ResampleImage*.cxx files in
  ITK/Examples/Filtering
but with a 3D input image, so it takes enough computation time to provide reliable benchmarking.

Revision as of 15:41, 16 September 2011

Index to Point

The ImageBase class provides the methods:

  TransformIndexToPhysicalPoint
  TransformPhysicalPointToIndex

These methods perform Matrix x Vector multiplications.

  • The first one converts the integer grid coordinates of a pixel to it s world coordinates in physical space.
  • The second method converts th world coordinates in physical space to integer grid coordinates of a pixel.

Internally they use the helper matrices

 this->m_IndexToPhysicalPoint
 this->m_PhysicalPointToIndex

That are pre-computed in the method:

  ComputeIndexToPhysicalPointMatrices()

in lines 178-201 if itkImageBase.hxx


The method

  TransformIndexToPhysicalPoint

Is called millions of times during the execution of Image Registration processes.

The actual multiplication is done in the file

 ITK/Core/Common/include/itkImageBase.h

in lines:

   456 - 480

Luis to find an example suitable for profiling. Probably based on the ResampleImage*.cxx files in

  ITK/Examples/Filtering

but with a 3D input image, so it takes enough computation time to provide reliable benchmarking.