[Insight-users] DICOM Header Info

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Dec 16 03:25:09 EST 2008


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


More information about the Insight-users mailing list