<div dir="ltr"><div><div><div><div><div>First of all, thanks for the answer. Unfortunately, I don't think that "means" stands for "...the mean from each dimension of your data...". <br><br>In the example the author creates two arrays (mean and stddev) <span class="im"></span> with a length equal to the number of Principal Components, so, when he writes "mean.Fill(0.0)" he expects:<br></div>a) one different mean for each Principal Component (of course, it could be the same, but he offers the chance to choose different means)<br></div>b) a double value, not an array with a value for x, y and z.<br><br></div>That's why I think your hint isn't right, unluckily.<br><br></div>Anyway, I really appreciate the time you spent on solving my question,<br><br></div>Viki.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-30 11:13 GMT+02:00 Timothee Evain <span dir="ltr"><<a href="mailto:tevain@telecom-paristech.fr" target="_blank">tevain@telecom-paristech.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Viki,<br>
<br>
I'm not a specialist but it seems to me that this is the empirical mean of your data.<br>
Usually when you are doing a PCA, you are normalizing by subtracting the mean and dividing the variance to avoid bias from huge scale data.<br>
<br>
So basically I would say you have to compute the mean from each dimension of your data.<br>
Stating that you are working with 3D :<br>
[ Point1_X Point1_Y Point1_Z<br>
: : :<br>
PointN_X PointN_Y PointN_Z ]<br>
<br>
MeanX = (Sum[n=1...N] (Pointn_X)) / N<br>
Idem for other.<br>
<br>
Hope this help,<br>
<br>
Tim<br>
<br>
----- Mail original -----<br>
De: "Viki MCG" <<a href="mailto:vikimcg@gmail.com">vikimcg@gmail.com</a>><br>
À: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
Envoyé: Lundi 29 Juin 2015 21:54:44<br>
Objet: [ITK] [ITK-users] How can I calculate PCA Principal Modes means?<br>
<span class=""><br>
I'm using itk::GeodesicActiveContourShapePriorLevelSetImageFilter. I read the example given in (<br>
</span><a href="http://www.itk.org/Doxygen/html/Examples_2Segmentation_2GeodesicActiveContourShapePriorLevelSetImageFilter_8cxx-example.html" rel="noreferrer" target="_blank">http://www.itk.org/Doxygen/html/Examples_2Segmentation_2GeodesicActiveContourShapePriorLevelSetImageFilter_8cxx-example.html</a> ) but I don't understand the following paragraph.<br>
<span class=""><br>
// The parameters of the distribution are user-specified. Since we<br>
// assumed the principal modes have already been normalized,<br>
// we set the distribution to zero mean and unit variance.<br>
CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() );<br>
CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() );<br>
mean.Fill( 0.0 );<br>
stddev.Fill( 1.0 );<br>
costFunction->SetShapeParameterMeans( mean );<br>
costFunction->SetShapeParameterStandardDeviations( stddev );<br>
<br>
Supposing that I have NOT normalized the principal modes, how can I calculate their means? I got principal modes using itk::ImagePCAShapeModelEstimator and I know their standard deviations are sqrt(eigen values), but I don't see how can I know their means.<br>
<br>
Any help would be very appreciated.<br>
<br>
Thanks in advance,<br>
<br>
Viki.<br>
<br>
</span>_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
</blockquote></div><br></div>