Woolz Image Processing  Version 1.7.5
WlzGeoModelFilters.c File Reference

Filters for geometric models (GM's). More...

Functions

WlzErrorNum WlzGMFilterFlipOrient (WlzGMModel *model)
 Flips the orientation of edges in 2D models and faces in 3D models. This is done in place. More...
 
WlzErrorNum WlzGMFilterRmSmShells (WlzGMModel *model, int minSpx)
 Removes small shells from the given geometric model. More...
 
WlzErrorNum WlzGMFilterGeomLP (WlzGMModel *model, double kPB, double kSB, double dPB, double dSB, int maxItr, int nonMan)
 Performs a low pass filtering operation on the geometry of the model, given the band pass and band stop filter parameters. These parameters specify the transfer function of the low pass filter. More...
 
WlzErrorNum WlzGMFilterGeomLPParam (double *dstLambda, double *dstMu, int *dstNItr, double kPB, double kSB, double dPB, double dSB)
 Computes the values of \(\lambda\) and \(\mu\) from the given low pass filter parameters \(k_{PB}\), \(k_{SB}\), \(\delta_{PB}\) and \(\delta_{SB}\). Valid filter parameters require: \(0 < k_{PB} < 1\), \(k_{PB} < k_{SB} < 2\), \(0 < \delta_{PB} < 1\) and \(0 < \delta_{SB} < 1\). If the parameters are outside of these ranges an error is returned, but these constrants are not sufficient for a good filter. Design tips are don't make the transition band too narrow (keep \(k_{PB}\) away from \(k_{SB}\)) and don't make \(\delta_{PB}\) or \(\delta_{SB}\) too small (try values of 0.1 for \(\delta_{PB}\) and \(\delta_{SB}\)). Good values for \(k_{PB}\) are probably in the range \([0.01-0.1]\). The values of \(\lambda\) and \(\mu\) in the transfer function of the filter

\[ f(k) = ((1 - {\lambda}k)(1 - {\mu}k))^N \]

are constrained by:

\[ 0 < N \]

\[ 0 < \lambda < -\mu < 1 \]

\[ \lambda < \frac{1}{k_{SB}} \]

\[ \frac{1}{\lambda} + \frac{1}{\mu} = k_{PB} \]

\[ {\left(\frac{{(\lambda - \mu)}^2} {-4\lambda\mu}\right)}^N < 1 + \delta_{PB} \]

\[ {\left(\frac{1 - \lambda k_{SB}} {1 - \mu k_{SB}}\right)}^N < \delta_{SB} \]

Following Taubin's fairing paper an additional constraint is imposed \(f(1) = -f(2)\), which allows a simple algebraic solution for \(\lambda\), \(\mu\). The value of \(N\) is then computed by taking the maximum of \(N_{PB}\) and \(N_{SB}\). So the algorithm used to compute the values of \(\lambda\), \(\mu\) and \(N\) is:

\[ \lambda = \frac{1}{3 k_{PB} - 5} (k_{PB} - \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \]

\[ \mu = \frac{1}{3 k_{PB} - 5} (k_{PB} + \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \]

\[ N_{PB} = \frac{\ln{(1 + \delta_{PB})}} {\ln{({(\lambda - \mu)}^2 (-4 \lambda \mu))}} \]

\[ N_{SB} = \frac{\ln{(\delta_{SB})}} {\ln{((1 - \lambda k_{SB})(1 - \mu k_{SB}))}} \]

\[ N = \max{(N_{PB}, N_{SB})} \]

. More...

 
WlzErrorNum WlzGMFilterGeomLPLM (WlzGMModel *model, double lambda, double mu, int nItr, int nonMan)
 Given values of \(\lambda\), \(\mu\) and the number of itterations \(N\), applies a low pass filter to the geometry of the given model. More...
 

Detailed Description

Filters for geometric models (GM's).

Author
Bill Hill
Date
November 2000
Version
Id
15e485c9e00127b4a79957091deaa0b037472b02
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Function Documentation