Info from Item #2

35 views
Skip to first unread message

Diego Ruggiero

unread,
Dec 30, 2014, 1:18:22 PM12/30/14
to nano...@googlegroups.com
Hello...
I'm trying the get the information from the other items in the same sequence but I'm not able to do that..
I'm using this code:
$dicom = Nanodicom::factory($filename);
$dicom->parse(array(array(0x0010, 0x0010), array(0x0004, 0x1220)));
// Get the sequence
$seq   = $dicom->value(0x0004, 0x1220);
// Get the items (sequences are grouped in items)
$items = $dicom->dataset_value($seq, 0xFFFE, 0xE000);
// Get the value wanted
$val   = $dicom->dataset_value($items, 0x0010, 0x0010);

 In the dump, I've seen that all the items in the dicom file under the seq (0004,1220) have the same id 0xFFFE, 0xE000...

Parsing Dataset or Sequence Item...
00000148: (0004,1130) CS, "" # File-set ID (0 bytes)
00000150: (0004,1200) UL, "382" # Offset of the First Directory Record of the Root Directory Entity (4 bytes)
0000015C: (0004,1202) UL, "382" # Offset of the Last Directory Record of the Root Directory Entity (4 bytes)
00000168: (0004,1212) US, "0" # File-set Consistency Flag (2 bytes)
00000172: (0004,1220) SQ, "" # Directory Record Sequence (1308 bytes)
Found Item (FFFE,E000); Length=118 (00000076H)
Parsing Dataset or Sequence Item...
00000186: (0004,1400) UL, "0" # Offset of the Next Directory Record (4 bytes)
00000192: (0004,1410) US, "65535" # Record In-use Flag (2 bytes)
0000019C: (0004,1420) UL, "508" # Offset of Referenced Lower-Level Directory Entity (4 bytes)
000001A8: (0004,1430) CS, "PATIENT" # Directory Record Type (7 bytes)
000001B8: (0008,0005) CS, "ISO_IR 100" # Specific Character Set (10 bytes)
000001CA: (0010,0010) PN, "XXXX" # Patient’s Name (17 bytes)
000001E4: (0010,0020) LO, "14-12-22-181825" # Patient ID (15 bytes)
End of Dataset or Sequence parsing.
Found Item (FFFE,E000); Length=194 (000000C2H)
Parsing Dataset or Sequence Item...

Thanks in advance
Diego 
 
 

Nano.

unread,
Dec 30, 2014, 1:58:01 PM12/30/14
to nano...@googlegroups.com
Hi Diego,

Can you try the following (adjust to your needs)


You might want to take a look at this as reference:


Let me know if that helps you.

Thanks,

Nano.

Diego Ruggiero

unread,
Dec 30, 2014, 4:45:40 PM12/30/14
to nano...@googlegroups.com
Hi Nano,
thanks for your fast reply...

I try to apply your suggestion but it doesn't work, probably cause I don't know what "0x003A, 0x0200" stand for!?
I understood that one is for the sequence and the other is for the element but the third? If I put the item numbers (0xFFFE, 0xE000) is not working at all...

Thanks again

Diego

Nano.

unread,
Jan 5, 2015, 8:06:31 PM1/5/15
to nano...@googlegroups.com
Hi Diego,

Do you have any sample file for this?

Thanks!

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.

Diego Ruggiero

unread,
Jan 15, 2015, 7:33:09 AM1/15/15
to nano...@googlegroups.com

Hi!
Sorry for the delay and thanks a lot for your answer... I attach to the present the DICOM file as an example... thanks again!

Diego
DICOMDIR.zip

Nano.

unread,
Jan 20, 2015, 4:00:12 PM1/20/15
to nano...@googlegroups.com
Hi Diego,

Check this out and let me know if it helps: https://gist.github.com/nanodocumet/54875a3d1af1afbff3e2

Thanks,

Nano.

Reply all
Reply to author
Forward
0 new messages