Hi Dario, <div><br></div><div>In general it gets a little hard to understand the errors when you </div><div>have templates. Just by aligning the error and seeing what is <div>going on will help to understand the cause of the problem. </div>
<div><br></div><div>It looks like you are passing integers to the </div><div>computeminmax function whereas it is expecting </div><div>float values. My guess is that if you change your </div><div>threshold values to float the code should work fine. </div>
<div><font class="Apple-style-span" color="#be299d" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font><meta http-equiv="content-type" content="text/html; charset=utf-8"></div>
<div><br></div><div>Here is how you are calling the function</div><div><div>ITKSeg.cpp:220: error: no matching function for call to </div><div><br></div><div>‘itk::HistogramMatchingImageFilter&lt;</div><div>        itk::Image&lt;float, 2u&gt;, </div>
<div>        itk::Image&lt;float, 2u&gt;, </div><div>        float&gt;::ComputeMinMaxMean(</div><div>                itk::Image&lt;float, 2u&gt;*, </div><div>                int&amp;, </div><div>                int&amp;, </div>
<div>                int&amp;)’</div><div><br></div><div>Here is how it expects to be called </div><div>itkHistogramMatchingImageFilter.txx:386: note: candidates are: void </div><div>itk::HistogramMatchingImageFilter&lt;</div>
<div>        TInputImage, </div><div>        TOutputImage, </div><div>        THistogramMeasurement&gt;::ComputeMinMaxMean(</div><div>                const typename itk::ImageToImageFilter::InputImageType*, </div><div>                THistogramMeasurement&amp;, </div>
<div>                THistogramMeasurement&amp;, </div><div>                THistogramMeasurement&amp;) </div><div><br></div><div>[with TInputImage = itk::Image&lt;float, 2u&gt;, </div><div>      TOutputImage =itk::Image&lt;float, 2u&gt;, </div>
<div>      THistogramMeasurement = float]</div></div><div><br></div><div><br></div><div>Regards, </div><div>Cagatay<br><br><div class="gmail_quote">On Sun, Oct 30, 2011 at 3:19 AM, Dario Kassler <span dir="ltr">&lt;<a href="mailto:majin_clodan@t-online.de">majin_clodan@t-online.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">Hello,<div><br></div><div>i hope i ask the question in the right position. I didn&#39;t found any place in which I can create a new thread in the mailing list.</div>
<div><br></div><div>Well I want to get the min, max and mean grayscale value from a picture. I need the values for the canny algorithm. I want to compute the the thresholds in a automatic way and for this I need these values. My Code for the computation of the min, max and mean grayscale of the picture looks like the following:</div>
<div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">int</span> thresholdLower = <span style="color:#2f2fd1">0</span>;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="color:#be299d">int</span> thresholdUpper = <span style="color:#2f2fd1">0</span>;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">int</span> thresholdMean = <span style="color:#2f2fd1">0</span>;</div>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span><br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">const</span> <span style="color:#be299d">unsigned</span> <span style="color:#be299d">int</span> DimensionHist = <span style="color:#2f2fd1">2</span>;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:rgb(190, 41, 157)">typedef<span style="color:#000000"> </span>unsigned<span style="color:#000000"> </span>short<span style="color:#000000"> PixelType;</span></span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">typedef</span> itk::Image&lt; PixelType, Dimension &gt;  MovingImageType;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="color:#be299d">typedef</span> itk::ImageFileReader&lt; MovingImageType &gt; MovingImageReaderType;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">typedef</span> <span style="color:#be299d">float</span> InternalPixelType;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="color:#be299d">typedef</span> itk::Image&lt; InternalPixelType, DimensionHist &gt; InternalImageType;</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span><br>
</p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">typedef</span> itk::HistogramMatchingImageFilter&lt; InternalImageType, InternalImageType &gt;   </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre-wrap">                </span>MatchingFilterType;</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span><br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(0, 132, 35)">
// this class has the method ComputeMinMaxMean</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">MatchingFilterType::Pointer matcher = MatchingFilterType::New();</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px">
<span style="white-space:pre-wrap">        </span><br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">typedef</span> itk::ImageFileReader&lt; MovingImageType &gt; MovingImageReaderType;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">movingImageReader-&gt;SetFileName( inputPicture);</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span><br>
</p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#be299d">typedef</span> itk::CastImageFilter&lt; MovingImageType, InternalImageType &gt; <span style="white-space:pre-wrap">                </span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre-wrap">        </span>MovingImageCasterType;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
MovingImageCasterType::Pointer movingImageCaster = MovingImageCasterType::New();</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">movingImageCaster-&gt;SetInput( movingImageReader-&gt;GetOutput() );</div>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span><br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">matcher-&gt;ComputeMinMaxMean(movingImageCaster-&gt;GetOutput(), thresholdLower, thresholdUpper, thresholdMean);</div>
</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">The &quot;inputPicture&quot; is the path to my picture.</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">I get the following error:</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
/Users/System/HiwiJob/Ticket 502/ITK/ITKSeg.cpp: In member function ‘int ITKSeg::Canny(const char*, float, char*, char*)’:</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">/Users/System/HiwiJob/Ticket 502/ITK/ITKSeg.cpp:220: error: no matching function for call to ‘itk::HistogramMatchingImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt;, float&gt;::ComputeMinMaxMean(itk::Image&lt;float, 2u&gt;*, int&amp;, int&amp;, int&amp;)’</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">/usr/local/include/InsightToolkit/Algorithms/itkHistogramMatchingImageFilter.txx:386: note: candidates are: void itk::HistogramMatchingImageFilter&lt;TInputImage, TOutputImage, THistogramMeasurement&gt;::ComputeMinMaxMean(const typename itk::ImageToImageFilter&lt;TInputImage, TOutputImage&gt;::InputImageType*, THistogramMeasurement&amp;, THistogramMeasurement&amp;, THistogramMeasurement&amp;) [with TInputImage = itk::Image&lt;float, 2u&gt;, TOutputImage = itk::Image&lt;float, 2u&gt;, THistogramMeasurement = float]</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
Well what can I do to serve this problem? Can anyone give me a example or so? :&#39;( </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">I will be very cool and I will be very thankful if you help me. :)</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
Greeting, Clodan</div></div><div><br></div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div></div>