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.
Thanks for your help