Read Dicom RT

101 views
Skip to first unread message

tbdeb...@gmail.com

unread,
Feb 7, 2013, 8:24:40 AM2/7/13
to nano...@googlegroups.com
Hello,

How
should I do to read in RTplan  -->  field names and know their number??

[0x300A][0x0080] = array('IS', ' 1', 'NumberOfBeams');
[0x300A][0x00C2] = array('LO', ' 1', 'BeamName');

foreach ($files as $file)
{

    $filename = $dir.$file;
        $dicom = Nanodicom::factory($filename);
        $dicom->parse();
        echo 'Patient name: '.$dicom->value(0x0010, 0x0010)."<br>";
        echo 'Id patient: '.$dicom->value(0x0010, 0x0020)."<br>";
        echo '
'NumberOfBeams: '.$dicom->value(0x300A, 0x0080)."<br>";
        echo '
BeamName: '.$dicom->value(0x300A, 0x00C2)."<br>";
        unset($dicom);

}


Thx in advance,


Nano.

unread,
Feb 7, 2013, 2:02:51 PM2/7/13
to nano...@googlegroups.com
Hi there,

Yes, if you want to extract the information from the fields, you will need to know the field group and element, or the name if the name happens to be in the dictionaries (you can always add any new ones). Those groups and element values are defined by the DICOM standard itself.

The "DICOM Part 3: Information Object Definitions" defines the INFORMATION OBJECT DEFINITION for each modality. For example, in page 175 of that document you will find out which modules could be included for DICOM RT Plan, each module defines the groups and element tags that need/can be present for the DICOM object. Each module is defined in that document as well.

Thus, to find out what tags to expect for a RT Plan:
1) Download the document I pointed.
2) Search for the DICOM object you want to find about (RT Plan in your case, page 175).
3) See the modules that are present for that DICOM object
4) Search for the specific module in that document. Each module will list the tag names and values (group, element) that should be expected.
5) Once you know them, use Nanodicom to print them out (if they are present).

Does that make sense? I hope I helped a little bit.

You can always dump the contents of your DICOM file to see which tags are present and go that route as well. Nanodicom's dumper will show the tag values and the name if available in the dictionary.

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

tbdeb...@gmail.com

unread,
Feb 8, 2013, 3:30:40 AM2/8/13
to nano...@googlegroups.com
Thx for the quickly answer,

Ok but how i read in a sequence field.
[0x300A][0x0070] = array('SQ', ' 1', 'FractionGroupSequence');
$dicom->value(0x300A, 0x0070) return a array.

 in the array, how find easily the good element?

Thx in advance.

Tom

Nano.

unread,
Feb 9, 2013, 9:53:16 PM2/9/13
to nano...@googlegroups.com
Hi Tom,

Reading sequences is a little bit trickier. Basically they are recursive objects that have elements and could also have sequences.

If you want to see an example on how to iterate inside sequences take a look at dumper tool.

From your example, what elements do you want to read from that sequence?

Thanks,

Nano.
--
Reply all
Reply to author
Forward
0 new messages