[Insight-users] DICOM Header Info

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Dec 16 07:47:59 EST 2008


[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


More information about the Insight-users mailing list