00001 /*
00002 * Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003 * All rights reserved.
00004 *
00005 * Author(s):
00006 * Edo Poll (poll@wins.uva.nl)
00007 */
00008
00009 #ifndef HxGauss1dImgGtor_h
00010 #define HxGauss1dImgGtor_h
00011
00012 #include "HxSubscribedImgGtor.h"
00013 #include "HxPointZ.h"
00014
00015 /*
00016
00017 Generate separated (1d) Gaussian filter.
00018 Taglist parameters are:
00019
00020 double sigma : standard deviation of the filter
00021 int derivative : order of the derivative
00022 double accuracy : truncation of the filter at accuracy*sigma; accuracy=3.0
00023 implies a 99\% filter mass criterion. Half width of the
00024 filter will be accuracy*sigma, unless "size" is specified.
00025 int maxSize : maximum size the filter is allowed to be
00026 int size : optional size can be specified. Size can otherwise
00027 be determined from paramaters.
00028 */
00029
00030 class HxGauss1dImgGtor : public HxSubscribedImgGtor
00031 {
00032 public:
00033 HxGauss1dImgGtor();
00034 virtual ~HxGauss1dImgGtor();
00035
00036 virtual void init(const HxTagList&);
00037
00038 virtual HxSizes domainSize() const;
00039 virtual HxVec3Double get(int x, int y, int z);
00040
00041 private:
00042 double _sigma;
00043 int _derivative;
00044 double _accuracy;
00045 int _maxSize;
00046 int _size;
00047
00048 int _filterSize; // actual size of the filter buffer
00049 double* _filter;
00050
00051 static int filterWidth(
00052 double sigma, int deri,
00053 double acc, int maxlen);
00054 int makeFilter(
00055 double sigma, int deri, double acc,
00056 int fsize,int maxfsize);
00057 };
00058
00059 #endif
1.2.12 written by Dimitri van Heesch,
© 1997-2001