SMIL  1.0.4

Detailed Description

+ Collaboration diagram for Image size:

Functions

template<typename T >
RES_T resize (Image< T > &imIn, size_t sx, size_t sy, size_t sz, Image< T > &imOut, string method="trilinear")
 resize() - 3D image resize More...
 
template<typename T >
RES_T resize (Image< T > &imIn, size_t sx, size_t sy, Image< T > &imOut, string method="trilinear")
 resize() - 2D image resize More...
 
template<typename T >
RES_T resize (Image< T > &imIn, Image< T > &imOut, string method="trilinear")
 resize() - 3D image resize More...
 
template<typename T >
RES_T scale (Image< T > &imIn, double kx, double ky, double kz, Image< T > &imOut, string method="trilinear")
 scale() - 3D image scale (resize by a factor) More...
 
template<typename T >
RES_T scale (Image< T > &imIn, double kx, double ky, Image< T > &imOut, string method="trilinear")
 scale() - 2D image scale More...
 
template<typename T >
RES_T scale (Image< T > &imIn, double k, Image< T > &imOut, string method="trilinear")
 scale() - image scale (resize by a factor) More...
 

Function Documentation

◆ resize() [1/3]

RES_T smil::resize ( Image< T > &  imIn,
size_t  sx,
size_t  sy,
size_t  sz,
Image< T > &  imOut,
string  method = "trilinear" 
)

resize() - 3D image resize

Resize a 3D image - the value of each pixel in the output image is calculated from the input image after an interpolation method.

There are two available methods :

  • closest - this is the simpler method. Pixel values in the output image are taken from the nearest corresponding pixel in the input image. This method doesn't increases the number of possible values. So, it must be used when resizing binary images or images whose possible values shall be preserved in the output image.
  • trilinear (extension of bilinear method for 3D images) - this is the method to use on gray level images.
Note
When method is set to auto, the applied method will be closest for binary images and trilinear or bilinear for gray level images
Parameters
[in]imIn: input image
[in]sx,sy,sz: dimensions to be set on output image
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear, closest or auto.

◆ resize() [2/3]

RES_T smil::resize ( Image< T > &  imIn,
size_t  sx,
size_t  sy,
Image< T > &  imOut,
string  method = "trilinear" 
)

resize() - 2D image resize

Resize a 2D image - the value of each pixel in the output image is calculated from the input image after an interpolation method.

Parameters
[in]imIn: input image
[in]sx,sy: dimensions to be set on output image
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear ou closest.

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

◆ resize() [3/3]

RES_T smil::resize ( Image< T > &  imIn,
Image< T > &  imOut,
string  method = "trilinear" 
)

resize() - 3D image resize

Resize a 3D image - the value of each pixel in the output image is calculated from the input image after an interpolation method.

The size of the output image is already set to what it should be.

Parameters
[in]imIn: input image
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear ou closest.

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

◆ scale() [1/3]

RES_T smil::scale ( Image< T > &  imIn,
double  kx,
double  ky,
double  kz,
Image< T > &  imOut,
string  method = "trilinear" 
)

scale() - 3D image scale (resize by a factor)

3D image scale - Scaling images is almost the same than resizing. Input parameters are the factors to multiply each dimension of the input image instead of the dimensions of output image.

There are two available methods :

  • closest - this is the simpler method. Pixel values in the output image are taken from the nearest corresponding pixel in the input image. This method doesn't increases the number of possible values. So, it must be used when resizing binary images or images whose possible values shall be preserved in the output image.
  • trilinear (extension of bilinear method for 3D images) - this is the method to use on gray level images.
Note
When method is set to auto, the applied method will be closest for binary images and trilinear or bilinear for gray level images
Parameters
[in]imIn: input image
[in]kx,ky,kz: scale factors
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear, closest or auto.

◆ scale() [2/3]

RES_T smil::scale ( Image< T > &  imIn,
double  kx,
double  ky,
Image< T > &  imOut,
string  method = "trilinear" 
)

scale() - 2D image scale

3D image scale - Scaling images is almost the same than resizing. Input parameters are the factors to multiply each dimension of the input image instead of the dimensions of output image.

Parameters
[in]imIn: input image
[in]kx,ky: scale factors
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear ou closest.

◆ scale() [3/3]

RES_T smil::scale ( Image< T > &  imIn,
double  k,
Image< T > &  imOut,
string  method = "trilinear" 
)

scale() - image scale (resize by a factor)

3D image scale - Scaling images is almost the same than resizing. Input parameters are the factors to multiply each dimension of the input image instead of the dimensions of output image.

Parameters
[in]imIn: input image
[in]k: scale factor applied to each axis.
[out]imOut: output image
[in]method: the interpolation method to use. Can be trilinear (default), bilinear ou closest.