Search code examples
javaintdcm4che

dcm4che - tag is a "8 byte integer"?


I am a dcm4che newbie I am referring to the javadoc of dcm4che2 api

Pardon if my question is very basic I Trying to create a DICOM object "org.dcm4che2.data.DicomObject" from a file.

Most of the member functions of DicomObject that work with DICOM tag expect the tag value to be specified as "ggggeeee" , where gggg is four digit group id and eeee is four digit element id.

The dcm4j documentation refers to tag value as "tag - (group, element) as 8 byte integer: ggggeeee." - and the data type expected is int

I suppose this is simply a misnomer ( sadly though it is consistently followed in api documentation all across )

java "int" datatype can hold only four bytes isn't it? So we rather need to provide a 8 digit number as opposed to 8 bytes isnt it.

for example if I am specifying DICOM tag transfer syntax UID - which is group 2 tag 10 then I should be good passing a value as follows isn't it?

 int  dicomTagXferSyntaxUid=0x00020010;

While it is so obvious , I wonder why dcm4che documentation refers to it consistently as "8 byte integer" ... what am I missing ?

Comments welcome

Yogesh


Solution

  • It must be a typo, since that "8 byte integer" is used to describe method parameters of int type, which is only 4 bytes.

    It makes sense that what was intended, as you say yourself, was "8 digit integer".