<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> </DIV>
<DIV>Hi</DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>in <FONT style="FONT-SIZE: 11pt">ConnectedComponentImageFilter
image type is different than reader image. so may be you need to convert
reader image to HessianImageType . </FONT></EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>Alex</EM></DIV>
<DIV> </DIV>
<DIV> </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> </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> </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> </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> </P>
<P class=MsoPlainText>typedef
float
InputPixelType;</P>
<P class=MsoPlainText> typedef
itk::Image<InputPixelType,Dimension> InputImageType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef
float
OutputPixelType;</P>
<P class=MsoPlainText> typedef itk::Image<OutputPixelType,Dimension>
OutputImageType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef
itk::ImageFileReader<InputImageType> FileReaderType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef itk::ImageFileWriter<OutputImageType>
FileWriterType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef itk::NumericTraits< InputPixelType
>::RealType RealPixelType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef itk::SymmetricSecondRankTensor<
RealPixelType, Dimension > HessianPixelType;</P>
<P class=MsoPlainText> typedef itk::Image< HessianPixelType, Dimension
>
HessianImageType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef
itk::HessianToObjectnessMeasureImageFilter< HessianImageType,OutputImageType
> ObjectnessFilterType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> typedef
itk::MultiScaleHessianBasedMeasureImageFilter<
InputImageType,HessianImageType, OutputImageType >
MultiScaleEnhancementFilterType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> // for Connected component</P>
<P class=MsoPlainText> typedef itk::ConnectedComponentImageFilter<
HessianImageType,OutputImageType > ConnectedComponentFilterType;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText>FileReaderType::Pointer imageReader =
FileReaderType::New();</P>
<P class=MsoPlainText> imageReader->SetFileName(argv[1]);</P>
<P class=MsoPlainText> try</P>
<P class=MsoPlainText> {</P>
<P class=MsoPlainText> imageReader->Update();</P>
<P class=MsoPlainText> }</P>
<P class=MsoPlainText> catch (itk::ExceptionObject &ex)</P>
<P class=MsoPlainText> {</P>
<P class=MsoPlainText> std::cout << ex <<
std::endl;</P>
<P class=MsoPlainText> return EXIT_FAILURE;</P>
<P class=MsoPlainText> }</P>
<P class=MsoPlainText>.........</P>
<P class=MsoPlainText>........</P>
<P class=MsoPlainText>FileWriterType::Pointer writer2 =
FileWriterType::New();</P>
<P class=MsoPlainText> writer2->SetFileName(argv[9]);</P>
<P class=MsoPlainText> writer2->UseCompressionOn();</P>
<P class=MsoPlainText> writer2->SetInput(
multiScaleEnhancementFilter->GetOutput() );</P>
<P class=MsoPlainText>........</P>
<P class=MsoPlainText>//CC PART</P>
<P class=MsoPlainText> FileReaderType::Pointer reader1 =
FileReaderType::New();</P>
<P class=MsoPlainText> reader1->SetFileName(argv[9]);</P>
<P class=MsoPlainText> cout<<"reader1 passed"<<endl;</P>
<P class=MsoPlainText> ConnectedComponentFilterType::Pointer CCFilter =
ConnectedComponentFilterType::New();</P>
<P class=MsoPlainText> itk::Image<InputPixelType, Dimension>*
pOutputImage = reader1->GetOutput();</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText>
CCFilter->SetInput(pOutputImage);
<B><SPAN style="COLOR: red"><-------------this is the line where I get the
error</SPAN></B></P>
<P class=MsoPlainText> FileWriterType::Pointer writer4 =
FileWriterType::New();</P>
<P class=MsoPlainText> writer4->SetInput(CCFilter->GetOutput());</P>
<P class=MsoPlainText> writer4->SetFileName("d:\\Final2.mhd");</P>
<P class=MsoPlainText> cout<<"writer4 passed"<<endl;</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText>return EXIT_SUCCESS;</P>
<P class=MsoPlainText>}</P>
<P class=MsoPlainText> </P>
<P class=MsoPlainText> </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> </P>
<P class=MsoPlainText>On Mon, Sep 3, 2012 at 2:17 AM, D, Yamini <<A
href="mailto:Yamini.D@philips.com"><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none">Yamini.D@philips.com</SPAN></A>>
wrote:</P>
<P class=MsoPlainText>> Hi,</P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> Can you tell me what would be the cause of the
following error ? I </P>
<P class=MsoPlainText>> have come across this lot of times and want to know
why this occurs.</P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> </P>
<P class=MsoPlainText>> error C2664: 'void</P>
<P class=MsoPlainText>>
itk::ImageToImageFilter<TInputImage,TOutputImage>::SetInput(const</P>
<P class=MsoPlainText>> itk::Image<TPixel,VImageDimension> *)' : cannot
convert parameter 1 </P>
<P class=MsoPlainText>> from 'itk::Image<TPixel,VImageDimension> *' to
'const </P>
<P class=MsoPlainText>> itk::Image<TPixel,VImageDimension> *'</P>
<P class=MsoPlainText> </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> </P>
<P class=MsoPlainText>David</P>
<P class=MsoNormal> </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>