Routines (alphabetical) > Object Classes > File Format Object Classes > IDLffDICOM::Read

# IDLffDICOM::Read

Syntax | Return Value | Arguments | Keywords | Examples | Version History

The IDLffDICOM::Read function method opens and reads from the specified disk file, places the information into the DICOM object, then closes the file.

## Syntax

Result = Obj->[IDLffDICOM::]Read(Filename [, ENDIAN={1 | 2 | 3 | 4}])

## Return Value

Return a 1 if successful and 0 otherwise.

## Arguments

### Filename

A scalar string argument containing the full path and filename of a DICOM Part 10 file to open and read into memory.

## Keywords

### ENDIAN

Set this keyword to configure the endian format when reading a DICOM file.

- 1 = Implicit VR Little Endian
- 2 = Explicit VR Little Endian
- 3 = Implicit VR Big Endian
- 4 = Explicit VR Big Endian

## Examples

; Create a DICOM object and read a DICOM file:

obj = OBJ_NEW('IDLffDICOM')

var = obj->Read(DIALOG_PICKFILE(FILTER = '*'))

OBJ_DESTROY, obj

## Version History

5.2 | Introduced