[Insight-users] ShapePriorMAPCostFunction and GeodesicActiveContourShapePriorLevelSetImageFilter

Lydia Ng lng at insightful.com
Mon, 12 Jan 2004 11:46:11 -0800


This is a multi-part message in MIME format.

------_=_NextPart_001_01C3D944.BB131737
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi Lucas,
=20
I've just updated/fixed  the documentation of =20
PCAShapeSignedDistanceFunction which will help towards answering your
questions:
=20
/** \class PCAShapeSignedDistanceFunction
 * \brief Compute the signed distance from a N-dimensional PCA Shape.
 *
 * This class computes the signed distance from a N-dimensional shape =
defined
 * by:
 * (1) a mean signed distance image \f$ M(x) \f$,=20
 * (2) the first \f$ q \f$ principal components images=20
 * \f$ P_i(x) \f$ and=20
 * (3) a transform \f$ T(x) \f$ to define the pose=20
 * (i.e. position or orientation of the shape).
 *
 * A particular instance of the shape is defined by a set of parameters =
\f$ p
\f$.=20
 * The first \f$ q \f$ parameters defines the weights applied to each
principal components=20
 * and the remaining parameters is used to define the transform. The =
user
 * should refer to the documentation of the particular Transform class =
being
used.
 * The first set of parameters are called the ShapeParameters and the
remaining
 * parameters the PoseParameters.
 *
 * The method Evaluate( point x ) returns the approximate signed to the=20
 * shape at point x such that:
 *
 * \f[ s =3D M(T(x)) + \sum_i^{q} p[i] * \sigma[i] * P_i(T(x)) \f]
 *=20
 * Where \sigma[i] are the square root of the eigenvalues. These are =
defined
using
 * method SetPrincipalComponentStandardDeviations().
 *
 * This class is templated over the coordinate representation type=20
 * (e.g. float or double) and the space dimension.
 *
 * \sa ShapeSignedDistanceFunction
 * \sa Transform
 * \ingroup ImageFunctions
 *=20
 * */
=20
If you are using PCA to define your shape.=20
You should connect the mean image and principal components images to the
PCASignedDistancedFunction and set the square root of the=20
eigenvalues as the PrincipalComponentStandardDeviations.
=20
--------------------------------------
Answer to Question (1)
Since, the eigenvalues are already taken care of in the
PCASignedDistanceFunction.
In the ShapePriorMAPCostFunction you should=20
SetShapeParametersMeans() to all zeros (of the length =3D number of =
principal
components used) and
SetShapeParametersStandardDeviations to all ones (length =3D num =
principal.
Comp.).
=20
-----------------------------------
Answer to Question (3)
As described above, the transform is used to define the pose of your =
shape.=20
In general the PCA will describes variations in your shape=20
e.g. in Leventon's paper he shows an example that captures the variation
scale, bending and curvature of the corpus callosum.
The cost function restricts large variation of this model.
However, he does not restrict the position of the shape - which he =
assumes a
uniform distribution.
=20
In this implementation, the transform captures the position/orientation =
of
the shape. Any type of transform can be use e.g
translation or rigid.=20
=20
----------------------------------------
Answer to Question (2)
filter->SetInitialParameters( parameters );
=20
This set the initial parameters applied to the shape function component =
of
the filter.=20
For example, if I am using 3 principal components and a translation =
transform
and I want to start off with the mean shape and physical location (40.0,
50.0)
Then I should set the initial parameters to:
=20
parameters[0] =3D 0.0;  // weight applied to principal component 0
parameters[1] =3D 0.0; // weight applied to principal component 1
parameters[2] =3D 0.0; // weight applied to principal component 2
parameters[3] =3D 40.0;
parameters[4] =3D 50.0;
=20
----------------------------------------
Does this help?
=20
- Lydia
=20
=20
=20
-----Original Message-----
From: Lucas Lorenzo [mailto:lucas at cvrti.utah.edu]=20
Sent: Friday, January 09, 2004 9:31 AM
To: Insight-users at itk.org
Subject: [Insight-users] ShapePriorMAPCostFunction and
GeodesicActiveContourShapePriorLevelSetImageFilter
=20
Hi all,=20
=20
I'm using ShapePriorMAPCostFunction and
GeodesicActiveContourShapePriorLevelSetImageFilter based on the test
ITK/Testing/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetIma=
geFi
lterTest_2.cxx=20
So, I have three questions:=20
=20
1) when using ShapePriorMAPCostFunction what do SetShapeParameterMeans =
and
SetShapeParameterStandardDeviations represent. In my case I'm working =
with 5
principal components so my understanding is that each of the arrays =
passed to
both of these methods will be of length 5, but I can't understand where
should I get these values from.=20
=20
2) In the test file mentioned before an object (called filter) of class
GeodesicActiveContourShapePriorLevelSetImageFilter is defined. At a =
certain
point an array (called parameters) of type ParametersType is defined and =
then
the following member function is called=20
=20
filter->SetInitialParameters( parameters );=20
=20
I couldn't find the SetInitialParameters member function within the list =
of
all members of GeodesicActiveContourShapePriorLevelSetImageFilter. So my
doubt is what should be loaded into parameters ?=20
=20
3) Finally, the following is done:=20
=20
// Set up a translation transform=20
//=20
typedef itk::TranslationTransform<double,ImageDimension> TransformType;=20
TransformType::Pointer transform =3D TransformType::New();=20
and then the transform is passed to the object shape of class
PCAShapeSignedDistanceFunction=20
=20
shape->SetTransform( transform );=20
=20
What is this transform used for ?=20
=20
Sorry for asking all these questions. I feel that most of them have more =
to
do with the algorithm being implemented rather than ITK itself but when
reading the reference paper many of these details are missing.=20
Cheers,=20
=20
Lucas Lorenzo=20
=20
University of Utah=20
Nora Eccles Harrison CardioVascular Research and Training Institute=20
Fellows Room=20
95 South 2000 East=20
Salt Lake City, UT 84112-5000=20
=20
e-mail: lucas at cvrti.utah.edu=20

