/home/cquammen/packages/Clarity/include/Clarity.h File Reference

Go to the source code of this file.

Data Structures

struct  _Clarity_Dim3_t
 Type for specifying image 3D image dimensions. More...

Defines

#define C_FUNC_DEF
#define NULL   0L

Typedefs

typedef _Clarity_Dim3_t Clarity_Dim3
 Type for specifying image 3D image dimensions.

Enumerations

enum  ClarityResult_t {
  CLARITY_FFT_FAILED, CLARITY_OUT_OF_MEMORY, CLARITY_DEVICE_OUT_OF_MEMORY, CLARITY_INVALID_OPERATION,
  CLARITY_INVALID_ARGUMENT, CLARITY_SUCCESS
}
 Enumerates the number and type of errors that the Clarity library may produce. More...

Functions

C_FUNC_DEF Clarity_Dim3 Clarity_Dim3FromArray (int dimArray[3])
 Creates a Clarity_Dim from a three-element integer array representing dimensions in x, y, and z.
C_FUNC_DEF ClarityResult_t Clarity_Register ()
 Clients should call this function prior to calling any other Clarity function.
C_FUNC_DEF ClarityResult_t Clarity_UnRegister ()
 Clients should call this function when finished with the Clarity library.
C_FUNC_DEF ClarityResult_t Clarity_SetNumberOfThreads (unsigned n)
 Sets the number of threads that should be used by the Clarity library.
C_FUNC_DEF ClarityResult_t Clarity_ImagePadSpatialShift (float *dst, Clarity_Dim3 dstDim, float *src, Clarity_Dim3 srcDim, int shift[3], float fillValue)
 Utility function to create a new image of a desired size containing the shifted contents of the input image.
C_FUNC_DEF ClarityResult_t Clarity_ImageClip (float *dst, Clarity_Dim3 dstDim, float *src, Clarity_Dim3 srcDim)
 Utility function to clip out a portion of an image.
C_FUNC_DEF ClarityResult_t Clarity_WienerDeconvolve (float *inImage, Clarity_Dim3 imageDim, float *kernelImage, Clarity_Dim3 kernelDim, float *outImage, float epsilon)
 Applies a Wiener filter for deconvolution.
C_FUNC_DEF ClarityResult_t Clarity_JansenVanCittertDeconvolve (float *inImage, Clarity_Dim3 imageDim, float *kernelImage, Clarity_Dim3 kernelDim, float *outImage, int iterations)
 Classic Jansen-van Cittert formulation for constrained iterative deconvolution.
C_FUNC_DEF ClarityResult_t Clarity_SmoothedJansenVanCittertDeconvolve (float *inImage, Clarity_Dim3 imageDim, float *kernelImage, Clarity_Dim3 kernelDim, float *outImage, unsigned iterations, unsigned smoothInterval, float *smoothSigma[3])
 WARNING: This function's implementation is incomplete and produces undefined results.
C_FUNC_DEF ClarityResult_t Clarity_IDivergenceDeconvolve (float *inImage, Clarity_Dim3 imageDim, float *kernelImage, Clarity_Dim3 kernelDim, float *outImage)
 WARNING: This function's implementation is incomplete and produces undefined results.
C_FUNC_DEF ClarityResult_t Clarity_MaximumLikelihoodDeconvolve (float *inImage, Clarity_Dim3 imageDim, float *kernelImage, Clarity_Dim3 kernelDim, float *outImage, int iterations)
 Maximum-likelihood deconvolution method cited in the paper: J.B.
C_FUNC_DEF ClarityResult_t Clarity_BlindMaximumLikelihoodDeconvolve (float *outImage, float *inImage, float *psfImage, Clarity_Dim3 dim, unsigned iterations)
 Blind maximum-likelihood deconvolution method cited in the paper: J.B.
C_FUNC_DEF ClarityResult_t Clarity_Convolve (float *inImage, Clarity_Dim3 imageDim, float *kernel, Clarity_Dim3 kernelDim, float *outImage)
 Convolves two images of equal dimensions.


Define Documentation

#define C_FUNC_DEF

#define NULL   0L


Typedef Documentation

typedef struct _Clarity_Dim3_t Clarity_Dim3

Type for specifying image 3D image dimensions.


Enumeration Type Documentation

enum ClarityResult_t

Enumerates the number and type of errors that the Clarity library may produce.

