Please keep replies on the list.<div><br></div><div>Where is the example you are trying to run?<br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 8:05 AM, CZY <span dir="ltr">&lt;<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I&#39;m sorry, but I&#39;m not very familiar with CMake software, and there&#39;re too many CMakeList.txt out there.</div>
<div>Would you please tell me where is the CMakeList.txt file, in the CMakefolders, or in the ITK folders?</div><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------&nbsp;原始邮件&nbsp;------------------</div>
<div style="font-size:12px;background:#efefef;padding:8px"><div><b>发件人:</b>&nbsp;&quot;Bill Lorensen&quot;&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;;</div><div><b>发送时间:</b>&nbsp;2013年1月4日(星期五) 晚上9:00</div>
<div><b>收件人:</b>&nbsp;&quot;Czyhandsome&quot;&lt;<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>&gt;; <u></u></div><div><b>抄送:</b>&nbsp;&quot;insight-users&quot;&lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt;; <u></u></div>
<div><b>主题:</b>&nbsp;Re: [Insight-users] 回复: AnalyzeImageIO can&#39;t work?</div></div><div><div class="h5"><div><br></div>I would like to see your CMakeLists.txt file, not the itk CMakeLists.txt.<div><br></div><div><br><div class="gmail_quote">
On Fri, Jan 4, 2013 at 7:57 AM, Czyhandsome <span dir="ltr">&lt;<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Well, I didn&#39;t highlight the &quot;ITKV3_COMPATIBILITY&quot; option, that must be the main problem!</div><div>

As to Visual Studio 2012, I <b>did rebuild</b>&nbsp;the ITK, with the compile &quot;Visual Studio 11&quot; chosed.</div><div>Here is the CMake Configuration Log:</div><div>//******************CMakeList.txt******************//</div>

<div>See in appendix file</div>//******************CMakeList.txt******************//<div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ 原始邮件 ------------------</div>

<div style="font-size:12px;background:#efefef;padding:8px"><div><b>发件人:</b>&nbsp;&quot;Bill Lorensen-2 [via ITK - Users]&quot;&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=30471&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;;</div>

<div><b>发送时间:</b>&nbsp;2013年1月4日(星期五) 晚上8:50</div><div><b>收件人:</b>&nbsp;&quot;Czyhandsome&quot;&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=30471&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;; <u></u></div>

<div></div><div><b>主题:</b>&nbsp;Re: AnalyzeImageIO can&#39;t work?</div></div><div><div><br></div>

        To use the deprecated classes you must turn ITKV3_COMPATIBILITY:BOOL=ON.
