[Insight-users] DICOM Header Info

TienGarry gjtian at hotmail.com
Wed Dec 17 08:51:26 EST 2008


When I do it like your method, I will get the error:
 
error C2027: use of undefined type 'gdcm::File'2>        D:\ITKVTK\InsightToolkit-3.8.0\Utilities\gdcm\src\gdcmSerieHelper.h(32) : see declaration of 'gdcm::File'
 
I already installed the extern gdcm, and set ITK_USE_SYSTEM_ON, modified
the cmakelist.txt
 
OPTION(ITK_USE_SYSTEM_GDCM "Use an outside build of GDCM." OFF)MARK_AS_ADVANCED(ITK_USE_SYSTEM_GDCM)IF(ITK_USE_SYSTEM_GDCM)  # If GDCM has already been found, make sure it is the one used to  # build ITK.  IF(WIN32 OR APPLE)    STRING(TOLOWER "${GDCM_DIR}" ITK_CHECK_GDCM_DIR)    STRING(TOLOWER "${ITK_GDCM_DIR}" ITK_CHECK_ITK_GDCM_DIR)  ELSE(WIN32 OR APPLE)    SET(ITK_CHECK_GDCM_DIR "${GDCM_DIR}")    SET(ITK_CHECK_ITK_GDCM_DIR "${ITK_GDCM_DIR}")  ENDIF(WIN32 OR APPLE)  STRING(COMPARE EQUAL "${ITK_CHECK_GDCM_DIR}" "${ITK_CHECK_ITK_GDCM_DIR}"         ITK_GDCM_DIR_MATCH)  IF(GDCM_FOUND)    IF(NOT ITK_GDCM_DIR_MATCH)      MESSAGE(FATAL_ERROR        "ITK was built with GDCM from \"${ITK_GDCM_DIR}\", "        "but this project is using GDCM from \"${GDCM_DIR}\".  "        "Please set GDCM_DIR to match the one used to build ITK."        )    ENDIF(NOT ITK_GDCM_DIR_MATCH)  ELSE(GDCM_FOUND)    IF(GDCM_DIR)      IF(NOT ITK_GDCM_DIR_MATCH)        MESSAGE(          "Warning: ITK was built with GDCM from \"${ITK_GDCM_DIR}\", "          "but this project has set GDCM_DIR to \"${GDCM_DIR}\".  "          "ITK is changing GDCM_DIR to match the GDCM with which it was built."          )      ENDIF(NOT ITK_GDCM_DIR_MATCH)    ENDIF(GDCM_DIR)    SET(GDCM_DIR ${ITK_GDCM_DIR})    FIND_PACKAGE(GDCM)    IF(GDCM_FOUND)      INCLUDE(${GDCM_USE_FILE})    ELSE(GDCM_FOUND)      MESSAGE(FATAL_ERROR        "UseITK could not load GDCM settings from \"${GDCM_DIR}\" even through "        "ITK was built using GDCM from this location."        )    ENDIF(GDCM_FOUND)  ENDIF(GDCM_FOUND)ENDIF(ITK_USE_SYSTEM_GDCM)
 
but I still get the error, when I include "gdcmFile.h", it indicates that 
the system will use the internal gdcmFile.h in D:\ITKVTK\InsightToolkit-3.8.0\Utilities\gdcm\src\ not in the external path.
 
