[Insight-users] 回复: 回复: AnalyzeImageIO can't work?

Bill Lorensen bill.lorensen at gmail.com
Fri Jan 4 08:08:55 EST 2013


Please keep replies on the list.

Where is the example you are trying to run?

On Fri, Jan 4, 2013 at 8:05 AM, CZY <594125582 at qq.com> wrote:

> I'm sorry, but I'm not very familiar with CMake software, and there're too
> many CMakeList.txt out there.
> Would you please tell me where is the CMakeList.txt file, in the
> CMakefolders, or in the ITK folders?
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Bill Lorensen"<bill.lorensen at gmail.com>;
> *发送时间:* 2013年1月4日(星期五) 晚上9:00
> *收件人:* "Czyhandsome"<594125582 at qq.com>; **
> *抄送:* "insight-users"<insight-users at itk.org>; **
> *主题:* Re: [Insight-users] 回复: AnalyzeImageIO can't work?
>
> I would like to see your CMakeLists.txt file, not the itk CMakeLists.txt.
>
>
> On Fri, Jan 4, 2013 at 7:57 AM, Czyhandsome <594125582 at qq.com> wrote:
>
>> Well, I didn't highlight the "ITKV3_COMPATIBILITY" option, that must be
>> the main problem!
>> As to Visual Studio 2012, I *did rebuild* the ITK, with the compile
>> "Visual Studio 11" chosed.
>> Here is the CMake Configuration Log:
>> //******************CMakeList.txt******************//
>> See in appendix file
>> //******************CMakeList.txt******************//
>>
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "Bill Lorensen-2 [via ITK - Users]"<[hidden email]<http://user/SendEmail.jtp?type=node&node=30471&i=0>
>> >;
>> *发送时间:* 2013年1月4日(星期五) 晚上8:50
>> *收件人:* "Czyhandsome"<[hidden email]<http://user/SendEmail.jtp?type=node&node=30471&i=1>>;
>> **
>> *主题:* Re: AnalyzeImageIO can't work?
>>
>> To use the deprecated classes you must turn ITKV3_COMPATIBILITY:BOOL=ON.
>> But this was also true in itk 4.2.
>>
>> Did start with a new itk build when you switched to VS 2012?
>>
>> Can you show us your CMakeLists.txt file?
>>
>>
>> On Fri, Jan 4, 2013 at 12:57 AM, Czyhandsome <[hidden email]<http://user/SendEmail.jtp?type=node&node=30470&i=0>>
>> wrote:
>>
>> > Hi, Bill. I've just updated ITk to 4.3, but to find that class
>> AnalyzeImageIO
>> > can't work properly.
>> > Here is my code:
>> >
>> > //*************************Code*************************//
>> > #include <itkImageFileReader.h>
>> > #include <itkImageFileWriter.h>
>> > #include <itkNiftiImageIO.h>
>> >
>> > typedef itk::Image<float, 3> ImageType;
>> > typedef itk::ImageFileReader<ImageType> ReaderType;
>> > typedef itk::ImageFileWriter<ImageType> WriterType;
>> >
>> > int main()
>> > {
>> >         ReaderType::Pointer reader = ReaderType::New();
>> >
>> reader->SetFileName("C:\\Users\\dell\\Desktop\\Pictionary\\Basemap.img");
>> >
>> >         itk::NiftiImageIO::Pointer imageIO = itk::NiftiImageIO::New();
>> >         reader->SetImageIO(imageIO);
>> >
>> >         WriterType::Pointer writer = WriterType::New();
>> >         writer->SetInput(reader->GetOutput());
>> >
>> >
>> writer->SetFileName("C:\\Users\\dell\\Desktop\\Pictionary\\NewBasemap.img");
>>
>> >         writer->SetImageIO(imageIO);
>> >
>> >         try
>> >         {
>> >                 reader->Update();
>> >                 writer->Update();
>> >         }
>> >         catch(itk::ExceptionObject &err)
>> >         {
>> >                 std::cerr << err << std::endl;
>> >         }
>> >
>> >         system("pause");
>> >         return 0;
>> > }
>> > //*************************Code*************************//
>> >
>> > This code worked very well last night, with visual studio 2008 and
>> ITK-4.2.
>> > But today, after changing to visual studio 2012 and ITK-4.3, this code
>> can't
>> > work, with the following error:
>> >
>> > //**************Error**************//
>> > error LNK2019: 无法解析的外部符号 "protected: __thiscall
>> > itk::AnalyzeImageIO::AnalyzeImageIO(void)"
>> > (??0AnalyzeImageIO at itk@@IAE at XZ),该符号在函数 "public: static class
>> > itk::SmartPointer<class itk::AnalyzeImageIO> __cdecl
>> > itk::AnalyzeImageIO::New(void)"
>> > (?New at AnalyzeImageIO@itk@@SA?AV?$SmartPointer at VAnalyzeImageIO@itk@
>> @@2 at XZ)
>> > 中被引用    F:\Czy_Program\ITK_Task\ITK_Task\PNGReadWrite.obj
>> ITK_Task
>> >
>> > //**************Error**************//
>> > Why does this happen?
>> >
>> > FYI: The itkAnalyzeImageIO.h file is in folder
>> > ".\ITK\InsightToolkit-4.3.1\Modules\Compatibility\Deprecated\include".
>> Does
>> > this means that I must check "compatibility" on when CMAKE, otherwise I
>> > can't use those old-version classes?
>> >
>> > Looking forward to your reply.
>> > Your sincerely
>> > Cao Ziyu
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469.html
>> > Sent from the ITK - Users mailing list archive at Nabble.com.
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.php
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30469p30470.html
>>  To unsubscribe from AnalyzeImageIO can't work?, click here.
>> NAML<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>
>>
>> *CMakeLists.txt* (34K) Download Attachment<http://itk-users.7.n7.nabble.com/attachment/30471/0/CMakeLists.txt>
>>
>> ------------------------------
>> View this message in context: 回复: AnalyzeImageIO can't work?<http://itk-users.7.n7.nabble.com/AnalyzeImageIO-can-t-work-tp30471.html>
>>
>> Sent from the ITK - Users mailing list archive<http://itk-users.7.n7.nabble.com/>at Nabble.com.
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130104/994f4dba/attachment.htm>


More information about the Insight-users mailing list