<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.PlainTextChar
        {font-family:"Calibri","sans-serif"}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
span.EmailStyle21
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.EmailStyle22
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.EmailStyle23
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
-->
</STYLE>
</HEAD>
<BODY dir=ltr lang=EN-US link=blue vLink=purple>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>&nbsp;</DIV>
<DIV>Hi</DIV>
<DIV><EM></EM>&nbsp;</DIV>
<DIV><EM>in <FONT style="FONT-SIZE: 11pt">ConnectedComponentImageFilter&nbsp; 
image type is different than reader image.&nbsp; so may be you need to convert 
reader image to HessianImageType . </FONT></EM></DIV>
<DIV><EM></EM>&nbsp;</DIV>
<DIV><EM></EM>&nbsp;</DIV>
<DIV><EM>Alex</EM></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV>&nbsp;</DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=Yamini.D@philips.com 
href="mailto:Yamini.D@philips.com">D, Yamini</A> </DIV>
<DIV><B>Sent:</B> Monday, September 03, 2012 5:58 PM</DIV>
<DIV><B>To:</B> <A title=daviddoria@gmail.com 
href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</A> </DIV>
<DIV><B>Cc:</B> <A title=insight-users@itk.org 
href="mailto:insight-users@itk.org">insight-users@itk.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Insight-users] One of the common Errors-want to know 
why itoccurs</DIV></DIV></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV class=WordSection1>
<P class=MsoPlainText>Hi,</P>
<P class=MsoPlainText>I am sending you a part of the code that involves the 
error. Headers, typedef and the filter parts. Hessian and Connected component 
are the filters which included. </P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>#include "stdafx.h"</P>
<P class=MsoPlainText>#include "itkHessianToObjectnessMeasureImageFilter.h"</P>
<P class=MsoPlainText>#include 
"itkMultiScaleHessianBasedMeasureImageFilter.h"</P>
<P class=MsoPlainText>#include "itkConnectedComponentImageFilter.h"</P>
<P class=MsoPlainText>#include "itkImageFileReader.h"</P>
<P class=MsoPlainText>#include "itkImageFileWriter.h"</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>typedef 
float&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; 
InputPixelType;</P>
<P class=MsoPlainText>&nbsp; typedef 
itk::Image&lt;InputPixelType,Dimension&gt;&nbsp; InputImageType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef 
float&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; 
OutputPixelType;</P>
<P class=MsoPlainText>&nbsp; typedef itk::Image&lt;OutputPixelType,Dimension&gt; 
OutputImageType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef 
itk::ImageFileReader&lt;InputImageType&gt;&nbsp; FileReaderType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef itk::ImageFileWriter&lt;OutputImageType&gt; 
FileWriterType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef itk::NumericTraits&lt; InputPixelType 
&gt;::RealType RealPixelType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef itk::SymmetricSecondRankTensor&lt; 
RealPixelType, Dimension &gt; HessianPixelType;</P>
<P class=MsoPlainText>&nbsp; typedef itk::Image&lt; HessianPixelType, Dimension 
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
HessianImageType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef 
itk::HessianToObjectnessMeasureImageFilter&lt; HessianImageType,OutputImageType 
&gt; ObjectnessFilterType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; typedef 
itk::MultiScaleHessianBasedMeasureImageFilter&lt; 
InputImageType,HessianImageType, OutputImageType &gt; 
MultiScaleEnhancementFilterType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; // for Connected component</P>
<P class=MsoPlainText>&nbsp; typedef itk::ConnectedComponentImageFilter&lt; 
HessianImageType,OutputImageType &gt; ConnectedComponentFilterType;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>FileReaderType::Pointer imageReader = 
FileReaderType::New();</P>
<P class=MsoPlainText>&nbsp; imageReader-&gt;SetFileName(argv[1]);</P>
<P class=MsoPlainText>&nbsp; try</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; {</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; imageReader-&gt;Update();</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; }</P>
<P class=MsoPlainText>&nbsp; catch (itk::ExceptionObject &amp;ex)</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; {</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; ex &lt;&lt; 
std::endl;</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; return EXIT_FAILURE;</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; }</P>
<P class=MsoPlainText>.........</P>
<P class=MsoPlainText>........</P>
<P class=MsoPlainText>FileWriterType::Pointer writer2 = 
FileWriterType::New();</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; writer2-&gt;SetFileName(argv[9]);</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; writer2-&gt;UseCompressionOn();</P>
<P class=MsoPlainText>&nbsp;&nbsp;&nbsp; writer2-&gt;SetInput( 
multiScaleEnhancementFilter-&gt;GetOutput() );</P>
<P class=MsoPlainText>........</P>
<P class=MsoPlainText>//CC PART</P>
<P class=MsoPlainText>&nbsp; FileReaderType::Pointer reader1 = 
FileReaderType::New();</P>
<P class=MsoPlainText>&nbsp; reader1-&gt;SetFileName(argv[9]);</P>
<P class=MsoPlainText>&nbsp; cout&lt;&lt;"reader1 passed"&lt;&lt;endl;</P>
<P class=MsoPlainText>&nbsp; ConnectedComponentFilterType::Pointer CCFilter = 
ConnectedComponentFilterType::New();</P>
<P class=MsoPlainText>&nbsp; itk::Image&lt;InputPixelType, Dimension&gt;* 
pOutputImage = reader1-&gt;GetOutput();</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp; 
CCFilter-&gt;SetInput(pOutputImage);&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;&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; 
<B><SPAN style="COLOR: red">&lt;-------------this is the line where I get the 
error</SPAN></B></P>
<P class=MsoPlainText>&nbsp; FileWriterType::Pointer writer4 = 
FileWriterType::New();</P>
<P class=MsoPlainText>&nbsp; writer4-&gt;SetInput(CCFilter-&gt;GetOutput());</P>
<P class=MsoPlainText>&nbsp; writer4-&gt;SetFileName("d:\\Final2.mhd");</P>
<P class=MsoPlainText>&nbsp; cout&lt;&lt;"writer4 passed"&lt;&lt;endl;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>return EXIT_SUCCESS;</P>
<P class=MsoPlainText>}</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>-----Original Message-----<BR>From: David Doria <A 
href="mailto:[mailto:daviddoria@gmail.com]">[mailto:daviddoria@gmail.com]</A> 
<BR>Sent: Monday, September 03, 2012 5:28 PM<BR>To: D, Yamini<BR>Cc: <A 
href="mailto:insight-users@itk.org">insight-users@itk.org</A><BR>Subject: Re: 
One of the common Errors-want to know why it occurs</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>On Mon, Sep 3, 2012 at 2:17 AM, D, Yamini &lt;<A 
href="mailto:Yamini.D@philips.com"><SPAN 
style="COLOR: windowtext; TEXT-DECORATION: none">Yamini.D@philips.com</SPAN></A>&gt; 
wrote:</P>
<P class=MsoPlainText>&gt; Hi,</P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; Can you tell me what would be the cause of&nbsp; the 
following error ? I </P>
<P class=MsoPlainText>&gt; have come across this lot of times and want to know 
why this occurs.</P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; </P>
<P class=MsoPlainText>&gt; error C2664: 'void</P>
<P class=MsoPlainText>&gt; 
itk::ImageToImageFilter&lt;TInputImage,TOutputImage&gt;::SetInput(const</P>
<P class=MsoPlainText>&gt; itk::Image&lt;TPixel,VImageDimension&gt; *)' : cannot 
convert parameter 1 </P>
<P class=MsoPlainText>&gt; from 'itk::Image&lt;TPixel,VImageDimension&gt; *' to 
'const </P>
<P class=MsoPlainText>&gt; itk::Image&lt;TPixel,VImageDimension&gt; *'</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>Can you please give this some context? I.e. make a minimal 
compilable example of where you are calling this function that produces the 
error you are seeing.</P>
<P class=MsoPlainText>&nbsp;</P>
<P class=MsoPlainText>David</P>
<P class=MsoNormal>&nbsp;</P></DIV><BR>
<HR>
<FONT color=gray size=1 face=Arial>The information contained in this message may 
be confidential and legally protected under applicable law. The message is 
intended solely for the addressee(s). If you are not the intended recipient, you 
are hereby notified that any use, forwarding, dissemination, or reproduction of 
this message is strictly prohibited and may be unlawful. If you are not the 
intended recipient, please contact the sender by return e-mail and destroy all 
copies of the original message.<BR></FONT>
<P>
<HR>
_____________________________________<BR>Powered by www.kitware.com<BR><BR>Visit 
other Kitware open-source projects 
at<BR>http://www.kitware.com/opensource/opensource.html<BR><BR>Kitware offers 
ITK Training Courses, for more information 
visit:<BR>http://www.kitware.com/products/protraining.php<BR><BR>Please keep 
messages on-topic and check the ITK FAQ 
at:<BR>http://www.itk.org/Wiki/ITK_FAQ<BR><BR>Follow this link to 
subscribe/unsubscribe:<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></DIV></DIV></DIV></BODY></HTML>