This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'nanodicom.php'; | |
// File to read | |
$filename = 'DICOMDIR'; | |
$dicom = Nanodicom::factory($filename); | |
// Parse whole file | |
$dicom->parse(); | |
// Get the sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL | E_STRICT); | |
require 'nanodicom.php'; | |
// test file is relative to current directory | |
$filename = '1.2.826.0.1.3680043.2.1227.180222088.13140515165842.0.dcm'; | |
$dicom = Nanodicom::factory($filename); | |
$dicom->parse(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'nanodicom.php'; | |
// test file is relative to current directory | |
$filename = 'test.dcm'; | |
$dicom = Nanodicom::factory($filename); | |
$dicom->parse(array(array(0x5400, 0x0100))); | |
$WaveformSequence = $dicom->value(0x5400, 0x0100); | |
$WaveformSequenceItems = $dicom->read_sequence_items($WaveformSequence); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'Nanodicom/nanodicom.php'; | |
$filename = 'test.DCM'; | |
$dicom = Nanodicom::factory($filename); | |
$dicom->parse(array(array(0x0010, 0x0010), array(0x0054, 0x0016))); | |
// Get the sequence | |
$seq = $dicom->value(0x0054, 0x0016); | |
// Get the items (sequences are grouped in items) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Current way to unset (remove) a tag from a DICOM file. | |
*/ | |
echo "Removing a tag from a DICOM file using Nanodicom"; | |
$filename = "myfile.dcm"; | |
// We need to use dumper | |
$dicom = Nanodicom::factory($filename, 'dumper'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1) Workaround to create new elements for Nanodicom | |
try | |
{ | |
$dicom = Nanodicom::factory($filename, 'anonymizer'); | |
// Set Value (Patient Name here) | |
$dicom->value(0x0010, 0x0010, 'JKD'); | |
//$dicom->value(0x0010, 0x0010, 'JKD'); Others as well | |
$tags = array( | |
array(0xF0ED, 0xF0ED, 'id{random}'), // Non-existing tag. Sorry, needs one at least |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Script to create a DICOM file from scratch (adds a lossy 8-bit grayscale jpeg) | |
* Use with CAUTION!!! Might not create a valid DICOM file!! | |
* Some tags might be missing, and others might need valid values | |
* Assumes jpeg file and nanodicom toolkit is in local relative path | |
*/ | |
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL | E_STRICT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Test extends Controller { | |
public function action_index() | |
{ | |
$user = new Model_Testuser; | |
$user_fields = array( | |
'username' => 'test', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try | |
{ | |
// Load and parse the file | |
$dicom = Nanodicom::factory($filename); | |
$dicom->parse(); | |
$mode = 'LO'; | |
// Do the Query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* Automodeler_ORM Auth driver. | |
* | |
* @package Auth | |
* @author Kohana Team | |
* @copyright (c) 2007-2008 Kohana Team | |
* @license http://kohanaphp.com/license.html | |
*/ | |
class Auth_AutoModeler_ORM extends Auth { |
NewerOlder