[Insight-users] Histogram Example ItkSoftwareGuide

Hernan Ledesma fledesma at inti.gob.ar
Fri Apr 15 16:53:22 EDT 2011


robert tamburo escribió:
> MeasurementVectorType is defined in the Histogram class as:
> typedef typename Superclass::MeasurementVectorType     
> MeasurementVectorType;
>
> The superclass is Sample:
> typedef Sample< FixedArray< TMeasurement, VMeasurementVectorSize > 
> > Superclass; 
>
>

Thank you very much Robert,

but I think that /histogram/ is an independent object than /mv/; both 
are different instance of a class:

/histogram:/
typedef itk::Statistics::Histogram< MeasurementType, 2 > HistogramType ;
HistogramType::Pointer histogram = HistogramType::New() ;

/mv:/
HistogramType::MeasurementVectorType mv ;


Are there some advanced C++ concept that I´m ignoring?
Is it relate with the concept of SmartPointer?

thank you!
>
> On Fri, Apr 15, 2011 at 3:48 PM, Hernan Ledesma <fledesma at inti.gob.ar 
> <mailto:fledesma at inti.gob.ar>> wrote:
>
>     Hi all,
>
>     in chapter 10 of http://www.itk.org/ItkSoftwareGuide.pdf, page 615
>
>     Does anybody know how "mv" data is associated with "histogram" object?
>
>     is through "index" objetc?
>
>     here is the code:
>
>     ...
>     HistogramType::MeasurementVectorType mv ;
>     mv[0] = 4.1 ;
>     mv[1] = 5.6 ;
>     index.Fill(1) ;
>
>     // We retrieve the measurement vector at the index value (1, 1),
>     the center bin’s measurement
>     // vector. The output is [4.1, 5.6].
>
>     std::cout << "Measurement vector at the center bin is "
>     << histogram->GetMeasurementVector(index) << std::endl ;
>     ...
>
>     Thanks!
>     _____________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Kitware offers ITK Training Courses, for more information visit:
>     http://www.kitware.com/products/protraining.html
>
>     Please keep messages on-topic and check the ITK FAQ at:
>     http://www.itk.org/Wiki/ITK_FAQ
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.itk.org/mailman/listinfo/insight-users
>
>



More information about the Insight-users mailing list