How to solve this problem?
Thank you all again.> Date: Tue, 16 Dec 2008 13:47:59 +0100> From: mathieu.malaterre at gmail.com> To: gjtian at hotmail.com> Subject: Re: [Insight-users] DICOM Header Info> CC: insight-users at itk.org> > [top-post mode]> > On Tue, Dec 16, 2008 at 1:01 PM, TienGarry <gjtian at hotmail.com> wrote:> > Thank you for your answer, this is the> > DictionaryType::ConstIterator end = dictionary.End();> > I am curious why I can get the patient weight correctly, but the following> > code can not> > get Radiopharmaceutical Start Time.> > entryId = "0018|1072";> > tagItr = dictionary.Find( entryId );> > Because both elements are not at the same level. See my previous email.> > > You mentioned that 0018,1072 is part of the sequence, and not part of the> > root element.> > correct> > > How can I get the value of this key entry, I need the information to> > calculate the SUV> > value of PET.> > gdcm::File *f = gdcm::File::New();> f->SetFileName( bla );> bool res = f->Load(); // handle res> > gdcm::SeqEntry *seq = f->GetSeqEntry(0x0054,0x0016);> gdcm::SQItem *sqi = seq->GetFirstSQItem();> while (sqi)> {> std::cout << sqi->GetEntryString(0x0018,0x1072) << std::endl;> sqi = seq->GetNextSQItem();> }> > 2cts> > > Thank you again.> >> >> >> Date: Tue, 16 Dec 2008 09:25:09 +0100> >> From: mathieu.malaterre at gmail.com> >> To: gjtian at hotmail.com> >> Subject: Re: [Insight-users] DICOM Header Info> >> CC: insight-users at itk.org> >>> >> On Tue, Dec 16, 2008 at 5:31 AM, TienGarry <gjtian at hotmail.com> wrote:> >> > I want to retrieve some information from dicom header, for example I can> >> > get> >> > the patient weight correctly:> >> >> >> > entryId = "0010|1030";> >> > double patientweight = 0.;> >> > tagItr = dictionary.Find( entryId );> >> >> >> > but when I want to get the information like this, I can get the error> >> > inforamtion.> >> > entryId = "0018|1072";> >> > tagItr = dictionary.Find( entryId );> >> > if( tagItr == end )> >> > {> >> > std::cerr << "Tag " << entryId;> >> > std::cerr << " not found in the DICOM header" << std::endl;> >> > return EXIT_FAILURE;> >> > }> >>> >>> >> How did you defined 'end', do you mean dictionary.end() ? If so then> >> it should work (unless you are using VS6).> >>> >> >> >> > The header ifor displayed in ImageJ like this:> >> >> >> > 0054,0013 Energy Window Range Sequence:> >> > 0054,0014 Energy Window Lower Limit: 350> >> > 0054,0015 Energy Window Upper Limit: 650> >> > 0054,0016 Radiopharmaceutical Information Sequence:> >> > 0018,1072 Radionuclide Start Time: 090748.000000> >> > 0018,1074 Radionuclide Total Dose: 370500000> >> > 0018,1075 Radionuclide Half Life: 6586.2> >> > 0018,1076 Radionuclide Positron Fraction: 0> >> > 0054,0300 Radionuclide Code Sequence:> >> > 0054,0081 Number of Slices: 262> >> > 0054,0410 Patient Orientation Code Sequence:> >> >> >>> >> If I were you, I would not use ImageJ anymore. The output is clearly> >> not human readable. Looking at it you do not see that 0018,1072 is> >> part of the sequence, and not part of the root element. So it should> >> read:> >>> >> 0054,0013 Energy Window Range Sequence:> >> 0054,0014 Energy Window Lower Limit: 350> >> 0054,0015 Energy Window Upper Limit: 650> >> 0054,0016 Radiopharmaceutical Information Sequence:> >> 0018,1072 Radionuclide Start Time: 090748.000000> >> 0018,1074 Radionuclide Total Dose: 370500000> >> 0018,1075 Radionuclide Half Life: 6586.2> >> 0018,1076 Radionuclide Positron Fraction: 0> >> 0054,0300 Radionuclide Code Sequence:> >> 0054,0081 Number of Slices: 262> >> 0054,0410 Patient Orientation Code Sequence> >>> >> Indeed ITK-GDCM does not load Sequence in the MetaDataDictionary.> >>> >> 2cts> >> --> >> Mathieu> >> > ________________________________> > MSN热搜榜全新升级,更多排行榜等着你! 立即查看!> > > > -- > Mathieu
_________________________________________________________________
新版手机MSN,新功能,新体验!满足您的多彩需求!
http://mobile.msn.com.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081217/f8343c24/attachment.htm>


More information about the Insight-users mailing list