<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Solved , thank you so much.<BR>
We can not define gdcm::File *f = gdcm::File::New();<BR>
Because there is not a definition of New() method.<BR>
So we should define it use the default constructor of gdcm::File.<BR><BR>> Date: Thu, 18 Dec 2008 09:51:16 +0100<BR>> From: mathieu.malaterre@gmail.com<BR>> To: gjtian@hotmail.com<BR>> Subject: Re: [Insight-users] DICOM Header Info<BR>> CC: insight-users@itk.org<BR>> <BR>> 'lo,<BR>> <BR>> I still do not understand why both of you are all that.<BR>> <BR>> Do you understand that gdcm is *part* of ITK ? Take for instance the<BR>> two examples: ImageReadDicomSeriesWrite.cxx &<BR>> DicomImageReadPrintTags.cxx. I am sure if you turn BUILD_EXAMPLES:ON<BR>> in your cmake config they'll build just fine *without* any system or<BR>> external gdcm...<BR>> <BR>> Why make things simple when you can make them complicated ...<BR>> <BR>> <BR>> On Thu, Dec 18, 2008 at 7:05 AM, TienGarry <gjtian@hotmail.com> wrote:<BR>> > Siqi suggest I forward my email to you.<BR>> ><BR>> > I compiled ITK,GDCM1.2.4 successfully, and I did not modify<BR>> > ITK CMakeList.txt.<BR>> > In ITK, I set ITK_USE_SYSTEM_GDCM OFF, as a summary, I compile ITK and<BR>> > GDCM1.2.4<BR>> > use all the default settings.<BR>> ><BR>> > This is my project CMakeList.txt.<BR>> ><BR>> > FIND_PACKAGE(ITK)<BR>> > IF (USE_ITK_FILE)<BR>> > INCLUDE (${USE_ITK_FILE})<BR>> > ELSE (USE_ITK_FILE)<BR>> > MESSAGE( FATAL_ERROR "This application requires ITK. One of these<BR>> > components is missing. Please verify configuration")<BR>> > ENDIF (USE_ITK_FILE)<BR>> > FIND_PACKAGE (GDCM)<BR>> > INCLUDE(${GDCM_USE_FILE})<BR>> ><BR>> > I just add one line in my proram.<BR>> ><BR>> > #include "gdcmFile.h"<BR>> > gdcm::File *f = gdcm::File::New();<BR>> ><BR>> > error C2039: 'New' : is not a member of 'gdcm::File'<BR>> > D:\ITKVTK\InsightToolkit-3.10.0\Utilities\gdcm\src\gdcmFile.h(111) : see<BR>> > declaration of 'gdcm::File'<BR>> > error C3861: 'New': identifier not found<BR>> ><BR>> > It seems that my project will search gdcmFile.h in the path of ITK.<BR>> ><BR>> ><BR>> >> Date: Wed, 17 Dec 2008 16:14:09 +0100<BR>> >> From: mathieu.malaterre@gmail.com<BR>> >> To: gjtian@hotmail.com<BR>> >> Subject: Re: [Insight-users] DICOM Header Info<BR>> >> CC: insight-users@itk.org<BR>> >><BR>> >> 'lo<BR>> >><BR>> >> On Wed, Dec 17, 2008 at 2:51 PM, TienGarry <gjtian@hotmail.com> wrote:<BR>> >> > When I do it like your method, I will get the error:<BR>> >> ><BR>> >> > error C2027: use of undefined type 'gdcm::File'<BR>> >><BR>> >> You need to #include "gdcmFile.h"<BR>> >><BR>> >> > 2><BR>> >> > D:\ITKVTK\InsightToolkit-3.8.0\Utilities\gdcm\src\gdcmSerieHelper.h(32)<BR>> >> > :<BR>> >> > see declaration of 'gdcm::File'<BR>> >> ><BR>> >> > I already installed the extern gdcm, and set ITK_USE_SYSTEM_ON, modified<BR>> >> > the cmakelist.txt<BR>> >><BR>> >> Ok, if you decided to modify the cmakelist.txt, I can no longer be of<BR>> >> any help. I do not support (nor encourage) manual modfication of<BR>> >> cmakelist.txt. sorry.<BR>> >><BR>> >><BR>> >> > but I still get the error, when I include "gdcmFile.h", it indicates<BR>> >> > that<BR>> >> > the system will use the internal gdcmFile.h in<BR>> >> > D:\ITKVTK\InsightToolkit-3.8.0\Utilities\gdcm\src\ not in the external<BR>> >> > path.<BR>> >><BR>> >> What is the issue with the current version shipped with ITK ? This is<BR>> >> gdcm 1.2.4. You do not need any external gdcm for this simple task.<BR>> >><BR>> >> 2cts<BR>> >> --<BR>> >> Mathieu<BR>> ><BR>> ><BR>> > ________________________________<BR>> > 更多热辣资讯尽在新版MSN首页! 立刻访问!<BR>> <BR>> <BR>> <BR>> -- <BR>> Mathieu<BR><BR><br /><hr />更多热辣资讯尽在新版MSN首页! <a href='http://cn.msn.com/' target='_new'>立刻访问!</a></body>
</html>