Class CAAMModelSeq
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMObject
gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMModel
gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMModelSeq
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 $
AAM sequence object. This is a generalization of a multi-scale model.
- Author:
- Ruida Cheng
-
Field Summary
FieldsModifier and TypeFieldDescriptionAAM configuration vector.model vector.Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMModel
m_bUseConvexHull, m_bUseTangentSpace, m_CombinedPCA, m_dAddExtents, m_dAMFVersion, m_dBuildTime, m_DisplacementPCA, m_dMeanShapeSize, m_iCombinedTrunc, m_iLearningMethod, m_iModelReduction, m_iNShapes, m_iShapeTrunc, m_iTextureSamples, m_iTextureTrunc, m_mQgEV, m_mQsEV, m_mShape2PixelWeights, m_mShapeInstance, m_mTextureInstance, m_pAnalyzeSynthesize, m_pReferenceFrame, m_pShapeBasis, m_pTextureBasis, m_pTextureTF, m_R_c, m_R_t, m_sCurrentAnalyzeId, m_ShapePCA, m_sMeanAShape, m_TexturePCA, m_vMeanTexture, m_vMeanTextureOrg, m_vPoseParameterUpdateConstraints, m_vShapeParameterConstraintsMean, m_vShapeParameterConstraintsSD, m_vTextureVar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBuildFromSACF(String SACF, String inDir) Wrapper to build the sequential model from the given aam configuration files.voidBuildFromSACF(String SACF, String inDir, int excludeShape) Driver method for model generation.voidBuildFromSACF(String SACF, Vector<String> asfFiles, int excludeShape) Diver method for model generation.voiddispose()dispose memoryfinal CAAMModelGet the final modelfinal CAAMModelModel(int i) Get the model at level i.intModelScale(int i) final intNModels()Get the number of models.booleanReadModels(String samf) Reads the complete AAMModel from disk.voidScaleShape2Final(int model, CAAMShape shape) Scale a shape defined in 'model' coordinates to 'FinalModel' coordinates.voidScaleShape2Model(int model, CAAMShape shape) Scale a shape defined in 'FinalModel' coordinates to 'model' coordinates .booleanWriteModels(String filename) Wrapper to write the sequence AAM to diskbooleanWriteModels(String filename, boolean txt_only) Writes the sequence AAM to disk as a set of .txt and .amf files.Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMModel
AddExtents, ApproxExample, assign, Combined2ShapeParam, Combined2TexParam, CombinedPCA, ConstrainSearchParameters, EstimatePose, getNumberShapeParameters, IsConvexHullUsed, MeanShape, MeanShapeSize, MeanTexture, ModelEstimateTexDiff, ModelEstimateTexDiff, ModelImage, ModelImage, ModelImageEx, ModelReduction, NBands, NormalizeTexture, NTextureSamples, OptimizeModel, OptimizeModel, OptimizeModel, OptimizeModelByFineTuning, Qg, Qs, Rc, ReadModel, ReductionFactor, ReferenceFrame, ReferenceShape, Rt, SampleShape, SampleShape, SampleShape, SampleShape, SetPoseParameterUpdateConstraints, SetShapeParameterUpdateConstraints, Shape2Combined, Shape2Param, Shape2PixelWeights, ShapeBasis, ShapeFreeImage, ShapeFreeImage, ShapeFreeImage, ShapeInstance, ShapePCA, ShapePCAInstance, ShapeTex2Combined, ShapeTex2Param, ShapeTexParam2Combined, ShapeTexParam2Combined, ShapeTexParam2Combined, TextureBasis, TextureInstance, TexturePCA, TextureTF, WriteModel, WriteModel, WriteVarianceMapMethods inherited from class gov.nih.mipav.view.renderer.WildMagic.AAM.CAAMObject
FromFile, ToFile
-
Field Details
-
m_vModels
model vector. -
m_vACF
AAM configuration vector.
-
-
Constructor Details
-
CAAMModelSeq
public CAAMModelSeq()Default multi-scale constructor.
-
-
Method Details
-
Model
Get the model at level i.- Parameters:
i- level- Returns:
- corresponding model in model vetor
-
NModels
public final int NModels()Get the number of models.- Returns:
- number of models
-
FinalModel
Get the final model- Returns:
- last element
-
ModelScale
public int ModelScale(int i) -
dispose
public void dispose()dispose memory -
BuildFromSACF
Wrapper to build the sequential model from the given aam configuration files.- Parameters:
SACF- aam configuration sequential fileinDir- file dir
-
BuildFromSACF
Driver method for model generation. This method automates the model generation as much as possible by using the various class methods for all the sequences in the task of producing a model.- Parameters:
SACF- Filename of a sequence ACF, which is a file containing a list of acfs, one per line. E.g.scale4_convex_hull.acf scale4_whiskers.acf scale4.acf scale2.acf scale1.acf inDir- Input directory where annotations (.asf) resides.excludeShape- Excludes one shape number 'excludeShape' from the input directory. Default -1, i.e. no shapes are removed. Used to perform leave-one-out testing.
-
BuildFromSACF
Diver method for model generation. This method automates the model generation as much as possible by using the various class methods for all the sequences in the task of producing a model.- Parameters:
SACF- Filename of a sequence ACF, which is a file containing a list of acfs, one per line. E.g.scale4_convex_hull.acf scale4_whiskers.acf scale4.acf scale2.acf scale1.acf asfFiles- Vector of asf filenames.excludeShape- Excludes one shape number 'excludeShape' from the input directory. Default -1, i.e. no shapes are removed. Used to perform leave-one-out testing.
-
WriteModels
Wrapper to write the sequence AAM to disk- Parameters:
filename- file name- Returns:
- success or not
-
WriteModels
Writes the sequence AAM to disk as a set of .txt and .amf files. Filenames are determined from the ACF file names.- Parameters:
filename- Filename of the output .samf-file.txt_only- If true, binary model data is not written.- Returns:
- true on success, false on file errors.
-
ReadModels
Reads the complete AAMModel from disk.- Parameters:
filename- Input filename (.samf).- Returns:
- true on success, false on file errors.
-
ScaleShape2Model
Scale a shape defined in 'FinalModel' coordinates to 'model' coordinates .- Parameters:
model- The model the input shape are scaled to.shape- Input shape, which going to be scaled.
-
ScaleShape2Final
Scale a shape defined in 'model' coordinates to 'FinalModel' coordinates.- Parameters:
model- The model the input shape are scaled from.shape- Input shape, which going to be scaled.
-