[Insight-users] Histogram class.

Raghavendra Chandrashekara rc3 at doc . ic . ac . uk
Fri, 20 Jun 2003 17:35:55 +0100


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