Enumerator:
CLARITY_FFT_FAILED 
CLARITY_OUT_OF_MEMORY  Fast Fourier transform routine failed to execute.
CLARITY_DEVICE_OUT_OF_MEMORY  Host system ran out of memory while executing the function.
CLARITY_INVALID_OPERATION  Computational accelerator ran out of memory while executing the function.
CLARITY_INVALID_ARGUMENT  Operation is invalid for the arguments passed to it.
CLARITY_SUCCESS  Function executed successfully.


Function Documentation

C_FUNC_DEF ClarityResult_t Clarity_BlindMaximumLikelihoodDeconvolve ( float *  outImage,
float *  inImage,
float *  psfImage,
Clarity_Dim3  dim,
unsigned  iterations 
)

Blind maximum-likelihood deconvolution method cited in the paper: J.B.

Sibarita, Deconvolution microscopy, Adv. Biochem. Engin./Biotechnology (2005) 95: 201-243.

Parameters:
outImage Caller-allocated buffer holding result of Wiener filter. Dimensions of this buffer are given by dim.
inImage Image to be deconvolved. Dimensions of this buffer are given by dim.
psfImage Image of the point-spread function of the system that produced the image in the outImage parameter.
dim Dimension of outImage, inImage, and psfImage.
iterations Number of algorithm iterations to run.

C_FUNC_DEF ClarityResult_t Clarity_Convolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernel,
Clarity_Dim3  kernelDim,
float *  outImage 
)

Convolves two images of equal dimensions.

Parameters:
inImage Real image to convolve.
imageDim Dimensions of image to convolve.
kernel Convolution kernel.
kernelDim Dimensions of convolution kernel.
outImage Resulting real image of convolution of inImage and kernel.

C_FUNC_DEF Clarity_Dim3 Clarity_Dim3FromArray ( int  dimArray[3]  ) 

Creates a Clarity_Dim from a three-element integer array representing dimensions in x, y, and z.

Parameters:
dimArray The three-element array.
Returns:
The Clarity_Dim object.

C_FUNC_DEF ClarityResult_t Clarity_IDivergenceDeconvolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernelImage,
Clarity_Dim3  kernelDim,
float *  outImage 
)

WARNING: This function's implementation is incomplete and produces undefined results.

Unimplemented, but promising, deconvolution method based on the paper: J. Markham and J.A. Conchello, Fast maximum-likelihood image-restoration algorithms for three-dimensional fluorescence microscopy, J. Opt. Soc. Am. A, Vol. 18, No. 5, May 2001.

Warning:
Implementation incomplete.
Parameters:
inImage Image to be deconvolved. Dimensions of this buffer are given by imageDim.
imageDim Dimensions of inImage.
kernelImage Image of the blurring kernel of the system that produced the image in inImage.
kernelDim Dimensions of kernelImage.
outImage Caller-allocated buffer holding result of Wiener filter. Dimensions of this buffer are given by imageDim.

C_FUNC_DEF ClarityResult_t Clarity_ImageClip ( float *  dst,
Clarity_Dim3  dstDim,
float *  src,
Clarity_Dim3  srcDim 
)

Utility function to clip out a portion of an image.

Useful for truncating the result of a convolution of a padded image.

Parameters:
dst Destination buffer for clipped result. Buffer must be allocated by the caller.
dstDim Dimensions of the destination buffer. Implicitly represents a coordinate in the source image. The clipped image corresponds to cropping the source image from the origin to coordinate (x, y, z).
src Source buffer image to clip. Assumed to be larger or equal in size in all three dimensions to the clipped image.
srcDim Dimensions of the source buffer.

C_FUNC_DEF ClarityResult_t Clarity_ImagePadSpatialShift ( float *  dst,
Clarity_Dim3  dstDim,
float *  src,
Clarity_Dim3  srcDim,
int  shift[3],
float  fillValue 
)

Utility function to create a new image of a desired size containing the shifted contents of the input image.

Useful for padding and shifting convolution kernels.

Parameters:
dst Destination buffer for shifted result. Buffer must be allocated by the caller.
dstDim Dimensions of the destination buffer.
src Source buffer for image data to be shiftd.
srcDim Dimensions of the source buffer.
shift Three-element array corresponding the spatial shift in x, y, and z. Shifting operates cyclically across image boundaries.
fillValue Value to which pixels in parts of the new image not corresponding to a shifted pixel get set.

