ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::DirectionAlgorithm Class Reference

#include <itkDirectionAlgorithm.h>

Detailed Description

Functions that operate on image direction matrices.

Definition at line 67 of file itkDirectionAlgorithm.h.

Public Types

using CollapseStrategyEnum = ExtractImageFilterEnums::DirectionCollapseStrategy
 

Static Public Member Functions

template<unsigned int VOutputDimension, typename TValue, unsigned int VInputDimension>
static Matrix< TValue, VOutputDimension, VOutputDimension > CollapseDirection (const Matrix< TValue, VInputDimension, VInputDimension > &direction, const FixedArray< bool, VInputDimension > &collapseDimensions, const CollapseStrategyEnum strategy)
 
template<unsigned int VOutputDimension, typename TValue = double>
static Matrix< TValue, VOutputDimension, VOutputDimension > CollapseDirection (const VariableSizeMatrix< double > &direction, const std::vector< bool > &collapseDimensions, const CollapseStrategyEnum strategy)
 

Private Types

using FlagArray = Eigen::Array<bool, Eigen::Dynamic, 1>
 
template<typename TValue>
using RowMajorMatrix = Eigen::Matrix<TValue, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
 

Static Private Member Functions

static void CollapseDirectionInternal (const Eigen::Ref< const RowMajorMatrix< double > > &direction, const Eigen::Ref< const FlagArray > &collapseDimensions, CollapseStrategyEnum strategy, Eigen::Ref< RowMajorMatrix< double > > result)
 
static void CollapseDirectionInternal (const Eigen::Ref< const RowMajorMatrix< double > > &direction, const Eigen::Ref< const FlagArray > &collapseDimensions, CollapseStrategyEnum strategy, Eigen::Ref< RowMajorMatrix< float > > result)
 

Member Typedef Documentation

◆ CollapseStrategyEnum

◆ FlagArray

using itk::DirectionAlgorithm::FlagArray = Eigen::Array<bool, Eigen::Dynamic, 1>
private

Definition at line 126 of file itkDirectionAlgorithm.h.

◆ RowMajorMatrix

template<typename TValue>
using itk::DirectionAlgorithm::RowMajorMatrix = Eigen::Matrix<TValue, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
private

Definition at line 125 of file itkDirectionAlgorithm.h.

Member Function Documentation

◆ CollapseDirection() [1/2]

template<unsigned int VOutputDimension, typename TValue, unsigned int VInputDimension>
static Matrix< TValue, VOutputDimension, VOutputDimension > itk::DirectionAlgorithm::CollapseDirection ( const Matrix< TValue, VInputDimension, VInputDimension > & direction,
const FixedArray< bool, VInputDimension > & collapseDimensions,
const CollapseStrategyEnum strategy )
inlinestatic

Compute the direction of an image whose axes have been collapsed.

Rows and columns of direction whose collapseDimensions entry is true are removed, and the remaining sub-matrix is resolved by strategy: DIRECTIONCOLLAPSETOIDENTITY returns identity, DIRECTIONCOLLAPSETOSUBMATRIX returns the sub-matrix and throws when it is singular, and DIRECTIONCOLLAPSETOGUESS returns the sub-matrix or identity when singular. DIRECTIONCOLLAPSETOUNKOWN throws. Singularity is tested after conversion to the result's element type, which must be float or double. The number of retained axes must equal VOutputDimension.

This overload takes a direction whose dimension is known at compile time; the result has the same element type.

Definition at line 86 of file itkDirectionAlgorithm.h.

References CollapseDirectionInternal(), itk::FixedArray< TValue, VLength >::data(), and itk::Matrix< T, VRows, VColumns >::GetVnlMatrix().

◆ CollapseDirection() [2/2]

template<unsigned int VOutputDimension, typename TValue = double>
static Matrix< TValue, VOutputDimension, VOutputDimension > itk::DirectionAlgorithm::CollapseDirection ( const VariableSizeMatrix< double > & direction,
const std::vector< bool > & collapseDimensions,
const CollapseStrategyEnum strategy )
inlinestatic

Overload for a direction whose dimension is known only at run time, such as an ImageIOBase direction; the result has element type TValue.

Definition at line 104 of file itkDirectionAlgorithm.h.

References CollapseDirectionInternal(), itk::Matrix< T, VRows, VColumns >::GetVnlMatrix(), and itk::VariableSizeMatrix< T >::GetVnlMatrix().

◆ CollapseDirectionInternal() [1/2]

static void itk::DirectionAlgorithm::CollapseDirectionInternal ( const Eigen::Ref< const RowMajorMatrix< double > > & direction,
const Eigen::Ref< const FlagArray > & collapseDimensions,
CollapseStrategyEnum strategy,
Eigen::Ref< RowMajorMatrix< double > > result )
staticprivate

◆ CollapseDirectionInternal() [2/2]

static void itk::DirectionAlgorithm::CollapseDirectionInternal ( const Eigen::Ref< const RowMajorMatrix< double > > & direction,
const Eigen::Ref< const FlagArray > & collapseDimensions,
CollapseStrategyEnum strategy,
Eigen::Ref< RowMajorMatrix< float > > result )
staticprivate

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