Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxConvGauss3d.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxConvGauss3d (HxImageRep img, double sigmax, int orderDerivx, double accuracyx, double sigmay, int orderDerivy, double accuracyy, double sigmaz, int orderDerivz, double accuracyz)
 HxConvGauss3d. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxConvGauss3d HxImageRep    img,
double    sigmax,
int    orderDerivx,
double    accuracyx,
double    sigmay,
int    orderDerivy,
double    accuracyy,
double    sigmaz,
int    orderDerivz,
double    accuracyz
 

HxConvGauss3d.

Equivalent to: img.genConv3dSep(gaussx, gaussy, gaussz, "mul", "addAssign", HxImageRep::ARITH_PREC)

where gaussx, gaussy, gaussz are the 1d double-precision Gaussian kernels based on the respective sets of sigma, orderDeriv, accuracy parameters.

Notice that the kernel is applied to every dimension of the image separately and that the result image has a double-precision pixel type.

00019 {
00020     HxString fname("HxConvGauss3d");
00021 
00022     HxImageRep gaussx, gaussy, gaussz;
00023 
00024     if (img.isNull())
00025     {
00026         HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID);
00027         return HxImageRep();
00028     }
00029     if (sigmax <= 0.0)
00030     {
00031         HxGlobalError::instance()->reportError(fname, img.name(), "sigmax is equal to or less than zero", HxGlobalError::HX_GE_INVALID);
00032         return HxImageRep();
00033     }
00034     if (sigmay <= 0.0)
00035     {
00036         HxGlobalError::instance()->reportError(fname, img.name(), "sigmay is equal to or less than zero", HxGlobalError::HX_GE_INVALID);
00037         return HxImageRep();
00038     }
00039     if (sigmaz <= 0.0)
00040     {
00041         HxGlobalError::instance()->reportError(fname, img.name(), "sigmaz is equal to or less than zero", HxGlobalError::HX_GE_INVALID);
00042         return HxImageRep();
00043     }
00044     if (orderDerivx < 0)
00045     {
00046         HxGlobalError::instance()->reportError(fname, img.name(), "orderDerivx is less than 0", HxGlobalError::HX_GE_INVALID);
00047         return HxImageRep();
00048     }
00049     if (orderDerivy < 0)
00050     {
00051         HxGlobalError::instance()->reportError(fname, img.name(), "orderDerivy is less than 0", HxGlobalError::HX_GE_INVALID);
00052         return HxImageRep();
00053     }
00054     if (orderDerivz < 0)
00055     {
00056         HxGlobalError::instance()->reportError(fname, img.name(), "orderDerivz is less than 0", HxGlobalError::HX_GE_INVALID);
00057         return HxImageRep();
00058     }
00059 
00060     if (truncationx < 0)
00061     {
00062         HxGlobalError::instance()->reportError(fname, img.name(), "truncationx is less than 0", HxGlobalError::HX_GE_INVALID);
00063         return HxImageRep();
00064     }
00065     if (truncationy < 0)
00066     {
00067         HxGlobalError::instance()->reportError(fname, img.name(), "truncationy is less than 0", HxGlobalError::HX_GE_INVALID);
00068         return HxImageRep();
00069     }
00070     if (truncationz < 0)
00071     {
00072         HxGlobalError::instance()->reportError(fname, img.name(), "truncationz is less than 0", HxGlobalError::HX_GE_INVALID);
00073         return HxImageRep();
00074     }
00075 
00076     if (img.signature().imageDimensionality() != 3)
00077     {
00078         HxGlobalError::instance()->reportError(fname, "only defined for 3D images", HxGlobalError::HX_GE_INVALID);
00079         return HxImageRep();
00080     }
00081 
00082     gaussx = HxMakeGaussian1d(sigmax, orderDerivx, truncationx,
00083         img.dimensionSize(1));
00084     gaussy = HxMakeGaussian1d(sigmay, orderDerivy, truncationy,
00085         img.dimensionSize(2));
00086     gaussz = HxMakeGaussian1d(sigmaz, orderDerivz, truncationz,
00087         img.dimensionSize(3));
00088 
00089     return img.genConv3dSep(gaussx, gaussy, gaussz,
00090                             "mul", "addAssign", HxImageRep::ARITH_PREC);
00091 }


Generated on Mon Jan 27 15:48:52 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001