<div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">mv is of type MeasurementVectorType which is defined in HistogramType (i.e., <span class="Apple-style-span" style="font-family: arial; font-size: small; border-collapse: separate; ">HistogramType::MeasurementVectorType mv</span>). Squish the typedef assignments together and you get:</div>
<div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">itk::Statistics::Histogram< MeasurementType, 2 >::MeasurementVectorType mv ;</span></div>
<div><br>where MeasurementVectorType is a FixedArray as defined in Histogram's superclass Sample.</div><div><br></div><div>It's a C(onfusion)++ party!</div><div><br></div><div><div class="gmail_quote">On Fri, Apr 15, 2011 at 4:53 PM, Hernan Ledesma <span dir="ltr"><<a href="mailto:fledesma@inti.gob.ar">fledesma@inti.gob.ar</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">robert tamburo escribió:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
MeasurementVectorType is defined in the Histogram class as:<br>
typedef typename Superclass::MeasurementVectorType MeasurementVectorType;<br>
<br>
The superclass is Sample:<br>
typedef Sample< FixedArray< TMeasurement, VMeasurementVectorSize > > Superclass; <br>
<br>
</blockquote>
<br></div>
Thank you very much Robert,<br>
<br>
but I think that /histogram/ is an independent object than /mv/; both are different instance of a class:<br>
<br>
/histogram:/<br>
typedef itk::Statistics::Histogram< MeasurementType, 2 > HistogramType ;<br>
HistogramType::Pointer histogram = HistogramType::New() ;<br>
<br>
/mv:/<br>
HistogramType::MeasurementVectorType mv ;<br>
<br>
<br>
Are there some advanced C++ concept that I´m ignoring?<br>
Is it relate with the concept of SmartPointer?<br>
<br>
thank you!<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
On Fri, Apr 15, 2011 at 3:48 PM, Hernan Ledesma <<a href="mailto:fledesma@inti.gob.ar" target="_blank">fledesma@inti.gob.ar</a> <mailto:<a href="mailto:fledesma@inti.gob.ar" target="_blank">fledesma@inti.gob.ar</a>>> wrote:<br>
<br>
Hi all,<br>
<br>
in chapter 10 of <a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a>, page 615<br>
<br>
Does anybody know how "mv" data is associated with "histogram" object?<br>
<br>
is through "index" objetc?<br>
<br>
here is the code:<br>
<br>
...<br>
HistogramType::MeasurementVectorType mv ;<br>
mv[0] = 4.1 ;<br>
mv[1] = 5.6 ;<br>
index.Fill(1) ;<br>
<br>
// We retrieve the measurement vector at the index value (1, 1),<br>
the center bin’s measurement<br>
// vector. The output is [4.1, 5.6].<br>
<br>
std::cout << "Measurement vector at the center bin is "<br>
<< histogram->GetMeasurementVector(index) << std::endl ;<br>
...<br>
<br>
Thanks!<br>
_____________________________________<br></div>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div class="im"><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" 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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
</div></blockquote><div><div></div><div class="h5">
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" 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" 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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div>