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

HxParabolicErosion.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxParabolicErosion (HxImageRep img, double rho, double accuracy=3.0)
 Parabolic erosion. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxParabolicErosion HxImageRep    img,
double    rho,
double    accuracy = 3.0
 

Parabolic erosion.

Equivalent to : img.genConvSeparated( parabola, "add", "minAssign", HxImageRep::ARITH_PREC)

where parabola is the 1d double-precision parabolic kernel based on rho and accuracy.

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

00017 {
00018     HxString fname("HxParabolicErosion");
00019 
00020     if (img.isNull())
00021     {
00022         HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID);
00023         return HxImageRep();
00024     }
00025 
00026     if (rho <= 0.0)
00027     {
00028         HxGlobalError::instance()->reportError(fname, img.name(), "invalid value of rho", HxGlobalError::HX_GE_INVALID);
00029         return HxImageRep();
00030     }
00031     if (accuracy < 0.0)
00032     {
00033         HxGlobalError::instance()->reportError(fname, img.name(), "invalid value of accuracy", HxGlobalError::HX_GE_INVALID);
00034         return HxImageRep();
00035     }
00036 
00037     int minSize = HxImageMinSize(img);
00038     HxImageRep parabola = HxMakeParabola1d(-rho, accuracy, minSize);
00039     return img.genConvSeparated(
00040         parabola, "add", "minAssign", HxImageRep::ARITH_PREC);
00041 }


Generated on Tue Feb 3 14:18:50 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001