Iterating inside a sequence -> reading PR

51 views
Skip to first unread message

javier....@alma3d.com

unread,
May 15, 2014, 11:37:14 AM5/15/14
to nano...@googlegroups.com
Hi all, 

few month ago, I posted a request about "Iterating inside a sequence", as a consequence of this post, Nano creates an especific version "https://github.com/nanodocumet/Nanodicom" with read_sequence_items function as a new way toiterate inside sequence.

Now I need to iterate inside a PR to get all the annotations associated to an image, but it seems that it doesn't work and it could be a bug or something I'm doing wrong. So let's get down to business:

I have this structure

0070, 0001 (sequence)
--0070,0002
--0070, 0008 (sequence )
----0070, 0003
----0070, 0004
----0070, 0006

so, to get element data inside 0070, 0008 sequence I write the following code:

$GAseq = $dicom->value(0x0070, 0x0001);
$GAitems = $dicom->read_sequence_items( $GAseq );

foreach( $GAitems as $gaitem )
{
$GraphicLayer = $dicom->dataset_value( $gaitem, 0x0070, 0x0002);
echo  $GraphicLayer;
$TOSeq = $dicom->dataset_value( $gaitem, 0x0070, 0x0008);
$TOitems = $dicom->read_sequence_items( $TOseq );
foreach( $TOitems as $toitem )
{
echo "Yes!!";
}
}

the output is just all 0070, 0002 values, and I don't get any "Yes!!". It's quite strange because i'm using read_sequence_items in other DICOM files and it work's (if you can see, to get 0x0070, 0x0002 i'm iterating usign this function too and it's working), so it could be something specific of PR structure.

I attach PR sample to understand what's going on.

PS: the latest oficial version hasn't read_sequence_items, just this specific branch "https://github.com/nanodocumet/Nanodicom".

Thanks for your help

1.2.826.0.1.3680043.2.1227.180222088.13140515165842.0.dcm

Nano.

unread,
May 16, 2014, 10:24:48 AM5/16/14
to nano...@googlegroups.com
Hi Javier,

I will take a look of it when I get a chance. I doubt I can do it today, hopefully on Monday.

Cheers,

Nano.


--
You received this message because you are subscribed to the Google Groups "nanodicom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanodicom+...@googlegroups.com.
To post to this group, send email to nano...@googlegroups.com.
Visit this group at http://groups.google.com/group/nanodicom.
For more options, visit https://groups.google.com/d/optout.

Nano.

unread,
May 20, 2014, 12:34:48 PM5/20/14
to nano...@googlegroups.com
Hi Javier,

Sorry I haven't been able to take a look at your request, I bended my finger last Sunday and I am still recovering. I will try to take a look at it during this week.

Regards,

Nano.

javier....@alma3d.com

unread,
May 21, 2014, 2:46:10 AM5/21/14
to nano...@googlegroups.com
Hi Nano,

Don't worry about that, health comes first. I'll be waiting for your answer (I hope you find what's going on in the described case :p)

Regards,

Javier 

javier....@alma3d.com

unread,
May 28, 2014, 6:36:18 AM5/28/14
to nano...@googlegroups.com
Hi Nano,

how is it going? Did you find anything?

Cheers,
Javier

Nano.

unread,
May 28, 2014, 9:15:08 PM5/28/14
to nano...@googlegroups.com
Hi Javier,

Feeling a lot better. Just quite busy at work. I'll try to see if I can take a look this week. Sorry about that.

Regards,

Nano.

Nano.

unread,
May 31, 2014, 12:07:00 AM5/31/14
to nano...@googlegroups.com
Hi Javier,


Observations:
1) Not all items in 0x0070, 0x0001 have the sequence "0x0070, 0x0008" (TextObjectSequence), only the first 4 items have that sequence, the other 4 items have the sequence "0x0070, 0x0009" (GraphicObjectSequence)
2) The variable "TOSeq" is misspelled as "TOseq" throwing warnings.

I hope it takes you to the right direction. Sorry for the delay. Take the script above as an initial work to do what you will like to do. Certainly with the addition to read sequences, you should be able to traverse any dicom file.

Regards,

Nano.

javier....@alma3d.com

unread,
Jun 2, 2014, 3:29:54 AM6/2/14
to nano...@googlegroups.com
Hi Nano,

Thank you so much for your help :D
Reply all
Reply to author
Forward
0 new messages