File_DICOM
[ class tree: File_DICOM ] [ index: File_DICOM ] [ all elements ]

Class: File_DICOM

Source Location: /File_DICOM-0.3/DICOM.php

Class Overview

PEAR
   |
   --File_DICOM

This class allows reading and modifying of DICOM files


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
This class allows reading and modifying of DICOM files


[ Top ]


Class Variables

$current_file =

[line 55]

Currently open file.

Type:   string


[ Top ]

$dict =

[line 41]

DICOM dictionary.

Type:   array


[ Top ]

$is_dicm =

[line 49]

Flag indicating if the current file is a DICM file or a NEMA file.

true => DICM, false => NEMA.


Type:   bool


[ Top ]



Method Detail

File_DICOM (Constructor)   [line 81]

File_DICOM File_DICOM( )

Constructor.

It creates a File_DICOM object.

  • Access: public

[ Top ]

dumpImage   [line 2025]

mixed dumpImage( string $filename)

Dumps the contents of the image inside the DICOM file (element 0x0010 from group 0x7FE0) to a PGM (Portable Gray Map) file.

Use with Caution!!. For a 8.5MB DICOM file on a P4 it takes 28 seconds to dump it's image.

  • Return: true on success, PEAR_Error on failure.
  • Access: public

Parameters:

string   $filename     The file where to save the image

[ Top ]

getValue   [line 1979]

mixed getValue( mixed $gp_or_name, [integer $el = null])

Gets the value for a DICOM element Gets the value for a DICOM element of a given group from the parsed DICOM file.
  • Return: The value for the DICOM element on success, PEAR_Error on failure
  • Access: public

Parameters:

mixed   $gp_or_name     The group the DICOM element belongs to (integer), or it's name (string)
integer   $el     The identifier for the DICOM element (unique inside a group)

[ Top ]

parse   [line 1843]

mixed parse( string $infile)

Parse a DICOM file Parse a DICOM file and get all of its header members
  • Return: true on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $infile     The DICOM file to parse

[ Top ]

setValue   [line 2009]

void setValue( integer $gp, integer $el, mixed $value)

Sets the value for a DICOM element Only works with strings now.
  • Access: public

Parameters:

integer   $gp     The group the DICOM element belongs to
integer   $el     The identifier for the DICOM element (unique inside a group)

[ Top ]

write   [line 1883]

mixed write( [string $outfile = ''])

Write current contents to a DICOM file.
  • Return: true on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $outfile     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

[ Top ]


Documentation generated on Sat, 1 May 2004 01:21:25 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.