------_=_NextPart_001_01C3D944.BB131737
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml at 01C3D901.AC4B5A40">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PostalCode"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"State"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"City"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PlaceName"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"PlaceType"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"time"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"date"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"country-region"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"place"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
  at font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
	{mso-style-type:personal-reply;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
 at page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><!-- Converted from text/enriched format -->Hi =
Lucas,<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>I&#8217;ve just updated/fixed <span
style=3D'mso-spacerun:yes'>&nbsp;</span>the documentation of<span
style=3D'mso-spacerun:yes'>&nbsp; </span><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DSpellE><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>PCAShapeSignedDistanceFunction</span></font></=
span>
which will help towards answering your questions:<o:p></o:p></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>/** \class <span =
class=3DSpellE>PCAShapeSignedDistanceFunction</span><o:p></o:p></span></f=
ont></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \brief Compute =
the signed
distance from <span class=3DGramE>a</span> N-dimensional PCA =
Shape.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* This class =
computes the
signed distance from <span class=3DGramE>a</span> N-dimensional shape =
defined<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* <span =
class=3DGramE>by</span>:<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* (1) a mean =
signed
distance image \f$ M(x) \f$, <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* (2) <span =
class=3DGramE>the</span>
first \f$ q \f$ principal components images =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \f$ <span =
class=3DSpellE>P_i</span>(x)
\f$ and <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* (3) <span =
class=3DGramE>a</span>
transform \f$ T(x) \f$ to define the pose <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span><span =
class=3DGramE>* (i.e.
position or orientation of the =
shape).</span><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* A particular =
instance of
the shape is defined by a set of parameters \f$ p \f$. =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* The first \f$ q =
\f$
parameters defines the weights applied to each principal components =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* <span =
class=3DGramE>and</span>
the remaining parameters is used to define the transform. The =
user<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* should refer to =
the
documentation of the particular Transform class being =
used.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* The first set of
parameters are called the <span class=3DSpellE>ShapeParameters</span> =
and the
remaining<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* <span =
class=3DGramE>parameters</span>
the <span =
class=3DSpellE>PoseParameters</span>.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* The method <span
class=3DGramE>Evaluate(</span> point x ) returns the approximate signed =
to the <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* <span =
class=3DGramE>shape</span>
at point x such that:<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \<span =
class=3DGramE>f[</span>
s =3D M(T(x)) + \<span class=3DSpellE>sum_i</span>^{q} p[<span =
class=3DSpellE>i</span>]
* \sigma[<span class=3DSpellE>i</span>] * <span =
class=3DSpellE>P_i</span>(T(x)) \f]<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* Where =
\sigma[<span
class=3DSpellE>i</span>] are the square root of the <span =
class=3DSpellE>eigenvalues</span>.
These are defined using<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* <span =
class=3DGramE>method</span>
<span =
class=3DSpellE>SetPrincipalComponentStandardDeviations</span>().<o:p></o:=
p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* This class is =
<span
class=3DSpellE>templated</span> over the coordinate representation type =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* (e.g. float or =
double)
and the space dimension.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span =
style=3D'mso-spacerun:yes'>&nbsp;</span>*<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \<span =
class=3DSpellE>sa</span>
<span =
class=3DSpellE>ShapeSignedDistanceFunction</span><o:p></o:p></span></font=
></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \<span =
class=3DSpellE>sa</span>
Transform<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* \<span =
class=3DSpellE>ingroup</span>
<span class=3DSpellE>ImageFunctions</span><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><span style=3D'mso-spacerun:yes'>&nbsp;</span>* =
*/<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>If you are using PCA to define your =
shape.</span></font></span>
<o:p></o:p></p>

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>You should connect the mean image and principal components =
images to
the<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DSpellE><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>PCASignedDistancedFunction</span></font></span=
> and
set the square root of the <o:p></o:p></p>

<p class=3DMsoPlainText><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>eigenvalues</span></font></span></span>
as the <span =
class=3DSpellE>PrincipalComponentStandardDeviations</span>.<o:p></o:p></p=
>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>-----------------=
---------------------<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Answer to =
Question (1)<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Since, the <span
class=3DSpellE>eigenvalues</span> are already taken care of in the <span
class=3DSpellE>PCASignedDistanceFunction</span>.<o:p></o:p></span></font>=
</p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>In the <span
class=3DSpellE>ShapePriorMAPCostFunction</span> you should =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DSpellE><span class=3DGramE><font =
size=3D2
color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:navy'>SetShapeParametersMeans</span></font></span></span><span
class=3DGramE><font color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;
color:navy'>(</span></font></span><font color=3Dnavy face=3DArial><span
style=3D'font-family:Arial;color:navy'>) to all zeros (of the length =3D =
number of principal
components used) and<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DSpellE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>SetShapeParameter=
sStandardDeviations</span></font></span><font
color=3Dnavy face=3DArial><span style=3D'font-family:Arial;color:navy'> =
to all ones (length
=3D num principal. Comp.).<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>-----------------=
------------------<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Answer to =
Question (3)<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>As described =
above, the
transform is used to define the pose of your shape. =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>In general the =
PCA will
describes variations in your shape <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>e.g</span></font>=
</span><font
color=3Dnavy face=3DArial><span style=3D'font-family:Arial;color:navy'>. =
in <span
class=3DSpellE>Leventon&#8217;s</span> paper he shows an example that =
captures
the variation scale, bending and curvature of the corpus <span =
class=3DSpellE>callosum</span>.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>The cost =
function
restricts large variation of this model.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>However, he does =
not
restrict the position of the shape &#8211; which he assumes a uniform
distribution.<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>In this =
implementation,
the transform captures the position/orientation of the shape. Any type =
of
transform can be use <span =
class=3DSpellE>e.g</span><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>translation</span=
></font></span><font
color=3Dnavy face=3DArial><span style=3D'font-family:Arial;color:navy'> =
or rigid. <o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>-----------------=
-----------------------<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Answer to =
Question (2)<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>filter</span></font></span>-&gt;<span =
class=3DSpellE>SetInitialParameters</span>(
parameters );<o:p></o:p></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>This set the =
initial
parameters applied to the shape function component of the filter. =
<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>For example, if =
I am
using 3 principal components and a translation transform and I want to =
start
off with the mean shape and physical location (40.0, =
50.0)<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Then I should =
set the
initial parameters to:<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>parameters[</span=
></font></span><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>0] =3D 0.0;<span
style=3D'mso-spacerun:yes'>&nbsp; </span>// weight applied to principal =
component
0<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>parameters[</span=
></font></span><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>1] =3D 0.0; //
weight applied to principal component 1<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>parameters[</span=
></font></span><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>2] =3D 0.0; //
weight applied to principal component 2<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>parameters[</span=
></font></span><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>3] =3D =
40.0;<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><span class=3DGramE><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>parameters[</span=
></font></span><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>4] =3D =
50.0;<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;</span><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>-----------------=
-----------------------<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Does this =
help?<o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>- =
</span></font><st1:country-region><st1:place><font
  color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'>Lydia</span></font></st1:place></s=
