IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Static Public Member Functions | Properties | List of all members
DICOM Class Reference
Inheritance diagram for DICOM:
Inheritance graph
[legend]

Public Member Functions

 DICOM (DICOMSeries seriesInfo)
 
void setupTransformationMatrices ()
 
Vector3 transformPixelToPatientPos (Vector2 pixel, float layer=0)
 
Vector3 transformPatientPosToPixel (Vector3 pos)
 
Vector3 transformPatientPosToDiscretePixel (Vector3 pos)
 

Static Public Member Functions

static Color32 F2C (UInt32 value)
 

Properties

DICOMSeries seriesInfo [get, set]
 
int dimensions [get, set]
 
int texWidth [get, set]
 
int texHeight [get, set]
 
int texDepth [get, set]
 
int origTexWidth [get, set]
 
int origTexHeight [get, set]
 
int origTexDepth [get, set]
 
int texPaddingWidth [get, set]
 
int texPaddingHeight [get, set]
 
int texPaddingDepth [get, set]
 
Image image [get, set]
 
Vector3 origin [get, set]
 
Vector2 pixelSpacing [get, set]
 
Vector3 sliceOffset [get]
 
Vector3 directionCosineX [get, set]
 
Vector3 directionCosineY [get, set]
 
Vector3 sliceNormal [get, set]
 
Matrix4x4 pixelToPatient [get, set]
 
Matrix4x4 patientToPixel [get, set]
 

Detailed Description

Represents a DICOM Image (2D, single slice) or Volume (3D, multi slice).

Definition at line 8 of file DICOM.cs.

Constructor & Destructor Documentation

DICOM.DICOM ( DICOMSeries  seriesInfo)
inline

Constructor, loads the DICOM image data from file. The constructor starts the loading of pixel data from the files (filenames are taken from the seriesInfo). If slice is zero or positive, only the single file will be read. If slice is negative, the entire volume (i.e. all files - and thus all slices) will be read.

Note
Since the constructor does so much work, the Object should be created in a background thread and then passed to the main thread.

Definition at line 84 of file DICOM.cs.

Member Function Documentation

static Color32 DICOM.F2C ( UInt32  value)
inlinestatic

Helper function, converts UInt16 to color

Definition at line 173 of file DICOM.cs.

void DICOM.setupTransformationMatrices ( )
inline

Calculate the transformation matrices which can later be used to convert pixels to 3D positions and vice versa.

See Also
transformPixelToPatientPos
transformPatientPosToPixel
transformPatientPosToDiscretePixel

Definition at line 98 of file DICOM.cs.

Vector3 DICOM.transformPatientPosToDiscretePixel ( Vector3  pos)
inline

Transform a 3D position in the patient coordinate system to a pixel. The z component of the returned vector is the slice number.

Note
The returned position is rounded to the nearest pixel/slice.
See Also
transformPatientPosToPixel transformPixelToPatientPos

Definition at line 163 of file DICOM.cs.

Vector3 DICOM.transformPatientPosToPixel ( Vector3  pos)
inline

Transform a 3D position in the patient coordinate system to a pixel. The z component of the returned vector is the slice number.

Note
The returned position is continuous, i.e. to get an actual pixel value, one must round the result.
See Also
transformPatientPosToDiscretePixel transformPixelToPatientPos

Definition at line 151 of file DICOM.cs.

Vector3 DICOM.transformPixelToPatientPos ( Vector2  pixel,
float  layer = 0 
)
inline

Transforms a 2D pixel on a given layer to the 3D patient coordinate system.

Note
Both pixel and layer may be continuous, i.e. positions between pixels or layers can be given as well as exact pixel/layer values.

Definition at line 138 of file DICOM.cs.

Property Documentation

int DICOM.dimensions
getset

Number of dimensions in this DICOM (2 for slice, 3 for volume).

Note
If dimensions == 2, this does not mean that there aren't any other slices, it only means that this image represents a single slice. To get access to the number of slices in the series, see the seriesInfo.

Definition at line 18 of file DICOM.cs.

Vector3 DICOM.directionCosineX
getset

The direction cosine of a row of this image. This can be thought of as a unit-length vector pointing into the direction in which the row lies inside the patient coordinate system (i.e. when you walk along the row in 2D, in which direction would you walk in the patient coordinate system). See the DICOM standard for more information, or search online for "direction cosine".

Definition at line 57 of file DICOM.cs.

Vector3 DICOM.directionCosineY
getset

The direction cosine of a column of this image. This can be thought of as a unit-length vector pointing into the direction in which the column lies inside the patient coordinate system (i.e. when you walk along the column in 2D, in which direction would you walk in the patient coordinate system). See the DICOM standard for more information, or search online for "direction cosine".

Definition at line 63 of file DICOM.cs.

Image DICOM.image
getset

The ITK image. Can be used to access the raw pixel data as it is in the file. Make sure to read the SimpleITK (or the normal ITK) documentation for details on pixel value types, number of bits etc. This can also be used to access header information through image.GetMetaData().

Definition at line 42 of file DICOM.cs.

Vector3 DICOM.origin
getset

Position of center of first voxel in this series

Definition at line 45 of file DICOM.cs.

int DICOM.origTexDepth
getset

Depth (in Pixels) in DICOM volume

Definition at line 28 of file DICOM.cs.

int DICOM.origTexHeight
getset

Height (in Pixels) in DICOM slice

Definition at line 26 of file DICOM.cs.

int DICOM.origTexWidth
getset

Width (in Pixels) in DICOM slice

Definition at line 24 of file DICOM.cs.

Matrix4x4 DICOM.patientToPixel
getset

Matrix to transform from the patient coordinate system to a pixel/layer coordinate. Inverse of pixelToPatient.

See Also
pixelToPatient

Definition at line 75 of file DICOM.cs.

Vector2 DICOM.pixelSpacing
getset

Distance between rows and columns in images of this series.

Definition at line 47 of file DICOM.cs.

Matrix4x4 DICOM.pixelToPatient
getset

Matrix to transform from a pixel/layer coordinate to the patient coordinate system.

See Also
patientToPixel

Definition at line 70 of file DICOM.cs.

DICOMSeries DICOM.seriesInfo
getset

A reference to the DICOM series this DICOM is part of. This can be thought of as a header for the entire series and can be used to transform from 2D to 3D positions and vice versa.

Definition at line 13 of file DICOM.cs.

Vector3 DICOM.sliceNormal
getset

The plane normal of the slices in this series (result of cross vector of the direction cosines).

Definition at line 66 of file DICOM.cs.

Vector3 DICOM.sliceOffset
get

Slice Offset as determined by the series Info.

Definition at line 50 of file DICOM.cs.

int DICOM.texPaddingDepth
getset

Unused texture depth which results from unity needing Power-Of-Two texture sizes

Definition at line 35 of file DICOM.cs.

int DICOM.texPaddingHeight
getset

Unused texture height which results from unity needing Power-Of-Two texture sizes

Definition at line 33 of file DICOM.cs.

int DICOM.texPaddingWidth
getset

Unused texture width which results from unity needing Power-Of-Two texture sizes

Definition at line 31 of file DICOM.cs.


The documentation for this class was generated from the following file: