memory vs header offset

9 views
Skip to first unread message

Satrajit Ghosh

unread,
Oct 16, 2011, 9:57:33 AM10/16/11
to pyd...@googlegroups.com
hi,

when i print a tag, that is a sequence, it says:

<Sequence, length 1, at 109AA8FC8>

when i rerun it, it gives me a different hex number which leads me to believe this is a memory address. should it be a memory address, or should it give a byte offset into the dicom header/data or simply say <Sequence, length x>?

i'm generating the headers automatically and git is picking up this difference between header output each time.

-(0008, 1110) Referenced Study Sequence           SQ: <Sequence, length 1, at 109AA8FC8>
-(0008, 1111) Referenced Performed Procedure Step SQ: <Sequence, length 1, at 109AB5AF8>
-(0008, 1140) Referenced Image Sequence           SQ: <Sequence, length 2, at 109AB5BA8>
+(0008, 1110) Referenced Study Sequence           SQ: <Sequence, length 1, at 109AB5FC8>
+(0008, 1111) Referenced Performed Procedure Step SQ: <Sequence, length 1, at 109AB5E68>
+(0008, 1140) Referenced Image Sequence           SQ: <Sequence, length 2, at 109AB5EC0>

cheers,

satra

Darcy Mason

unread,
Oct 16, 2011, 10:07:10 AM10/16/11
to pydicom

On Oct 16, 9:57 am, Satrajit Ghosh <sa...@mit.edu> wrote:
> hi,
>
> when i print a tag, that is a sequence, it says:
>
> <Sequence, length 1, at 109AA8FC8>
>
> when i rerun it, it gives me a different hex number which leads me to
> believe this is a memory address. ...

Hi satra,

That's an interesting point. It can be easily modified in sequence.py;
simply take out the "at %(id)X" in line 17.

I think I did it with the memory address to mimic the usual python
repr() for objects, where it is (I believe) supposed to be unique, so
that the object could in theory be reconstructed from the repr()
alone.

You could submit an issue for the issue list; I don't mind considering
how this could be changed -- possibly the DICOM group/element number
could be used or something else ... could require a little thought.

-Darcy
Reply all
Reply to author
Forward
0 new messages