SOFA plugin: CImgPlugin  master
Open source framework for multi-physics simuation
cimg_library Namespace Reference

Namespaces

 cimg
 

Functions

template<typename T >
CImg< unsigned char > convertToUC (const CImg< T > &Image)
 
CImg< unsigned char > convertToUC (const CImg< bool > &Image)
 
CImg< unsigned char > convertToUC (const CImg< char > &Image)
 
template<typename T , typename F >
bool save_metaimage (const CImgList< T > &img, const char *const headerFilename, const F *const scale=0, const F *const translation=0, const F *const affine=0, F offsetT=0, F scaleT=0, int isPerspective=0)
 
template<typename T , typename F >
CImgList< T > load_metaimage (const char *const headerFilename, F *const scale=0, F *const translation=0, F *const affine=0, F *const offsetT=0, F *const scaleT=0, int *const isPerspective=nullptr)
 
template<typename T >
void copySubImage (CImg< T > &largeImage, const CImg< T > &subImage, unsigned posX, unsigned posY, unsigned posZ)
 
template<typename T >
const CImg< T > & save_inr (const CImg< T > &cimg, std::FILE *const file, const char *const filename, const float *const voxel_size, const float *const translation)
 Save image as an INRIMAGE-4 file \overloading. More...
 

Function Documentation

◆ convertToUC() [1/3]

CImg<unsigned char> cimg_library::convertToUC ( const CImg< bool > &  Image)
inline

◆ convertToUC() [2/3]

CImg<unsigned char> cimg_library::convertToUC ( const CImg< char > &  Image)
inline

◆ convertToUC() [3/3]

template<typename T >
CImg<unsigned char> cimg_library::convertToUC ( const CImg< T > &  Image)
inline

◆ copySubImage()

template<typename T >
void cimg_library::copySubImage ( CImg< T > &  largeImage,
const CImg< T > &  subImage,
unsigned  posX,
unsigned  posY,
unsigned  posZ 
)

Copy subImage in largeImage at the given pixel position (in the large image pixel coordinates)

Warning
for now both image must have the same type and same spectrum size

◆ load_metaimage()

template<typename T , typename F >
CImgList<T> cimg_library::load_metaimage ( const char *const  headerFilename,
F *const  scale = 0,
F *const  translation = 0,
F *const  affine = 0,
F *const  offsetT = 0,
F *const  scaleT = 0,
int *const  isPerspective = nullptr 
)

◆ save_inr()

template<typename T >
const CImg<T>& cimg_library::save_inr ( const CImg< T > &  cimg,
std::FILE *const  file,
const char *const  filename,
const float *const  voxel_size,
const float *const  translation 
)

Save image as an INRIMAGE-4 file \overloading.

◆ save_metaimage()

template<typename T , typename F >
bool cimg_library::save_metaimage ( const CImgList< T > &  img,
const char *const  headerFilename,
const F *const  scale = 0,
const F *const  translation = 0,
const F *const  affine = 0,
offsetT = 0,
scaleT = 0,
int  isPerspective = 0 
)