C_FUNC_DEF ClarityResult_t Clarity_JansenVanCittertDeconvolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernelImage,
Clarity_Dim3  kernelDim,
float *  outImage,
int  iterations 
)

Classic Jansen-van Cittert formulation for constrained iterative deconvolution.

Parameters:
inImage Image to be deconvolved. Dimensions of this buffer are given by imageDim.
imageDim Dimensions of inImage.
kernelImage Image of the blurring kernel of the system that produced the image in inImage.
kernelDim Dimensions of kernelImage.
outImage Caller-allocated buffer holding result of Wiener filter. Dimensions of this buffer are given by imageDim.
iterations Number of algorithm iterations to run.

C_FUNC_DEF ClarityResult_t Clarity_MaximumLikelihoodDeconvolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernelImage,
Clarity_Dim3  kernelDim,
float *  outImage,
int  iterations 
)

Maximum-likelihood deconvolution method cited in the paper: J.B.

Sibarita, Deconvolution microscopy, Adv. Biochem. Engin./Biotechnology (2005) 95: 201-243.

Parameters:
inImage Image to be deconvolved. Dimensions of this image are given by imageDim.
imageDim Dimensions of the input image.
kernelImage Image of the point-spread function of the system that produced. Dimensions of this image are given by psfDim.
kernelDim Dimensions of the PSF image.
outImage Caller-allocated buffer holding result of filter. Dimensions of this buffer are given by imageDim.
iterations Number of algorithm iterations to run.

C_FUNC_DEF ClarityResult_t Clarity_Register (  ) 

Clients should call this function prior to calling any other Clarity function.

Initializes underlying libraries and sets the number of threads to the number of cores on the system.

C_FUNC_DEF ClarityResult_t Clarity_SetNumberOfThreads ( unsigned  n  ) 

Sets the number of threads that should be used by the Clarity library.

Usually, you want this to be the same as the number of cores on the CPU. By default, Clarity runs on a number of threads equal to the number of cores on the CPU on which it is running.

Parameters:
n Number of threads on which to run.

C_FUNC_DEF ClarityResult_t Clarity_SmoothedJansenVanCittertDeconvolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernelImage,
Clarity_Dim3  kernelDim,
float *  outImage,
unsigned  iterations,
unsigned  smoothInterval,
float *  smoothSigma[3] 
)

WARNING: This function's implementation is incomplete and produces undefined results.

Implementation of the Jansen-van Cittert formulation for constrained iterative deconvolution that applies a smoothing step every few iterations to reduce noise amplification.

Warning:
Implementation incomplete.
Parameters:
inImage Image to be deconvolved. Dimensions of this buffer are given by imageDim.
imageDim Dimensions of inImage.
kernelImage Image of the blurring kernel of the system that produced the image in inImage.
kernelDim Dimensions of kernelImage.
outImage Caller-allocated buffer holding result of Wiener filter. Dimensions of this buffer are given by imageDim.
iterations Number of algorithm iterations to run.
smoothInterval Iteration interval between applications of smoothing.
smoothSigma Blurring Gaussian kernel parameters.

C_FUNC_DEF ClarityResult_t Clarity_UnRegister (  ) 

Clients should call this function when finished with the Clarity library.

It cleans up and releases resources used by the Clarity library.

C_FUNC_DEF ClarityResult_t Clarity_WienerDeconvolve ( float *  inImage,
Clarity_Dim3  imageDim,
float *  kernelImage,
Clarity_Dim3  kernelDim,
float *  outImage,
float  epsilon 
)

Applies a Wiener filter for deconvolution.

Parameters:
inImage Image to be deconvolved. Dimensions of this buffer are given by imageDim.
imageDim Dimensions of inImage.
kernelImage Image of the blurring kernel of the system that produced the image in inImage.
kernelDim Dimensions of kernelImage.
outImage Caller-allocated buffer holding result of Wiener filter. Dimensions of this buffer are given by imageDim.
epsilon Constant standing in place of the ratio between power spectra of noise and the power spectra of the underlying image, which are unknown parameters. In practice, acts as a smoothing factor. Typically set in the range 0.001 to 0.1.


Generated on Fri Dec 12 13:47:07 2008 for Clarity by  doxygen 1.4.7