cvs: peardoc /en/package/fileformats file-dicom.xml /en/package/fileformats/file-dicom intro.xml /en/package/fileformats/file-dicom/file-dicom
dumpimage.xml file-dicom.xml file_dicom.xml getvalue.xml parse.xml setvalue.xml write.xml

From: Date: Mon, 25 Aug 2003 17:21:54 +0000
Subject: cvs: peardoc /en/package/fileformats file-dicom.xml /en/package/fileformats/file-dicom intro.xml /en/package/fileformats/file-dicom/file-dicom
dumpimage.xml file-dicom.xml file_dicom.xml getvalue.xml parse.xml setvalue.xml write.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1399@lists.php.net to get a copy of this message
xnoguer Mon Aug 25 13:21:54 2003 EDT Added files: /peardoc/en/package/fileformats file-dicom.xml /peardoc/en/package/fileformats/file-dicom/file-dicom dumpimage.xml file-dicom.xml file_dicom.xml getvalue.xml parse.xml setvalue.xml write.xml /peardoc/en/package/fileformats/file-dicom intro.xml Log: adding File_DICOM docs

Index: peardoc/en/package/fileformats/file-dicom.xml +++ peardoc/en/package/fileformats/file-dicom.xml <sect1 id="package.fileformats.file-dicom"> <title>File_DICOM</title> <para> Package for reading and modifying DICOM files </para> &package.fileformats.file-dicom.intro; &package.fileformats.file-dicom.file-dicom.file-dicom; &package.fileformats.file-dicom.file-dicom.parse; &package.fileformats.file-dicom.file-dicom.write; &package.fileformats.file-dicom.file-dicom.getvalue; &package.fileformats.file-dicom.file-dicom.setvalue; &package.fileformats.file-dicom.file-dicom.dumpimage; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/dumpimage.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/dumpimage.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.dumpimage"> <refnamediv> <refname><function>File_DICOM::dumpImage</function></refname> <refpurpose>Dumps the contents of the image inside the DICOM file (element 0x0010 from group 0x7FE0) to a PGM (Portable Gray Map) file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>File_DICOM::dumpImage</function></funcdef> <paramdef>string <parameter>$filename</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.dumpimage.desc"> &title.desc; <para>Use with Caution!!. For a 8.5MB DICOM file on a P4 it takes 28 seconds to dump it&apos;s image.</para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.dumpimage.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$filename</parameter> </term> <listitem> <para> The file where to save the image </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.dumpimage.returns"> &title.returns; <para> <emphasis>returns</emphasis> true on success, PEAR_Error on failure. </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.dumpimage.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/file-dicom.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/file-dicom.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.file-dicom"> <refnamediv> <refname><function>File_DICOM::File_DICOM</function></refname> <refpurpose>Constructor.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void constructor <function>File_DICOM::File_DICOM</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.file-dicom.desc"> &title.desc; <para>It creates a File_DICOM object.</para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.file-dicom.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/file_dicom.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/file_dicom.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.file-dicom"> <refnamediv> <refname>constructor <function>File_DICOM::File_DICOM</function></refname> <refpurpose>Constructor.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void constructor <function>File_DICOM::File_DICOM</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.file-dicom.desc"> &title.desc; <para>It creates a File_DICOM object.</para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.file-dicom.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/getvalue.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/getvalue.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.getvalue"> <refnamediv> <refname><function>File_DICOM::getValue</function></refname> <refpurpose>Gets the value for a DICOM element.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>File_DICOM::getValue</function></funcdef> <paramdef>integer <parameter>$gp</parameter></paramdef> <paramdef>integer <parameter>$el</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.getvalue.desc"> &title.desc; <para> Gets the value for a DICOM element of a given group from the parsed DICOM file </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.getvalue.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$gp</parameter> </term> <listitem> <para> The group the DICOM element belongs to </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.int; <parameter>$el</parameter> </term> <listitem> <para> The identifier for the DICOM element (unique inside a group) </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.getvalue.returns"> &title.returns; <para> <emphasis>returns</emphasis> The value for the DICOM element on success, PEAR_Error on failure </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.getvalue.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/parse.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/parse.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.parse"> <refnamediv> <refname><function>File_DICOM::parse</function></refname> <refpurpose>Parse a DICOM file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>File_DICOM::parse</function></funcdef> <paramdef>string <parameter>$infile</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.parse.desc"> &title.desc; <para> Parse a DICOM file and get all of its header members. </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.parse.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$infile</parameter> </term> <listitem> <para> The DICOM file to parse </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.parse.returns"> &title.returns; <para> <emphasis>returns</emphasis> true on success, PEAR_Error on failure </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.parse.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/setvalue.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/setvalue.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.setvalue"> <refnamediv> <refname><function>File_DICOM::setValue</function></refname> <refpurpose>Sets the value for a DICOM element.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>File_DICOM::setValue</function></funcdef> <paramdef>integer <parameter>$gp</parameter></paramdef> <paramdef>integer <parameter>$el</parameter></paramdef> <paramdef>mixed <parameter>$value</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.setvalue.desc"> &title.desc; <para> Sets the value for a DICOM element. Only works with strings now. </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.setvalue.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$gp</parameter> </term> <listitem> <para> The group the DICOM element belongs to </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.int; <parameter>$el</parameter> </term> <listitem> <para> The identifier for the DICOM element (unique inside a group) </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.mixed; <parameter>$value</parameter> </term> <listitem> <para> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.setvalue.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/file-dicom/write.xml +++ peardoc/en/package/fileformats/file-dicom/file-dicom/write.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.file-dicom.file-dicom.write"> <refnamediv> <refname><function>File_DICOM::write</function></refname> <refpurpose>Write current contents to a DICOM file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;File/DICOM.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>File_DICOM::write</function></funcdef> <paramdef>string <parameter> <optional>$outfile = ''</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.file-dicom.file-dicom.write.desc"> &title.desc; &notdocumented; </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.write.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$outfile</parameter> </term> <listitem> <para> The name of the file to write. If not given it assumes the name of the file parsed. If no file was parsed and no name is given returns a PEAR_Error </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.write.returns"> &title.returns; <para> <emphasis>returns</emphasis> true on success, PEAR_Error on failure </para> </refsect1> <refsect1 id="package.default.file-dicom.file-dicom.write.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/en/package/fileformats/file-dicom/intro.xml +++ peardoc/en/package/fileformats/file-dicom/intro.xml <!-- $Id: intro.xml,v 1.1 2003/08/25 17:21:54 xnoguer Exp $ --> <refentry id="package.fileformats.file-dicom.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>using File_DICOM</refpurpose> </refnamediv> <refsect1 id="package.fileformats.file-dicom.intro.whatis"> <title>What is DICOM?</title> <para> <classname>File_DICOM</classname> allows reading and modifying of DICOM files. DICOM stands for Digital Imaging and COmmunications in Medicine, and is a standard for creating, storing and transfering digital images (X-rays, tomography) and related information used in medicine. This package in particular does not support the exchange/transfer of DICOM data, nor any network related functionality. More information on the DICOM standard can be found at the <ulink url="http://medical.nema.org/">NEMA site</ulink>. </para> <para> Please be aware that any use of the information produced by this package for diagnosing purposes is strongly discouraged by the author. See <ulink url="http://www.gnu.org/licenses/lgpl.html">here</ulink> for more information. </para> </refsect1> <refsect1 id="package.fileformats.file-dicom.intro.using-it"> <title>Using it</title> <para> <classname>File_DICOM</classname> can be used to accomplish two things, to retrieve data from a file (including image data), and to set new values for that data (allowing to write the modified file). </para> <para> Let's see how we could show some relevant data from a DICOM file and export it's image data at the same time. </para> <example> <title>Showing data</title> <programlisting role="php"> <![CDATA[ <?php require_once('File/DICOM.php'); $dicom = new File_DICOM(); $res = $dicom->parse("test.dcm"); // check for errors if (PEAR::isError($res)) { die("Error: ".$res->getMessage()."\n"); } // show a few attributes of the DICOM file echo 'StudyDate : '.$dicom->getValue(0x0008, 0x0020)."\n"; echo 'Image Date : '.$dicom->getValue(0x0008, 0x0023)."\n"; echo 'Image Type : '.$dicom->getValue(0x0008, 0x0008)."\n"; echo 'Study Time : '.$dicom->getValue(0x0008, 0x0030)."\n"; echo 'Institution Name : '.$dicom->getValue(0x0008, 0x0080)."\n"; echo 'Manufacturer : '.$dicom->getValue(0x0008, 0x0070)."\n"; echo 'Manufacturer Model Name : '.$dicom->getValue(0x0008, 0x1090)."\n"; echo 'Patient Name : '.$dicom->getValue(0x0010, 0x0010)."\n"; echo 'Patient Age : '.$dicom->getValue(0x0010,0x1010)."\n"; // dump a PGM image from the file data $res = $dicom->dumpImage('test.pgm'); if (PEAR::isError($res)) { die("Error: ".$res->getMessage()."\n"); } ?> ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#1399) next »