<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" style="word-wrap:break-word">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Brad,<br>
<br>
Thank you for your answer.<br>
<br>
I included "itkNumericTraits.h", and it did not change the error.<br>
<br>
Something I forgot to precise is that the tool compiles without errors on linux (Ubuntu 12.10) and Mac, so I think it is specific to the compiler from Visual Studio 2008.<br>
<br>
The weird part is that it seems to look for NumericTraits in "itk::itk", which I assume is wrong:<br>
<font size="2"><span style="font-size:10pt"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">"<br>
error C2039: 'NumericTraits' : is not a member of '<b>itk::itk</b>'<span class="Apple-converted-space">
</span></font></font></font></font></font></span></font><br>
"<br>
I have no idea of where it can come from.<br>
<br>
By the way, the code of my tool is <a href="https://www.nitrc.org/plugins/scmsvn/viewcvs.php/branches/Slicer4Extension/?root=dtiprocess">
here</a>. The file "<font size="2"><span style="font-size:10pt"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">tensorscalars.cxx" is in PrivateLibrary/</font></font></font></font></font></font></font></font></span></font><font size="2"><span style="font-size:10pt"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">tensorscalars.cxx</font></font></font></font></font></font></font></font></span></font><br>
<br>
Thanks,<br>
Adrien<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF598147"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Bradley Lowekamp [blowekamp@mail.nih.gov]<br>
<b>Sent:</b> Wednesday, January 30, 2013 12:01 PM<br>
<b>To:</b> Kaiser, Adrien<br>
<b>Subject:</b> Re: [Insight-users] ITK windows compilation error<br>
</font><br>
</div>
<div></div>
<div>
<div>Hello,</div>
<div><br>
</div>
<div>My first guess would be that it's a missing include.</div>
<div><br>
</div>
Did you including "itkNumericTraits.h" before itkVectorIndexSelectionCastImageFilter.h. If that is the problem then it looks like there is a missing include in the ITK header.
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>On Jan 30, 2013, at 11:41 AM, "Kaiser, Adrien" <<a href="mailto:akaiser@email.unc.edu" target="_blank">akaiser@email.unc.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt"><font size="3">Hello everybody,</font><br>
<div style="font-family:'Times New Roman'; font-size:16px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt">
<div style="font-family:'Times New Roman'; font-size:16px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt"><font size="2"><span style="font-size:10pt"><br>
<font size="3">I try to compile a tool (dtiprocess) using ITK</font></span></font><font size="3"><span class="Apple-converted-space"> </span>(ITKv4.3.0 from<span class="Apple-converted-space"> </span><a href="UrlBlockedError.aspx" target="_blank">git://itk.org/ITK.git</a>,
commit from 12-16-2012 13:05:15)</font><font size="2"><span style="font-size:10pt"><font size="2"><font size="3"><span class="Apple-converted-space"> </span>on Windows (Windows 7 with Visual Studio 208).<br>
ITK compiled without any problem, but<span class="Apple-converted-space"> </span></font><font size="2"><font size="3">the tool fails<span class="Apple-converted-space"> </span></font><font size="2"><font size="3">to compile and gives me an error in<span class="Apple-converted-space"> </span></font><font size="2"><font size="3">one
of the ITK classes:</font><br>
"<br>
<font size="2">1>Compiling...<span class="Apple-converted-space"> </span><br>
1>tensorscalars.cxx<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) :
<b>error C2039: 'NumericTraits' : is not a member of 'itk::itk'<span class="Apple-converted-space"> </span></b><br>
1> C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(136) : while compiling class template member function 'void itk::VectorIndexSelectionCastImageFilter<TInputImage,TOutputImage>::BeforeThreadedGenerateData(void)'<span class="Apple-converted-space"> </span><br>
1> with<span class="Apple-converted-space"> </span><br>
1> [<span class="Apple-converted-space"> </span><br>
1> TInputImage=itk::Image<DeformationPixelType,3>,<span class="Apple-converted-space"> </span><br>
1> TOutputImage=RealImageType<span class="Apple-converted-space"> </span><br>
1> ]<span class="Apple-converted-space"> </span><br>
1> ..\..\dtiprocessTK\PrivateLibrary\tensorscalars.cxx(93) : see reference to class template instantiation 'itk::VectorIndexSelectionCastImageFilter<TInputImage,TOutputImage>' being compiled<span class="Apple-converted-space"> </span><br>
1> with<span class="Apple-converted-space"> </span><br>
1> [<span class="Apple-converted-space"> </span><br>
1> TInputImage=itk::Image<DeformationPixelType,3>,<span class="Apple-converted-space"> </span><br>
1> TOutputImage=RealImageType<span class="Apple-converted-space"> </span><br>
1> ]<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) : warning C4091: 'typedef ' : ignored on left of 'itk::NumericTraits' when no variable is declared<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) : error C2143: syntax error : missing ';' before '<'<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) : error C2143: syntax error : missing ';' before '<'<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2039: 'NumericTraits' : is not a member of 'itk::itk'<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : warning C4091: 'typedef ' : ignored on left of 'itk::NumericTraits' when no variable is declared<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2143: syntax error : missing ';' before '<'<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2143: syntax error : missing ';' before '<'<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2039: 'ScalarRealType' : is not a member of '`global namespace''<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(152) : error C2065: 'PixelRealType' : undeclared identifier<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(152) : error C2070: ''unknown-type'': illegal sizeof operand<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(152) : error C2065: 'PixelScalarRealType' : undeclared identifier<span class="Apple-converted-space"> </span><br>
1>C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(152) : error C2070: ''unknown-type'': illegal sizeof operand</font><br>
<font size="2">"<br>
<br>
<font size="2"><font size="3">The part of the tool's code<span class="Apple-converted-space"> </span></font><font size="2"><font size="3">where the error appears is:</font><br>
<font size="2">(tensorscalars.cxx:93)</font><br>
</font>"<br>
<font size="2">#include "itkVectorIndexSelectionCastImageFilter.h"<span class="Apple-converted-space"> </span><br>
<br>
(...)<br>
<br>
template<><span class="Apple-converted-space"> </span><br>
itk::Image<double, 3>::Pointer createLambda<double>(TensorImageType::Pointer timg, // Tensor image<br>
EigenValueIndex lambdaind) // Lambda index<br>
{<br>
// Not really a deformation image output jsut a 3-vector of doubles.<span class="Apple-converted-space"> </span><br>
typedef itk::FastSymmetricEigenAnalysisImageFilter<TensorImageType,DeformationImageType> LambdaFilterType;<br>
LambdaFilterType::Pointer lambdafilter = LambdaFilterType::New();<br>
lambdafilter->SetInput(timg);<br>
lambdafilter->OrderEigenValuesBy(LambdaFilterType::FunctorType::OrderByValue);<br>
lambdafilter->Update();<span class="Apple-converted-space"> </span><br>
<br>
(l.93)<b> typedef itk::VectorIndexSelectionCastImageFilter<LambdaFilterType::OutputImageType, RealImageType> ElementSelectAdaptorType;</b><br>
ElementSelectAdaptorType::Pointer elementSelect = ElementSelectAdaptorType::New();<br>
elementSelect->SetInput(lambdafilter->GetOutput());<br>
// Reverse semanatics of lambda_1 from ITK.<br>
// In our convention lambda_1 is the largest eigenvalue whereas in<br>
// ITK its the smallest<br>
elementSelect->SetIndex(2 - lambdaind);<br>
elementSelect->Update();<span class="Apple-converted-space"> </span><br>
<br>
return elementSelect->GetOutput();<span class="Apple-converted-space"> </span><br>
}<br>
</font>"<br>
<br>
<font size="3">I did not write the tool myself, but I think the problem comes from the tool and not from ITK, I just can not figure out what I need to change to make it compile.<br>
Does anyone have any ideas ?<br>
<br>
Thanks,<br>
Best Regards,<br>
<br>
Adrien Kaiser<br>
University of North Carolina at Chapel Hill</font></font><br>
</font></font></font></font></font></span></font></div>
</div>
</div>
</div>
</div>
_____________________________________<br>
Powered by<span class="Apple-converted-space"> </span><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>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>