t1:country-region><font
color=3Dnavy face=3DArial><span =
style=3D'font-family:Arial;color:navy'><o:p></o:p></span></font></p>

<p class=3DMsoPlainText><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in =
0in 4.0pt'>

<p class=3DMsoNormal><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Lucas Lorenzo
[mailto:lucas at cvrti.utah.edu] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> =
</span></font><st1:date
Month=3D"1" Day=3D"9" Year=3D"2004"><font size=3D2 face=3DTahoma><span =
style=3D'font-size:
 10.0pt;font-family:Tahoma'>Friday, January 09, =
2004</span></font></st1:date><font
size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma'> </span></font><st1:time
Hour=3D"9" Minute=3D"31"><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
 font-family:Tahoma'>9:31 AM</span></font></st1:time><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'><br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
Insight-users at itk.org<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [Insight-users]
ShapePriorMAPCostFunction and =
GeodesicActiveContourShapePriorLevelSetImageFilter</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Hi all, <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>I'm using ShapePriorMAPCostFunction and
GeodesicActiveContourShapePriorLevelSetImageFilter based on the test
ITK/Testing/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetIma=
geFilterTest_2.cxx
<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>So, I have three questions: <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>1) when using ShapePriorMAPCostFunction what do =
SetShapeParameterMeans
and <font color=3Dblack><span =
style=3D'color:black'>SetShapeParameterStandardDeviations</span></font>
represent. In my case I'm working with 5 principal components so my
understanding is that each of the arrays passed to both of these methods =
will
be of length 5, but I can't understand where should I get these values =
from. <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>2) In the test file mentioned before an object (called filter) =
of class
GeodesicActiveContourShapePriorLevelSetImageFilter is defined. At a =
certain
point an array (called parameters) of type ParametersType is defined and =
then
the following member function is called <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>filter-&gt;SetInitialParameters( parameters ); =
<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>I couldn't find the SetInitialParameters member function within =
the
list of all members of =
GeodesicActiveContourShapePriorLevelSetImageFilter. So
my doubt is what should be loaded into parameters ? =
<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>3) Finally, the following is done: <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>// Set up a translation transform <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>// <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>typedef itk::TranslationTransform&lt;double,ImageDimension&gt;
TransformType; <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>TransformType::Pointer transform =3D TransformType::New(); =
<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>and then the transform is passed to the object shape of class
PCAShapeSignedDistanceFunction <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>shape-&gt;SetTransform( transform ); =
<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>What is this transform used for ? <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Sorry for asking all these questions. I feel that most of them =
have
more to do with the algorithm being implemented rather than ITK itself =
but when
reading the reference paper many of these details are missing. =
<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cheers, <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Lucas Lorenzo <o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><st1:place><st1:PlaceType><font size=3D3 =
face=3D"Times New Roman"><span
  style=3D'font-size:12.0pt'>University</span></font></st1:PlaceType> of =
<st1:PlaceName>Utah</st1:PlaceName></st1:place>
<o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Nora Eccles Harrison CardioVascular Research and Training =
Institute <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Fellows Room <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>95 South 2000 East <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><st1:place><st1:City><font size=3D3 face=3D"Times =
New Roman"><span
  style=3D'font-size:12.0pt'>Salt Lake City</span></font></st1:City>, =
<st1:State>UT</st1:State>
 <st1:PostalCode>84112-5000</st1:PostalCode></st1:place> <o:p></o:p></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>e-mail: lucas at cvrti.utah.edu <o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>

------_=_NextPart_001_01C3D944.BB131737--