SMIL 1.1.2
Loading...
Searching...
No Matches
Matrix operations

Matrix operations on images : multiplication and transposition. More...

Detailed Description

Matrix operations on images : multiplication and transposition.

+ Collaboration diagram for Matrix operations:

Functions

template<class T >
RES_T matTranspose (const Image< T > &imIn, Image< T > &imOut, string order="yxz")
 matTranspose() : 3D image transposition
 
template<class T >
RES_T matTranspose (Image< T > &im, const string order="yxz")
 matTranspose() : 3D image transposition
 
template<class T >
RES_T matMultiply (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 matMultiply() - Matrix multiplication (for now, only in 2D)
 

Function Documentation

◆ matTranspose() [1/2]

template<class T >
RES_T matTranspose ( const Image< T > &  imIn,
Image< T > &  imOut,
string  order = "yxz" 
)

matTranspose() : 3D image transposition

Transpose 3D images. The image is mirrored with respect to the main diagonal and the shape is adapted.

The order parameter defines where to redirect input axes. E.g. : if order is xzy, axes y and z will be exchanged.

Possible values for parameter order are : xyz, xzy, yxz, yzx, zxy, zyx, xy, yx and an empty string.

Note
  • xyz and xy, does nothing but just copies input image into output image.
  • yxz or yx correspond to the usual transposition of 2D matrices. When applied to 3D images, all slices are transposed.
Parameters
[in]imIn: input Image
[in]order: axis order in the output image
[out]imOut: output Image

◆ matTranspose() [2/2]

template<class T >
RES_T matTranspose ( Image< T > &  im,
const string  order = "yxz" 
)

matTranspose() : 3D image transposition

Parameters
[in,out]im: input/output Image
[in]order: axis order in the output image

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ matMultiply()

template<class T >
RES_T matMultiply ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

matMultiply() - Matrix multiplication (for now, only in 2D)

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image
\htmlonly    <table border=0>    <tr><td><img src="vectorized.png" /> </td><td>Vectorized</td></tr>    </table>    \endhtmlonly
\htmlonly    <table border=0>    <tr><td><img src="parallelized.png" /> </td><td>Parallelized</td></tr>    </table>    \endhtmlonly