[Insight-users] Histogram class.

Jisung Kim bahrahm at yahoo . com
Fri, 20 Jun 2003 10:02:45 -0700 (PDT)


That is a bug. The method should return normal value
instead of returning reference.

I'm working on fixing it. I think I can check in the
fix in an hour.

Thank you for pointing it out.

--- Raghavendra Chandrashekara <rc3 at doc . ic . ac . uk>
wrote:
> Dear All,
> 
> I am trying to use the histogram class to output the
> measurement value 
> for a particular bin and dimension. I am using the
> following function in 
> the itk::Histogram class:
> 
> MeasurementType& GetMeasurement (const unsigned long
> n, const unsigned 
> int dimension) const
> 
> But when I try to compile I get the following error
> message:
> 
>
/vol/vipdata/packages/InsightCVS/Code/Numerics/Statistics/itkHistogram.txx:
> 
> In method `double & 
>
itk::Statistics::Histogram<double,1,itk::Statistics::DenseFrequencyContainer<float>
> 
>  >::GetMeasurement(long unsigned int, unsigned int)
> const':
>
/homes/rc3/src/VIPITK/Tests/HistogramTest/HistogramTest.cxx:72:
> 
> instantiated from here
>
/vol/vipdata/packages/InsightCVS/Code/Numerics/Statistics/itkHistogram.txx:447:
> 
> initialization of non-const reference type `double
> &'
>
/vol/vipdata/packages/InsightCVS/Code/Numerics/Statistics/itkHistogram.txx:447:
> 
> from rvalue of type `double'
>
/vol/vipdata/packages/InsightCVS/Code/Numerics/Statistics/itkHistogram.txx:447:
> 
> warning: returning reference to temporary
> make[1]: *** [HistogramTest.o] Error 1
> make: *** [default_target] Error 2
> 
> Please could you tell me what this error might mean.
> 
> Thanks,
> 
> Raghavendra
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users


=====
Jisung Kim
bahrahm at yahoo . com
106 Mason Farm Rd.
129 Radiology Research Lab., CB# 7515
Univ. of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7515

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc . yahoo . com