<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">The attached project compiles and links without a problem.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Fri, Jan 10, 2014 at 7:34 AM, Massinissa Bandou <span dir="ltr"><<a href="mailto:Massinissa.Bandou@usherbrooke.ca" target="_blank">Massinissa.Bandou@usherbrooke.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Dženan Zukić,<br>
<br>
I just want to know what's wrong with the code below because I have 5<br>
errors:<br>
<br>
<br>
Error   2       error C2146: syntax error : missing ';' before identifier<br>
'ComponentType' c:\program<br>
files\itk\include\itk-4.4\itkDefaultConvertPixelTraits.h        45      1<br>
TomoRegistration<br>
Error   4       error C2602:<br>
'itk::DefaultConvertPixelTraits<PixelType>::ComponentType' is not a member<br>
of a base class of 'itk::DefaultConvertPixelTraits<PixelType>'  c:\program<br>
files\itk\include\itk-4.4\itkDefaultConvertPixelTraits.h        45      1<br>
TomoRegistration<br>
Error   1       error C2838: 'ComponentType' : illegal qualified name in member<br>
declaration     c:\program<br>
files\itk\include\itk-4.4\itkDefaultConvertPixelTraits.h        45      1<br>
TomoRegistration<br>
Error   5       error C2868:<br>
'itk::DefaultConvertPixelTraits<PixelType>::ComponentType' : illegal syntax<br>
for using-declaration; expected qualified-name  c:\program<br>
files\itk\include\itk-4.4\itkDefaultConvertPixelTraits.h        45      1<br>
TomoRegistration<br>
Error   3       error C4430: missing type specifier - int assumed. Note: C++ does<br>
not support default-int c:\program<br>
files\itk\include\itk-4.4\itkDefaultConvertPixelTraits.h        45      1<br>
TomoRegistration<br>
<div class="im"><br>
<br>
<br>
<br>
        typedef itk::ImageIOBase::IOComponentType ScalarPixelType;<br>
</div>        itk::ImageIOBase::Pointer imageIOsource =<br>
itk::ImageIOFactory::CreateImageIO("writesource.mhd",itk::ImageIOFactory::ReadMode);<br>
        imageIOsource->SetFileName("writesource.mhd");<br>
        imageIOsource->ReadImageInformation();<br>
        const ScalarPixelType pixelTypeSource = imageIOsource->GetComponentType();<br>
<br>
        itk::ImageIOBase::Pointer imageIOtarget =<br>
itk::ImageIOFactory::CreateImageIO("writetarget.mhd",itk::ImageIOFactory::ReadMode);<br>
        imageIOtarget->SetFileName("writetarget.mhd");<br>
        imageIOtarget->ReadImageInformation();<br>
        const ScalarPixelType pixelTypeTarget = imageIOtarget->GetComponentType();<br>
<br>
       myClass* a= new myClass;<br>
       a->VolumeRegistration(pixelTypeSource,pixelTypeTarget);<br>
<br>
class myClass<br>
{<br>
        ....<br>
        template<typename pixelType1, typename pixelType2><br>
        void VolumeRegistration(pixelType1,pixelType2)<br>
        {<br>
                typedef itk::Image< pixelType1, 3 >  FixedImageType;<br>
                typedef itk::Image< pixelType2, 3 >  MovingImageType;<br>
        }<br>
};<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/newbie-C-question-tp33081p33162.html" target="_blank">http://itk-users.7.n7.nabble.com/newbie-C-question-tp33081p33162.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the ITK - Users mailing list archive at Nabble.com.<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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>
</div></div></blockquote></div><br></div>