read_DICOM - read DICOM file into an AVS field

Summary

Nameread_DICOM
TypeInput
InputsNONE
Outputsfield2D 2-space 1-vector uniform short
Pixel Spacing X1d scalar real
Pixel Spacing Y1d scalar real
Slice Thickness1d scalar real
ParametersNameTypeDefault
DICOM filefile browser

Description

The read_DICOM module reads DICOM data files and converts them into AVS field format. The AVS Field is a 2D uniform field of scalar short values.

Note

No attempt has been made to make this biendian. This currently is only guaranteed to work on little-endian architectures. If you have a big-endian architectured machine, implementing the appropriate byte-swapping macros (check them first!) in the get_VRxxx() functions will allow them to return the correct values.

Additionally, the DICOM elements are currently in little-endian format; these will have to be byte-swapped on a big-endian machine.

Only bit-allocations of 8 and 16 are supported. Bit stored should not matter, as long as in an allocation of 8 or 16.

If slope/intercepts are present, the data will be rescaled using the linear equation y = mx+b, where x is the recorded voxel value, and y is the (newly) rescaled voxel value. The slope/intercepts are in Phillips MR DICOM files, and possibly others.

The fields needed are extracted and put in the IMAGE_DATA struct. Fields here can be output as ports as needed.

This seems to work pretty well, but if you encounter any problems don't hesitate to ask.

Inputs

Parameters

DICOM file
A file browser widget for specifing the input file

Outputs

Example networks

				read_DICOM
					  |
					  |
				image viewer

Date

March 2002

Author

	Zachary DelProposto
	zsd@umich.edu
Nametype

Data Fieldfield 2D scalar uniform short
Pixel Spacing X1D scalar real
Pixel Spacing Y1D scalar real
Slice Thickness1D scalar real