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"><<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I'm sorry, but I'm not very familiar with CMake software, and there'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">------------------ 原始邮件 ------------------</div>
<div style="font-size:12px;background:#efefef;padding:8px"><div><b>发件人:</b> "Bill Lorensen"<<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>>;</div><div><b>发送时间:</b> 2013年1月4日(星期五) 晚上9:00</div>
<div><b>收件人:</b> "Czyhandsome"<<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>>; <u></u></div><div><b>抄送:</b> "insight-users"<<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>>; <u></u></div>
<div><b>主题:</b> Re: [Insight-users] 回复: AnalyzeImageIO can'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"><<a href="mailto:594125582@qq.com" target="_blank">594125582@qq.com</a>></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't highlight the "ITKV3_COMPATIBILITY" option, that must be the main problem!</div><div>
As to Visual Studio 2012, I <b>did rebuild</b> the ITK, with the compile "Visual Studio 11" 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> "Bill Lorensen-2 [via ITK - Users]"<<a href="http://user/SendEmail.jtp?type=node&node=30471&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>>;</div>
<div><b>发送时间:</b> 2013年1月4日(星期五) 晚上8:50</div><div><b>收件人:</b> "Czyhandsome"<<a href="http://user/SendEmail.jtp?type=node&node=30471&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>>; <u></u></div>
<div></div><div><b>主题:</b> Re: AnalyzeImageIO can'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 <<a href="http://user/SendEmail.jtp?type=node&node=30470&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
<div><div><br>> Hi, Bill. I've just updated ITk to 4.3, but to find that class AnalyzeImageIO
<br>> can't work properly.
<br>> Here is my code:
<br>>
<br>> //*************************Code*************************//
<br>> #include <itkImageFileReader.h>
<br>> #include <itkImageFileWriter.h>
<br>> #include <itkNiftiImageIO.h>
<br>>
<br>> typedef itk::Image<float, 3> ImageType;
<br>> typedef itk::ImageFileReader<ImageType> ReaderType;
<br>> typedef itk::ImageFileWriter<ImageType> WriterType;
<br>>
<br>> int main()
<br>> {
<br>> ReaderType::Pointer reader = ReaderType::New();
<br>> reader->SetFileName("C:\\Users\\dell\\Desktop\\Pictionary\\Basemap.img");
<br>>
<br>> itk::NiftiImageIO::Pointer imageIO = itk::NiftiImageIO::New();
<br>> reader->SetImageIO(imageIO);
<br>>
<br>> WriterType::Pointer writer = WriterType::New();
<br>> writer->SetInput(reader->GetOutput());
<br>>
<br>> writer->SetFileName("C:\\Users\\dell\\Desktop\\Pictionary\\NewBasemap.img");
<br>> writer->SetImageIO(imageIO);
<br>>
<br>> try
<br>> {
<br>> reader->Update();
<br>> writer->Update();
<br>> }
<br>> catch(itk::ExceptionObject &err)
<br>> {
<br>> std::cerr << err << std::endl;
<br>> }
<br>>
<br>> system("pause");
<br>> return 0;
<br>> }
<br>> //*************************Code*************************//
<br>>
<br>> This code worked very well last night, with visual studio 2008 and ITK-4.2.
<br>> But today, after changing to visual studio 2012 and ITK-4.3, this code can't
<br>> work, with the following error:
<br>>
<br>> //**************Error**************//
<br>> error LNK2019: 无法解析的外部符号 "protected: __thiscall
<br>> itk::AnalyzeImageIO::AnalyzeImageIO(void)"
<br>> (??0AnalyzeImageIO@itk@@IAE@XZ),该符号在函数 "public: static class
<br>> itk::SmartPointer<class itk::AnalyzeImageIO> __cdecl
<br>> itk::AnalyzeImageIO::New(void)"
<br>> (?New@AnalyzeImageIO@itk@@SA?AV?$SmartPointer@VAnalyzeImageIO@itk@@@2@XZ)
<br>> 中被引用 F:\Czy_Program\ITK_Task\ITK_Task\PNGReadWrite.obj ITK_Task
<br>>
<br>> //**************Error**************//
<br>> Why does this happen?
<br>>
<br>> FYI: The itkAnalyzeImageIO.h file is in folder
<br>> ".\ITK\InsightToolkit-4.3.1\Modules\Compatibility\Deprecated\include". Does
<br>> this means that I must check "compatibility" on when CMAKE, otherwise I
<br>> can't use those old-version classes?
<br>>
<br>> Looking forward to your reply.
<br>> Your sincerely
<br>> Cao Ziyu
<br>>
<br>>
<br>>
<br>>
<br>> --
<br>> 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>
> 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" 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></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'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&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&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'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>