[Insight-users] Histogram quantile method
Luis Ibanez
luis.ibanez at kitware.com
Fri, 06 Feb 2004 21:41:33 -0500
Hi Radhika,
Resistance if futile...
The solution in this case is not to remove
the existing 'const' but to add new ones.
The real issue here is that the method Quantile()
should be 'const', since it simply computes a
double using existing information from the Histogram.
This methods doesn't change the content nor the state
of the Histogram.
The 'const' declaration has been added to the
itkHistogram.h and .txx files in the CVS
repository. You may want to update your checkout
in order to get these modifications.
Please let us know if you find any further
problems.
Thanks
Luis
---------------------------------
Radhika Sivaramakrishna wrote:
> Hi Luis,
>
> I adapted the example ImageHistogram2.cxx which uses
> ScalarImagetoHistogramGenerator to generate a histogram from a 3D image.
> I wanted to next threshold the image
>
> using a threshold which I hoped to derive by using the Quantile
> function. But I am getting a compile error:
>
>
>
> HistogramThreshold.cxx:125: passing
>
> `const main(int, char**)::HistogramType' as `this' argument of `double
>
> itk::Statistics::Histogram<TMeasurement, VMeasurementVectorSize,
>
> TFrequencyContainer>::Quantile(unsigned int, const double&) [with
>
> TMeasurement = double, unsigned int VMeasurementVectorSize = 1,
>
> TFrequencyContainer = itk::Statistics::DenseFrequencyContainer<float>]'
>
> discards qualifiers
>
>
>
> I thought it might be a "const" problem so I removed all the const
> declarations but I still got a similar error.
>
> Can you help me figure out what the problem is?
>
>
>
> Thanks
>
> Radhika
>
>
>
> -----------------------------------------------------
>
> Confidentiality Notice.
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> destroy all copies of the original message. If you are the intended
> recipient, please be advised that the content of this message is subject
> to access, review and disclosure by the sender's Email System Administrator.
>