<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 &quot;itkNumericTraits.h&quot;, 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 &quot;itk::itk&quot;, 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">&quot;<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>
&quot;<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 &quot;<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&quot; 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 &quot;itkNumericTraits.h&quot; 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, &quot;Kaiser, Adrien&quot; &lt;<a href="mailto:akaiser@email.unc.edu" target="_blank">akaiser@email.unc.edu</a>&gt; 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">&nbsp;</span>(ITKv4.3.0 from<span class="Apple-converted-space">&nbsp;</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">&nbsp;</span>on Windows (Windows 7 with Visual Studio 208).<br>
ITK compiled without any problem, but<span class="Apple-converted-space">&nbsp;</span></font><font size="2"><font size="3">the tool fails<span class="Apple-converted-space">&nbsp;</span></font><font size="2"><font size="3">to compile and gives me an error in<span class="Apple-converted-space">&nbsp;</span></font><font size="2"><font size="3">one
 of the ITK classes:</font><br>
&quot;<br>
<font size="2">1&gt;Compiling...<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;tensorscalars.cxx<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;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">&nbsp;</span></b><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(136) : while compiling class template member function 'void itk::VectorIndexSelectionCastImageFilter&lt;TInputImage,TOutputImage&gt;::BeforeThreadedGenerateData(void)'<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TInputImage=itk::Image&lt;DeformationPixelType,3&gt;,<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TOutputImage=RealImageType<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ..\..\dtiprocessTK\PrivateLibrary\tensorscalars.cxx(93) : see reference to class template instantiation 'itk::VectorIndexSelectionCastImageFilter&lt;TInputImage,TOutputImage&gt;' being compiled<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TInputImage=itk::Image&lt;DeformationPixelType,3&gt;,<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TOutputImage=RealImageType<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) : error C2143: syntax error : missing ';' before '&lt;'<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(145) : error C2143: syntax error : missing ';' before '&lt;'<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2143: syntax error : missing ';' before '&lt;'<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;C:\Devel\E-b\DTIAtlasBuilder-build\I4-i\include\ITK-4.3\itkVectorIndexSelectionCastImageFilter.h(148) : error C2143: syntax error : missing ';' before '&lt;'<span class="Apple-converted-space">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;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">&nbsp;</span><br>
1&gt;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">&quot;<br>
<br>
<font size="2"><font size="3">The part of the tool's code<span class="Apple-converted-space">&nbsp;</span></font><font size="2"><font size="3">where the error appears is:</font><br>
<font size="2">(tensorscalars.cxx:93)</font><br>
</font>&quot;<br>
<font size="2">#include &quot;itkVectorIndexSelectionCastImageFilter.h&quot;<span class="Apple-converted-space">&nbsp;</span><br>
<br>
&nbsp;(...)<br>
<br>
template&lt;&gt;<span class="Apple-converted-space">&nbsp;</span><br>
itk::Image&lt;double, 3&gt;::Pointer createLambda&lt;double&gt;(TensorImageType::Pointer timg, // Tensor image<br>
&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; EigenValueIndex lambdaind) // Lambda index<br>
{<br>
&nbsp; // Not really a deformation image output jsut a 3-vector of doubles.<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp; typedef itk::FastSymmetricEigenAnalysisImageFilter&lt;TensorImageType,DeformationImageType&gt; LambdaFilterType;<br>
&nbsp; LambdaFilterType::Pointer lambdafilter = LambdaFilterType::New();<br>
&nbsp; lambdafilter-&gt;SetInput(timg);<br>
&nbsp; lambdafilter-&gt;OrderEigenValuesBy(LambdaFilterType::FunctorType::OrderByValue);<br>
&nbsp; lambdafilter-&gt;Update();<span class="Apple-converted-space">&nbsp;</span><br>
<br>
(l.93)<b>&nbsp; typedef itk::VectorIndexSelectionCastImageFilter&lt;LambdaFilterType::OutputImageType, RealImageType&gt; ElementSelectAdaptorType;</b><br>
&nbsp; ElementSelectAdaptorType::Pointer elementSelect = ElementSelectAdaptorType::New();<br>
&nbsp; elementSelect-&gt;SetInput(lambdafilter-&gt;GetOutput());<br>
&nbsp; // Reverse semanatics of lambda_1 from ITK.<br>
&nbsp; // In our convention lambda_1 is the largest eigenvalue whereas in<br>
&nbsp; // ITK its the smallest<br>
&nbsp; elementSelect-&gt;SetIndex(2 - lambdaind);<br>
&nbsp; elementSelect-&gt;Update();<span class="Apple-converted-space">&nbsp;</span><br>
<br>
&nbsp; return elementSelect-&gt;GetOutput();<span class="Apple-converted-space">&nbsp;</span><br>
}<br>
</font>&quot;<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">&nbsp;</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>