Class CAAMOptimize
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMOptimize
- All Implemented Interfaces:
CDOptimizeFuncBase
This is the Java modified version of C++ active appearance model API
(AAM_API). It is modified with a subset of required functions for automatic
MRI prostate segmentation.
AAM-API LICENSE - file: license.txt
This software is freely available for non-commercial use such as
research and education. Please see the full disclaimer below.
All publications describing work using this software should cite
the reference given below.
Copyright (c) 2000-2003 Mikkel B. Stegmann, mbs@imm.dtu.dk
IMM, Informatics invalid input: '&' Mathematical Modelling
DTU, Technical University of Denmark
Richard Petersens Plads, Building 321
DK-2800 Lyngby, Denmark
http://www.imm.dtu.dk/~aam/
REFERENCES
Please use the reference below, when writing articles, reports etc. where
the AAM-API has been used. A draft version the article is available from
the homepage.
I will be happy to receive pre- or reprints of such articles.
/Mikkel
-------------
M. B. Stegmann, B. K. Ersboll, R. Larsen, "FAME -- A Flexible Appearance
Modelling Environment", IEEE Transactions on Medical Imaging, IEEE, 2003
(to appear)
-------------
3RD PART SOFTWARE
The software is partly based on the following libraries:
- The Microsoft(tm) Vision Software Developers Kit, VisSDK
- LAPACK
DISCLAIMER
This software is provided 'as-is', without any express or implied warranty.
In no event will the author be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use this software for any non-commercial
purpose, and to alter it, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
--
No guarantees of performance accompany this software, nor is any
responsibility assumed on the part of the author or IMM.
This software is provided by Mikkel B. Stegmann and IMM ``as is'' and any
express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are
disclaimed. In no event shall IMM or Mikkel B. Stegmann be liable for any
direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused and
on any theory of liability, whether in contract, strict liability, or tort
(including negligence or otherwise) arising in any way out of the use of
this software, even if advised of the possibility of such damage.
$Revision: 1.4 $
$Date: 2003/04/23 14:49:15 $
General purpose optimization of the AAM.
- Author:
- Ruida Cheng
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doublescale fit of AAMprivate doubleThe minimum fit.private intThe similarity measure to be used.private final ModelSimpleImageThe image where the optimization shuold be done.private final CAAMModelThe AAM model.private final CAAMShapeThe initial shape pose.private CAAMShapeThe minimum fit shape.private CDVectorThe difference vector.private CDVectorThe minimum fit model parameters. -
Constructor Summary
ConstructorsConstructorDescriptionCAAMOptimize(CAAMModel aammodel, CAAMShape s, ModelSimpleImage image, int similaritym) Constructor for the AAM optimizer. -
Method Summary
Modifier and TypeMethodDescriptiondoubleEvalFunction(CDVector vX) Fuction to be optimized.voidEvalGradient(CDVector vX, CDVector vGradient) evaluates the analytic gradient at postion vX (if exists)doubleReturn scale fit of AAMvoidOptResults(CDVector c, CAAMShape s, double[] fit) Returns the optimisation results as c, shape and error.voidfunction used to update e.g. interface
-
Field Details
-
m_pModel
The AAM model. -
m_pShape
The initial shape pose. -
m_pImage
The image where the optimization shuold be done. -
m_iSimilarityMeasure
private int m_iSimilarityMeasureThe similarity measure to be used. -
m_vDiff
The difference vector. -
m_dMinFit
private double m_dMinFitThe minimum fit. -
m_sMinShape
The minimum fit shape. -
m_vMinC
The minimum fit model parameters. -
m_dFit
private double m_dFitscale fit of AAM
-
-
Constructor Details
-
CAAMOptimize
Constructor for the AAM optimizer. Sets uo initial info about AAM, shape and the image the model should optimized on.- Parameters:
aammodel- The AAM.s- The initial shape pose being optimized.image- The image on which the optimization shall be done.similaritym- The simlarity measure to be used
-
-
Method Details
-
EvalGradient
evaluates the analytic gradient at postion vX (if exists)- Specified by:
EvalGradientin interfaceCDOptimizeFuncBase
-
Update
function used to update e.g. interface- Specified by:
Updatein interfaceCDOptimizeFuncBase
-
FinalFrror
public double FinalFrror()Return scale fit of AAM- Returns:
-
EvalFunction
Fuction to be optimized. Function providing a scalar interpretation of the AAM fit based on a set of paramters.- Specified by:
EvalFunctionin interfaceCDOptimizeFuncBase- Parameters:
vX- The independent parameters that will be optimized. The first n-4 elements constitues the normal model parameters of the AAM. The last four are the pose parameters.- Returns:
- The scalar fit of the AAM.
-
OptResults
Returns the optimisation results as c, shape and error. This is to avoid and extra conversion after ended optimisation, and worse, an extra image sampling to get the error.- Parameters:
c- The optimal model parameters.s- The optimal shape.s- The optimal error.
-