libtpcimgp
 All Data Structures Files Functions Variables Typedefs Defines
Functions
include/imgtransform.h File Reference
#include <img.h>
Include dependency graph for imgtransform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int img2cube (IMG *img1, int dim, IMG *img2)
void imgScale (IMG *src, IMG *targ, float zoom, int method)
void integerScale (int frame, float ***src, float **targ, int width, int height, int zoom)

Function Documentation

int img2cube ( IMG *  img1,
int  dim,
IMG *  img2 
)

Resample image to cubic image volume, where all three dimensions are the the same, with cubic voxel sizes. Note that some smoothing occurs in the process, therefore the use of this function should be limited to illustrations of image data.

Returns:
Returns 0 if successful, otherwise <>0.
Parameters:
img1Pointer to IMG to be resliced; this image is not modified.
dimNew dimension; enter 0 to use the largest dimension in image
img2Pointer to initiated IMG where resliced data will be stored

Definition at line 53 of file imgtransform.c.

void imgScale ( IMG *  src,
IMG *  targ,
float  zoom,
int  method 
)

Image scaling using the defined method.

Parameters:
srcSource image to be scaled
targScaled image; must be allocated to the size of resulting image
zoomScaling factor
methodMethod code number

Definition at line 167 of file imgtransform.c.

References integerScale().

Referenced by test_imgTransform().

Here is the call graph for this function:

void integerScale ( int  frame,
float ***  src,
float **  targ,
int  width,
int  height,
int  zoom 
)

Simple integer scaling function using pixel duplication.

Parameters:
frameSerial number of the frame to be scaled
srcSource data in three dimensional array: srcp[y][x][frame]
targTarget data array: targ[y][x]
widthWidth of the source data matrix
heightHeight of the source data matrix
zoomScaling factor

Definition at line 200 of file imgtransform.c.

Referenced by imgScale().