SIFT3D 2.0
SIFT descriptors extended to 3D
Loading...
Searching...
No Matches
Macros | Functions
imutil.h File Reference

Manupulations with images. More...

#include <imtypes.h>

Go to the source code of this file.

Macros

#define SIFT3D_UNSUPPORTED_FILE_TYPE   2
 
#define SIFT3D_WRAPPER_NOT_COMPILED   3
 

Functions

SIFT3D_EXPORT sift3d_image * sift3d_make_image (const int nx, const int ny, const int nz, const int nc)
 Make an image with specified dimensions.
 
SIFT3D_EXPORT void sift3d_free_image (sift3d_image *)
 Destroy an image.
 
SIFT3D_EXPORT sift3d_image * sift3d_read_image (const char *path)
 Read an image from a file.
 
SIFT3D_EXPORT float * sift3d_image_data (const sift3d_image *)
 Get a pointer to the image's data.
 
SIFT3D_EXPORT sift3d_mat_rm * sift3d_make_mat_rm ()
 Create a matrix.
 
SIFT3D_EXPORT void sift3d_free_mat_rm (sift3d_mat_rm *)
 Destroy a matrix.
 
SIFT3D_EXPORT void * sift3d_mat_rm_data (sift3d_mat_rm *)
 Get a pointer to the data array of a matrix.
 
SIFT3D_EXPORT void sift3d_mat_rm_dimensions (const sift3d_mat_rm *, int *num_cols, int *num_rows)
 Get dimensions of a matrix.
 
SIFT3D_EXPORT sift3d_mat_type sift3d_mat_rm_type (const sift3d_mat_rm *)
 Get the type of elements in a matrix.
 

Detailed Description

Manupulations with images.

Macro Definition Documentation

◆ SIFT3D_UNSUPPORTED_FILE_TYPE

#define SIFT3D_UNSUPPORTED_FILE_TYPE   2

Returned by sift3d_read_image() when this file type is not supported.

◆ SIFT3D_WRAPPER_NOT_COMPILED

#define SIFT3D_WRAPPER_NOT_COMPILED   3

Returned by sift3d_read_image() if the library was compiled without a dependency needed to read this file (e.g. nifticlib).

Function Documentation

◆ sift3d_image_data()

SIFT3D_EXPORT float * sift3d_image_data ( const sift3d_image *  )

Get a pointer to the image's data.

The user is supposed to fill the image using this pointer after the image was created with sift3d_make_image(). NB: Due to a strange whim of the author the image is in column-major order!

◆ sift3d_make_image()

SIFT3D_EXPORT sift3d_image * sift3d_make_image ( const int  nx,
const int  ny,
const int  nz,
const int  nc 
)

Make an image with specified dimensions.

The image must be freed with sift3d_free_image() when not needed.

Parameters
nxDimension 0
nyDimension 1
nzDimension 2
ncNumber of channels. Must be 1.

◆ sift3d_make_mat_rm()

SIFT3D_EXPORT sift3d_mat_rm * sift3d_make_mat_rm ( )

Create a matrix.

SIFT3D returns descriptors in arrays wrapped in this type. The actual array allocations are performed under the hood. Users of this library must free the matrix and its underlying array with sift3d_free_mat_rm when it's not needed anymore.

◆ sift3d_mat_rm_data()

SIFT3D_EXPORT void * sift3d_mat_rm_data ( sift3d_mat_rm *  )

Get a pointer to the data array of a matrix.

An actual type of the data can be queried with sift3d_mat_rm_type().

◆ sift3d_mat_rm_dimensions()

SIFT3D_EXPORT void sift3d_mat_rm_dimensions ( const sift3d_mat_rm *  ,
int *  num_cols,
int *  num_rows 
)

Get dimensions of a matrix.

Parameters
num_colsPoints to an area where the number of columns is written (if not NULL).
num_rowsPoints to an area where the number of rows is written (if not NULL).

◆ sift3d_read_image()

SIFT3D_EXPORT sift3d_image * sift3d_read_image ( const char *  path)

Read an image from a file.

The image must be freed with sift3d_free_image() when not needed. Currently only NifTi-1 images are supported (.nii or .nii.gz).