Class: Dicom_Anonymizer

Source Location: /tools/anonymizer.php

Class Overview [line 24]

Nanodicom_Core
   |
   --Nanodicom
      |
      --Dicom_Anonymizer

Dicom_Anonymizer class.

Author(s):

Version:

  • 1.2

Copyright:

  • (c) 2010-2011

Variables

Constants

Methods


Child classes:

Dicom_Anonymizer_Clinicaltrial
Dicom_Anonymizer_Clinicaltrial class.

Inherited Variables

Inherited Constants

Inherited Methods

Class: Nanodicom_Core

Nanodicom_Core::__construct()
Create a new Nanodicom instance. It is usually called from a class extended from core, ie Dumper
Nanodicom_Core::array_get()
Public static method to get the value from an array. If index does not exist, it returns the default.
Nanodicom_Core::dataset_value()
Public method to get and set values when passing a dataset.
Nanodicom_Core::decode_transfer_syntax()
Get the VR mode and endian from a transfer syntax.
Nanodicom_Core::extend()
Public method to extend the tool to include other tools.
Nanodicom_Core::factory()
Create a new Nanodicom instance. It is usually called from a class extended from Nanodicom, ie Dumper
Nanodicom_Core::flush()
Public method to flush the object
Nanodicom_Core::get()
Public method to get the value of an element.
Nanodicom_Core::get_transfer_syntax()
Public method to get the transfer syntax used
Nanodicom_Core::is_dicom()
Public method to quickly check if file is DICOM. Does a brute force parse of the object and checks the returned status.
Nanodicom_Core::last_error()
Returns the last error found
Nanodicom_Core::parse()
Parses the object.
Nanodicom_Core::profiler_diff()
Public method to show the profiling time for methods. Profiling names MUST be equal to method names.
Nanodicom_Core::set_vr_reading_list()
Public method to set the vrs to read
Nanodicom_Core::summary()
Public method to get the summary of the given file.
Nanodicom_Core::value()
Public method to get and set values, but only values at top level.
Nanodicom_Core::write()
Returns a blob of the current dataset
Nanodicom_Core::write_file()
Writes the file to the specified location
Nanodicom_Core::_check_deflate()
Nanodicom_Core::_check_list()
Checks if the given group and element are part of the list of elements to look for.
Nanodicom_Core::_check_proper_endian()
Check that proper endian is used
Nanodicom_Core::_check_proper_endian_same()
Returns the same values passed
Nanodicom_Core::_decode_vr()
Decodes the proper vr from the group, element, current vr and length.
Nanodicom_Core::_dummy()
Dummy function to be used instead of other time consuming functions.
Nanodicom_Core::_forward()
Moves the current_pointer forward
Nanodicom_Core::_parse()
Parsing code
Nanodicom_Core::_proper_name()
Get the proper name of the tag name. Removes spaces and _, and converts it to lowercase.
Nanodicom_Core::_read()
Reads specified number of bytes from blob, or checks if there is still data left to be read
Nanodicom_Core::_read_element()
Read an element
Nanodicom_Core::_read_file()
Read file or blob accordingly
Nanodicom_Core::_read_float()
Reads a float
Nanodicom_Core::_read_int_32()
Reads integers
Nanodicom_Core::_read_int_64()
Reads an integer for 64-bit machines
Nanodicom_Core::_read_value()
Read the value of an Tag element accordingly. No numeric values are interpreted. No reading of PN
Nanodicom_Core::_read_value_from_blob()
Read the value from the blob
Nanodicom_Core::_rewind()
Set the current_pointer to a given value
Nanodicom_Core::_tell()
Finds current position of pointer
Nanodicom_Core::_update_group_length()
Updates the group length value if exists
Nanodicom_Core::_write()
Creates a binary string from the current dataset
Nanodicom_Core::_write_float()
Writes a float
Nanodicom_Core::_write_int_32()
Writes an integer for 32-bit machines.
Nanodicom_Core::_write_int_64()
Writes an integer for 64-bit machines. Uses 32-bit function
Nanodicom_Core::__call()
Magic method to call an undefined method. It will look for methods on children Performance is better when called directly
Nanodicom_Core::__get()
Magic method, calls [Nanodicom::value] with the same parameters. Used to get values by name.
Nanodicom_Core::__set()
Magic method, calls [Nanodicom::value] with the corresponding group and element based on the tag name.
Nanodicom_Core::__toString()
Returns the name of the loaded file or 'blob'
Nanodicom_Core::__unset()
Magic method to unset a tag element. To be used wisely.


Class Details

Dicom_Anonymizer class.

Extends Nanodicom. It overwrites certain file tags. Fully extensible.

Tags:

[ Top ]


Class Variables

static $case =  'insensitive'

[line 44]

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

static $_basic = array(
      array(0x0008, 0x0020, '{date|Ymd}'),// Study Date
array(0x0008,0x0021,'{date|Ymd}'),// Series Date
array(0x0008,0x0090,'physician{random}'),// Referring Physician
array(0x0010,0x0010,'patient{consecutive}'),// Patient Name
array(0x0010,0x0020,'id{consecutive}'),// Patient ID
)

[line 29]

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

$_map

[line 38]

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

$_tags

[line 41]

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]


Class Methods

anonymize

string anonymize( [mixed $tags = NULL], [integer $map = NULL], [array $mode = self::RETURN_BLOB])

[line 59]

Anonymizes the dataset

Tags:

  • return - the anonymized dataset
  • access - public

Overridden in child classes as:

Dicom_Anonymizer_Clinicaltrial::anonymize()
Anonymizes the dataset

Parameters:

  • mixed $tags - NULL or an array to overwrite defaults
  • integer $map - the mode
  • array $mode - a set of values to be used for mapping Each entry has 4 values: group = group of tag element element = element of the tag element value = the expect value to be matched (trimmed) assignment = the new replacement value for the given tag element and found value combined

[ Top ]

_anonymize

string _anonymize( array &$dataset)

[line 115]

Anonymizes the dataset

Tags:

  • return - the anonymized dataset
  • access - protected

Parameters:

  • array &$dataset - the dataset passed by reference

[ Top ]

_replace

boolean _replace( array &$dataset, integer $group, integer $element)

[line 157]

Replaces the values

Tags:

  • return - true if replacement was made, false otherwise
  • access - protected

Parameters:

  • array &$dataset - the dataset
  • integer $group - the group
  • integer $element - the element

[ Top ]


Class Constants

RETURN_BLOB =  0

[line 26]

[ Top ]


Documentation generated on Thu, 08 Sep 2011 17:22:03 -0700 by phpDocumentor 1.4.3