[Insight-users] Histogram quantile method

Radhika Sivaramakrishna radhika.sivaramakrishna at synarc.com
Mon, 9 Feb 2004 09:28:25 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3EF32.001B3B36
Content-Type: text/plain

Hi Luis,
I am getting this very strange error message while compiling. Can you
explain what this could be?

/home/rsivaram/Insight/Code/Common/itkInPlaceImageFilter.txx: In member
   function `void itk::InPlaceImageFilter<TInputImage,
   TOutputImage>::AllocateOutputs() [with TInputImage = main(int,
   char**)::IntImageType, TOutputImage = main(int, char**)::ImageType]':
/home/rsivaram/Insight/Code/Common/itkImageRegion.h:173:   instantiated from
here
/home/rsivaram/Insight/Code/Common/itkInPlaceImageFilter.txx:76: no matching
   function for call to `itk::InPlaceImageFilter<main(int,
   char**)::IntImageType, main(int,
char**)::ImageType>::GraftOutput(main(int,
   char**)::IntImageType*)'
/home/rsivaram/Insight/Code/Common/itkImageSource.txx:95: candidates are:
void
   itk::ImageSource<TOutputImage>::GraftOutput(TOutputImage*) [with
   TOutputImage = main(int, char**)::ImageType]


Thanks
Radhika


-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Friday, February 06, 2004 6:42 PM
To: Radhika Sivaramakrishna
Cc: ITK
Subject: Re: [Insight-users] Histogram quantile method


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.
> 


                                                     
-----------------------------------------------------  
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.

------_=_NextPart_001_01C3EF32.001B3B36
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2656.87">
<TITLE>RE: [Insight-users] Histogram quantile method</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi Luis,</FONT>
<BR><FONT SIZE=2>I am getting this very strange error message while compiling. Can you explain what this could be?</FONT>
</P>

<P><FONT SIZE=2>/home/rsivaram/Insight/Code/Common/itkInPlaceImageFilter.txx: In member</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; function `void itk::InPlaceImageFilter&lt;TInputImage,</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; TOutputImage&gt;::AllocateOutputs() [with TInputImage = main(int,</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; char**)::IntImageType, TOutputImage = main(int, char**)::ImageType]':</FONT>
<BR><FONT SIZE=2>/home/rsivaram/Insight/Code/Common/itkImageRegion.h:173:&nbsp;&nbsp; instantiated from here</FONT>
<BR><FONT SIZE=2>/home/rsivaram/Insight/Code/Common/itkInPlaceImageFilter.txx:76: no matching</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; function for call to `itk::InPlaceImageFilter&lt;main(int,</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; char**)::IntImageType, main(int, char**)::ImageType&gt;::GraftOutput(main(int,</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; char**)::IntImageType*)'</FONT>
<BR><FONT SIZE=2>/home/rsivaram/Insight/Code/Common/itkImageSource.txx:95: candidates are: void</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; itk::ImageSource&lt;TOutputImage&gt;::GraftOutput(TOutputImage*) [with</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; TOutputImage = main(int, char**)::ImageType]</FONT>
</P>
<BR>

<P><FONT SIZE=2>Thanks</FONT>
<BR><FONT SIZE=2>Radhika</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Luis Ibanez [<A HREF="mailto:luis.ibanez at kitware.com">mailto:luis.ibanez at kitware.com</A>] </FONT>
<BR><FONT SIZE=2>Sent: Friday, February 06, 2004 6:42 PM</FONT>
<BR><FONT SIZE=2>To: Radhika Sivaramakrishna</FONT>
<BR><FONT SIZE=2>Cc: ITK</FONT>
<BR><FONT SIZE=2>Subject: Re: [Insight-users] Histogram quantile method</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi Radhika,</FONT>
</P>
<BR>

<P><FONT SIZE=2>Resistance if futile...</FONT>
</P>
<BR>

<P><FONT SIZE=2>The solution in this case is not to remove</FONT>
<BR><FONT SIZE=2>the existing 'const' but to&nbsp; add new ones.</FONT>
</P>

<P><FONT SIZE=2>The real issue here is that the method Quantile()</FONT>
<BR><FONT SIZE=2>should be 'const', since it simply computes a</FONT>
<BR><FONT SIZE=2>double using existing information from the Histogram.</FONT>
<BR><FONT SIZE=2>This methods doesn't change the content nor the state</FONT>
<BR><FONT SIZE=2>of the Histogram.</FONT>
</P>

<P><FONT SIZE=2>The 'const' declaration has been added to the</FONT>
<BR><FONT SIZE=2>itkHistogram.h and .txx files in the CVS</FONT>
<BR><FONT SIZE=2>repository. You may want to update your checkout</FONT>
<BR><FONT SIZE=2>in order to get these modifications.</FONT>
</P>
<BR>

<P><FONT SIZE=2>Please let us know if you find any further</FONT>
<BR><FONT SIZE=2>problems.</FONT>
</P>
<BR>

<P><FONT SIZE=2>&nbsp;&nbsp; Thanks</FONT>
</P>
<BR>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; Luis</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>---------------------------------</FONT>
<BR><FONT SIZE=2>Radhika Sivaramakrishna wrote:</FONT>
</P>

<P><FONT SIZE=2>&gt; Hi Luis,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; I adapted the example ImageHistogram2.cxx which uses </FONT>
<BR><FONT SIZE=2>&gt; ScalarImagetoHistogramGenerator to generate a histogram from a 3D image. </FONT>
<BR><FONT SIZE=2>&gt; I wanted to next threshold the image</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; using a threshold which I hoped to derive by using the Quantile </FONT>
<BR><FONT SIZE=2>&gt; function. But I am getting a compile error:</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; HistogramThreshold.cxx:125: passing</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; `const main(int, char**)::HistogramType' as `this' argument of `double</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; itk::Statistics::Histogram&lt;TMeasurement, VMeasurementVectorSize,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; TFrequencyContainer&gt;::Quantile(unsigned int, const double&amp;) [with</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; TMeasurement = double, unsigned int VMeasurementVectorSize = 1,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; TFrequencyContainer = itk::Statistics::DenseFrequencyContainer&lt;float&gt;]'</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; discards qualifiers</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; I thought it might be a &quot;const&quot; problem so I removed all the const </FONT>
<BR><FONT SIZE=2>&gt; declarations but I still got a similar error.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Can you help me figure out what the problem is?</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Thanks</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Radhika</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; -----------------------------------------------------</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Confidentiality Notice.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; This email message is for the sole use of the intended recipient(s) and </FONT>
<BR><FONT SIZE=2>&gt; may contain confidential and privileged information. Any unauthorized </FONT>
<BR><FONT SIZE=2>&gt; review, use, disclosure or distribution is prohibited. If you are not </FONT>
<BR><FONT SIZE=2>&gt; the intended recipient, please contact the sender by reply email and </FONT>
<BR><FONT SIZE=2>&gt; destroy all copies of the original message. If you are the intended </FONT>
<BR><FONT SIZE=2>&gt; recipient, please be advised that the content of this message is subject </FONT>
<BR><FONT SIZE=2>&gt; to access, review and disclosure by the sender's Email System Administrator.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
</P>
<BR>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2>-----------------------------------------------------&nbsp; </FONT>
<BR><FONT SIZE=2>Confidentiality Notice. </FONT>
<BR><FONT SIZE=2>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.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C3EF32.001B3B36--