<br>But this was also true in itk 4.2.
<br><br>Did start with a new itk build when you switched to VS 2012?
<br><br>Can you show us your CMakeLists.txt file?
<br><br><br></div><div><div>On Fri, Jan 4, 2013 at 12:57 AM, Czyhandsome &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=30470&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt; wrote:
<div><div><br>&gt; Hi, Bill. I&#39;ve just updated ITk to 4.3, but to find that class AnalyzeImageIO
<br>&gt; can&#39;t work properly.
<br>&gt; Here is my code:
<br>&gt;
<br>&gt; //*************************Code*************************//
<br>&gt; #include &lt;itkImageFileReader.h&gt;
<br>&gt; #include &lt;itkImageFileWriter.h&gt;
<br>&gt; #include &lt;itkNiftiImageIO.h&gt;
<br>&gt;
<br>&gt; typedef itk::Image&lt;float, 3&gt; ImageType;
<br>&gt; typedef itk::ImageFileReader&lt;ImageType&gt; ReaderType;
<br>&gt; typedef itk::ImageFileWriter&lt;ImageType&gt; WriterType;
<br>&gt;
<br>&gt; int main()
<br>&gt; {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ReaderType::Pointer reader = ReaderType::New();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; reader-&gt;SetFileName(&quot;C:\\Users\\dell\\Desktop\\Pictionary\\Basemap.img&quot;);
<br>&gt;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; itk::NiftiImageIO::Pointer imageIO = itk::NiftiImageIO::New();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; reader-&gt;SetImageIO(imageIO);
<br>&gt;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; WriterType::Pointer writer = WriterType::New();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; writer-&gt;SetInput(reader-&gt;GetOutput());
<br>&gt;
<br>&gt; writer-&gt;SetFileName(&quot;C:\\Users\\dell\\Desktop\\Pictionary\\NewBasemap.img&quot;);
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; writer-&gt;SetImageIO(imageIO);
<br>&gt;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; try
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reader-&gt;Update();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer-&gt;Update();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; catch(itk::ExceptionObject &amp;err)
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::cerr &lt;&lt; err &lt;&lt; std::endl;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; system(&quot;pause&quot;);
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; return 0;
<br>&gt; }
<br>&gt; //*************************Code*************************//
<br>&gt;
<br>&gt; This code worked very well last night, with visual studio 2008 and ITK-4.2.
<br>&gt; But today, after changing to visual studio 2012 and ITK-4.3, this code can&#39;t
<br>&gt; work, with the following error:
<br>&gt;
<br>&gt; //**************Error**************//
<br>&gt; error LNK2019: 无法解析的外部符号 &quot;protected: __thiscall
<br>&gt; itk::AnalyzeImageIO::AnalyzeImageIO(void)&quot;
<br>&gt; (??0AnalyzeImageIO@itk@@IAE@XZ),该符号在函数 &quot;public: static class
<br>&gt; itk::SmartPointer&lt;class itk::AnalyzeImageIO&gt; __cdecl
<br>&gt; itk::AnalyzeImageIO::New(void)&quot;
<br>&gt; (?New@AnalyzeImageIO@itk@@SA?AV?$SmartPointer@VAnalyzeImageIO@itk@@@2@XZ)
<br>&gt; 中被引用 &nbsp; &nbsp;F:\Czy_Program\ITK_Task\ITK_Task\PNGReadWrite.obj &nbsp; &nbsp; &nbsp; ITK_Task
<br>&gt;
<br>&gt; //**************Error**************//
<br>&gt; Why does this happen?
<br>&gt;
<br>&gt; FYI: The itkAnalyzeImageIO.h file is in folder
<br>&gt; &quot;.\ITK\InsightToolkit-4.3.1\Modules\Compatibility\Deprecated\include&quot;. Does
<br>&gt; this means that I must check &quot;compatibility&quot; on when CMAKE, otherwise I
<br>&gt; can&#39;t use those old-version classes?
<br>&gt;
<br>&gt; Looking forward to your reply.
<br>&gt; Your sincerely
<br>&gt; Cao Ziyu
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; --
<br>&gt; View this message in context: <a href="http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469.html" rel="nofollow" link="external" target="_blank">http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469.html</a><br>

&gt; Sent from the ITK - Users mailing list archive at Nabble.com.
<br>&gt; _____________________________________
<br>&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
<br>&gt;
<br>&gt; Visit other Kitware open-source projects at
<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;
<br>&gt; Kitware offers ITK Training Courses, for more information visit:
<br>&gt; <a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" target="_blank">http://www.kitware.com/products/protraining.php</a><br>&gt;
<br>&gt; Please keep messages on-topic and check the ITK FAQ at:
<br>&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt;
<br>&gt; Follow this link to subscribe/unsubscribe:
<br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" rel="nofollow" link="external" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></div></div><br><br>-- 
<br>Unpaid intern in BillsBasement at noware dot 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" rel="nofollow" link="external" 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" rel="nofollow" link="external" 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" rel="nofollow" link="external" 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" rel="nofollow" link="external" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>

        
        
        
        <br>
        <br>
        </div></div><hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469p30470.html" rel="nofollow" link="external" target="_blank">http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469p30470.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from AnalyzeImageIO can&#39;t work?, <a rel="nofollow" link="external">click here</a>.<br>
                <a href="http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" link="external" target="_blank">NAML</a>
        </div></div><div><br><img> <strong>CMakeLists.txt</strong> (34K) <a href="http://itk-users.7.n7.nabble.com/attachment/30471/0/CMakeLists.txt" rel="nofollow" link="external" target="_blank">Download Attachment</a></div>

        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30471.html" target="_blank">回复: AnalyzeImageIO can&#39;t work?</a><div><div><br>
Sent from the <a href="http://itk-users.7.n7.nabble.com/" target="_blank">ITK - Users mailing list archive</a> at Nabble.com.<br></div></div><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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>